org.sakaiproject.importer.impl
Class ZipFileParser
java.lang.Object
org.sakaiproject.importer.impl.ZipFileParser
- All Implemented Interfaces:
- ImportFileParser
- Direct Known Subclasses:
- IMSFileParser
public abstract class ZipFileParser
- extends Object
- implements ImportFileParser
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mimeTypes
protected MimetypesFileTypeMap mimeTypes
pathToData
protected String pathToData
localArchiveLocation
protected String localArchiveLocation
ZipFileParser
public ZipFileParser()
isValidArchive
public boolean isValidArchive(byte[] fileData)
- Specified by:
isValidArchive in interface ImportFileParser
parse
public ImportDataSource parse(byte[] fileData,
String unArchiveLocation)
- Specified by:
parse in interface ImportFileParser
awakeFromUnzip
protected abstract void awakeFromUnzip(String unArchiveLocation)
getImportableItemsFromArchive
protected abstract Collection getImportableItemsFromArchive(String pathToData)
getCategoriesFromArchive
protected abstract Collection getCategoriesFromArchive(String pathToData)
unzipArchive
protected String unzipArchive(byte[] fileData,
String unArchiveLocation)
fileExistsInArchive
protected boolean fileExistsInArchive(String pathAndFilename,
byte[] archive)
extractFileAsDOM
protected Document extractFileAsDOM(String pathAndFilename,
byte[] archive)
getBytesFromFile
protected byte[] getBytesFromFile(File file)
throws IOException
- Throws:
IOException
Copyright © 2005-2012 Sakai Foundation. All Rights Reserved.