public abstract class ZipFileParser extends Object implements org.sakaiproject.importer.api.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) |
org.sakaiproject.importer.api.ImportDataSource |
parse(InputStream fileData,
String unArchiveLocation) |
protected String |
unzipArchive(InputStream fileData,
String unArchiveLocation) |
protected MimetypesFileTypeMap mimeTypes
protected String pathToData
protected String localArchiveLocation
public boolean isValidArchive(InputStream fileData)
isValidArchive in interface org.sakaiproject.importer.api.ImportFileParserpublic org.sakaiproject.importer.api.ImportDataSource parse(InputStream fileData, String unArchiveLocation)
parse in interface org.sakaiproject.importer.api.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-2014 Sakai Foundation. All Rights Reserved.