public abstract class ZipFileParser extends Object implements ImportFileParser
| Modifier and Type | Field and Description |
|---|---|
protected String |
localArchiveLocation |
protected MimetypesFileTypeMap |
mimeTypes |
protected String |
pathToData |
| Constructor and Description |
|---|
ZipFileParser() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
awakeFromUnzip(String unArchiveLocation) |
protected Document |
extractFileAsDOM(String pathAndFilename,
InputStream archive) |
protected boolean |
fileExistsInArchive(String pathAndFilename,
InputStream archive) |
protected byte[] |
getBytesFromFile(File file) |
protected abstract Collection |
getCategoriesFromArchive(String pathToData) |
protected abstract Collection |
getImportableItemsFromArchive(String pathToData) |
boolean |
isValidArchive(InputStream fileData) |
ImportDataSource |
parse(InputStream fileData,
String unArchiveLocation) |
protected String |
unzipArchive(InputStream fileData,
String unArchiveLocation) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewParserprotected MimetypesFileTypeMap mimeTypes
protected String pathToData
protected String localArchiveLocation
public boolean isValidArchive(InputStream fileData)
isValidArchive in interface ImportFileParserpublic ImportDataSource parse(InputStream fileData, String unArchiveLocation)
parse in interface ImportFileParserprotected abstract void awakeFromUnzip(String unArchiveLocation)
protected abstract Collection getImportableItemsFromArchive(String pathToData)
protected abstract Collection getCategoriesFromArchive(String pathToData)
protected String unzipArchive(InputStream fileData, String unArchiveLocation)
protected boolean fileExistsInArchive(String pathAndFilename, InputStream archive)
protected Document extractFileAsDOM(String pathAndFilename, InputStream archive)
protected byte[] getBytesFromFile(File file) throws IOException
IOExceptionCopyright © 2005–2019 Sakai Foundation. All rights reserved.