public final class MainModel extends Object
Constructor and Description |
---|
MainModel() |
Modifier and Type | Method and Description |
---|---|
void |
addFile(File file,
String targetName,
File archiveFile)
Add the specified file to the combine archive as
targetName . |
void |
closeArchive(File archiveFile)
Closes the specified archive file.
|
void |
createArchive(File archiveFile) |
void |
extractArchive(File destination,
File archiveFile)
Extracts the complete combine archive to the specified destination file.
|
void |
extractArchiveEntries(File destination,
File archiveFile,
Collection<de.unirostock.sems.cbarchive.ArchiveEntry> archiveEntries)
Extracts the specified subset of
ArchiveEntries from the
specified combine archive to destination . |
Collection<File> |
getArchives()
XXX - needed?
|
List<de.unirostock.sems.cbarchive.ArchiveEntry> |
listEntries(File archiveFile)
Retrieves the entries of the combine archive.
|
void |
moveArchiveEntriesToArchive(File fromArchive,
List<de.unirostock.sems.cbarchive.ArchiveEntry> entries,
File toArchive,
String newPath) |
void |
moveArchiveEntry(File archive,
de.unirostock.sems.cbarchive.ArchiveEntry entry,
String newPath) |
void |
openArchive(File archiveFile)
Opens a combine archive files using combine archive java library.
|
public void openArchive(File archiveFile) throws IOException, org.jdom2.JDOMException, ParseException, de.unirostock.sems.cbarchive.CombineArchiveException
archiveFile
- IOException
org.jdom2.JDOMException
ParseException
de.unirostock.sems.cbarchive.CombineArchiveException
public Collection<File> getArchives()
public void closeArchive(File archiveFile) throws IOException, TransformerException
archiveFile
- IOException
TransformerException
public void extractArchive(File destination, File archiveFile) throws IOException
destination
is a directory, then all files are extracted
into this directory. Otherwise, the files are extracted into the same
directory as destination
.destination
- - folder/file, files are extracted toarchiveFile
- - combine archive fileIOException
public void extractArchiveEntries(File destination, File archiveFile, Collection<de.unirostock.sems.cbarchive.ArchiveEntry> archiveEntries) throws IOException
ArchiveEntries
from the
specified combine archive to destination
.
XXX - allow access via ArchiveEntry? what about string and then using
getEntry(String location)?destination
- archiveFile
- archiveEntries
- IOException
public void addFile(File file, String targetName, File archiveFile) throws IOException, TransformerException
targetName
.file
- targetName
- archiveFile
- IOException
TransformerException
public void moveArchiveEntry(File archive, de.unirostock.sems.cbarchive.ArchiveEntry entry, String newPath) throws IOException, TransformerException
IOException
TransformerException
public void moveArchiveEntriesToArchive(File fromArchive, List<de.unirostock.sems.cbarchive.ArchiveEntry> entries, File toArchive, String newPath) throws IOException, TransformerException
IOException
TransformerException
Copyright © 2014. All rights reserved.