org.gcube.portlets.user.homelibrary.util.zip
Class ZipFileModelExtractor

java.lang.Object
  extended by org.gcube.portlets.user.homelibrary.util.zip.ZipFileModelExtractor

public class ZipFileModelExtractor
extends Object

Utility class for ZipModel extractions. Extracts the model from an InputStream.

Author:
Federico De Faveri defaveri@isti.cnr.it

Field Summary
protected  org.apache.log4j.Logger logger
           
protected  Map<String,ZipItem> pathItemMap
           
protected  ZipInputStream zis
           
 
Constructor Summary
ZipFileModelExtractor(InputStream is)
           
 
Method Summary
protected  List<ZipItem> assignParents()
           
protected  ZipFolder createPath(String path)
           
 List<ZipItem> getModel()
          Returns the model from the zip file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.apache.log4j.Logger logger

pathItemMap

protected Map<String,ZipItem> pathItemMap

zis

protected ZipInputStream zis
Constructor Detail

ZipFileModelExtractor

public ZipFileModelExtractor(InputStream is)
Parameters:
is - the zip input stream.
Method Detail

getModel

public List<ZipItem> getModel()
                       throws IOException
Returns the model from the zip file.

Returns:
the model.
Throws:
IOException - if an error occurs.

assignParents

protected List<ZipItem> assignParents()

createPath

protected ZipFolder createPath(String path)


Copyright © 2013. All Rights Reserved.