Package org.restlet.engine.local
Class ZipEntryEntity
- java.lang.Object
-
- org.restlet.engine.local.Entity
-
- org.restlet.engine.local.ZipEntryEntity
-
public class ZipEntryEntity extends Entity
Local entity based on an entry in a Zip archive.
-
-
Constructor Summary
Constructors Constructor Description ZipEntryEntity(java.util.zip.ZipFile zipFile, java.lang.String entryName, MetadataService metadataService)Constructor.ZipEntryEntity(java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry entry, MetadataService metadataService)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists()Indicates if the entity does exist.java.util.List<Entity>getChildren()Returns the list of contained entities if the current entity is a directory, null otherwise.java.lang.StringgetName()Returns the name.EntitygetParent()Returns the parent directory (if any).RepresentationgetRepresentation(MediaType defaultMediaType, int timeToLive)Returns a representation of this local entity.booleanisDirectory()Indicates if the entity is a directory.booleanisNormal()Indicates if the entity is a normal entity, especially if it is not a directory.-
Methods inherited from class org.restlet.engine.local.Entity
getBaseName, getBaseName, getExtensions, getExtensions, getExtensions, getMetadataService, getVariant, updateMetadata
-
-
-
-
Constructor Detail
-
ZipEntryEntity
public ZipEntryEntity(java.util.zip.ZipFile zipFile, java.lang.String entryName, MetadataService metadataService)Constructor.- Parameters:
zipFile- The Zip file.entryName- The Zip entry name.metadataService- The metadata service to use.
-
ZipEntryEntity
public ZipEntryEntity(java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry entry, MetadataService metadataService)Constructor.- Parameters:
zipFile- The Zip file.entry- The Zip entry.metadataService- The metadata service to use.
-
-
Method Detail
-
exists
public boolean exists()
Description copied from class:EntityIndicates if the entity does exist.
-
getChildren
public java.util.List<Entity> getChildren()
Description copied from class:EntityReturns the list of contained entities if the current entity is a directory, null otherwise.- Specified by:
getChildrenin classEntity- Returns:
- The list of contained entities.
-
getName
public java.lang.String getName()
Description copied from class:EntityReturns the name.
-
getParent
public Entity getParent()
Description copied from class:EntityReturns the parent directory (if any).
-
getRepresentation
public Representation getRepresentation(MediaType defaultMediaType, int timeToLive)
Description copied from class:EntityReturns a representation of this local entity.- Specified by:
getRepresentationin classEntity- Returns:
- A representation of this entity.
-
isDirectory
public boolean isDirectory()
Description copied from class:EntityIndicates if the entity is a directory.- Specified by:
isDirectoryin classEntity- Returns:
- True if the entity is a directory.
-
-