public final class CombineArchiveModel extends Object
| Constructor and Description |
|---|
CombineArchiveModel(File archiveFile)
Instantiates a new combine archive model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntries(Collection<File> entries)
Adds the entries.
|
void |
addEntry(File entry)
Adds the entry.
|
void |
addEntry(File entry,
boolean makeMain)
Adds the entry.
|
void |
addMetadata(String entry,
Object metadata)
Adds the metadata.
|
void |
close()
Close.
|
void |
close(boolean force)
Close.
|
void |
deleteEntries(Collection<String> entries)
Delete entries.
|
void |
deleteEntry(String entry)
Delete entry.
|
String |
getMainEntry()
Gets the main entry.
|
Object |
getMetadata(String entry)
Gets the metadata.
|
boolean |
hasMainEntry()
Checks for main entry.
|
boolean |
hasUnsavedChanges()
Checks for unsaved changes.
|
Collection<?> |
listEntries()
List entries.
|
void |
removeMetadata(Object entry,
Object metadata)
Removes the metadata.
|
void |
save()
Save.
|
void |
saveAs(File newArchiveFile)
Save as.
|
void |
setMainEntry(String entry)
Sets the main entry.
|
void |
updateMetadata(Object entry,
Object metadata)
Update metadata.
|
public CombineArchiveModel(File archiveFile) throws IOException, org.jdom2.JDOMException, ParseException, de.unirostock.sems.cbarchive.CombineArchiveException
archiveFile - the archive fileIOException - Signals that an I/O exception has occurred.org.jdom2.JDOMException - the jDOM exceptionParseException - the parse exceptionde.unirostock.sems.cbarchive.CombineArchiveException - the combine archive exceptionpublic Collection<?> listEntries()
public boolean hasMainEntry()
public String getMainEntry()
public void setMainEntry(String entry)
entry - the new main entrypublic void addEntry(File entry) throws IOException
entry - the entryIOException - Signals that an I/O exception has occurred.public void addEntry(File entry, boolean makeMain) throws IOException
entry - the entrymakeMain - the make mainIOException - Signals that an I/O exception has occurred.public void addEntries(Collection<File> entries) throws IOException
entries - the entriesIOException - Signals that an I/O exception has occurred.public void deleteEntry(String entry) throws IOException
entry - the entryIOException - Signals that an I/O exception has occurred.public void deleteEntries(Collection<String> entries) throws IOException
entries - the entriesIOException - Signals that an I/O exception has occurred.public boolean hasUnsavedChanges()
public void save()
throws IOException,
TransformerException
IOException - Signals that an I/O exception has occurred.TransformerException - the transformer exceptionpublic void saveAs(File newArchiveFile) throws IOException, TransformerException
newArchiveFile - the new archive fileIOException - Signals that an I/O exception has occurred.TransformerException - the transformer exceptionpublic void close(boolean force)
throws Exception
force - the forceException - the exceptionpublic Object getMetadata(String entry)
entry - the entrypublic void addMetadata(String entry, Object metadata)
entry - the entrymetadata - the metadatapublic void removeMetadata(Object entry, Object metadata)
entry - the entrymetadata - the metadataCopyright © 2014. All rights reserved.