org.gcube.portlets.user.homelibrary.util.zip.zipmodel
Class AbstractZipItem

java.lang.Object
  extended by org.gcube.portlets.user.homelibrary.util.zip.zipmodel.AbstractZipItem
All Implemented Interfaces:
ZipItem
Direct Known Subclasses:
ZipFile, ZipFolder

public abstract class AbstractZipItem
extends Object
implements ZipItem

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

Field Summary
protected  String comment
           
protected  byte[] extra
           
protected  String name
           
protected  ZipFolder parent
           
protected  ZipItemType type
           
 
Constructor Summary
AbstractZipItem(String name, ZipItemType type, String comment)
           
AbstractZipItem(ZipFolder parent, String name, ZipItemType type, String comment, byte[] extra)
           
 
Method Summary
 String getComment()
          Return this item comment.
 byte[] getExtra()
          Return this item extra field.
 String getName()
          Return this item name.
 ZipFolder getParent()
          Return this item parent.
 String getPath()
          return this item path.
 ZipItemType getType()
          Return this item type.
 void setName(String name)
          Sets the item name.
 void setParent(ZipFolder parent)
          Set this item parent.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

protected ZipFolder parent

name

protected String name

type

protected ZipItemType type

comment

protected String comment

extra

protected byte[] extra
Constructor Detail

AbstractZipItem

public AbstractZipItem(ZipFolder parent,
                       String name,
                       ZipItemType type,
                       String comment,
                       byte[] extra)
Parameters:
parent - the item parent.
name - the item name.
type - the item type.
comment - the item comment.
extra - the extra field.

AbstractZipItem

public AbstractZipItem(String name,
                       ZipItemType type,
                       String comment)
Parameters:
name - the item name.
type - the item type.
comment - the item comment.
Method Detail

getParent

public ZipFolder getParent()
Return this item parent.

Specified by:
getParent in interface ZipItem
Returns:
the parent, null if is the root.

setParent

public void setParent(ZipFolder parent)
Set this item parent.

Specified by:
setParent in interface ZipItem
Parameters:
parent - the parent.

getComment

public String getComment()
Return this item comment.

Specified by:
getComment in interface ZipItem
Returns:
the item comment.

getExtra

public byte[] getExtra()
Return this item extra field.

Specified by:
getExtra in interface ZipItem
Returns:
the extra field.

getName

public String getName()
Return this item name.

Specified by:
getName in interface ZipItem
Returns:
the item name.

setName

public void setName(String name)
Sets the item name.

Specified by:
setName in interface ZipItem
Parameters:
name - the item name.

getType

public ZipItemType getType()
Return this item type.

Specified by:
getType in interface ZipItem
Returns:
the item type.

getPath

public String getPath()
return this item path.

Specified by:
getPath in interface ZipItem
Returns:
the item path.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.