|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.tools.resources.AttributeHolder org.w3c.tools.resources.Resource org.w3c.tools.resources.FramedResource org.w3c.tools.resources.AbstractContainer org.w3c.tools.resources.ContainerResource org.w3c.tools.resources.DirectoryResource org.w3c.jigsaw.zip.ZipDirectoryResource
public class ZipDirectoryResource
Field Summary | |
---|---|
protected static int |
ATTR_ENTRYPATH
Attribute index - The index for our entry path. |
protected static int |
ATTR_ZIPFILE
Attributes index - The filename attribute. |
protected java.util.Hashtable |
directories
|
Fields inherited from class org.w3c.tools.resources.DirectoryResource |
---|
ATTR_DIRECTORY, ATTR_DIRSTAMP, ATTR_EXTENSIBLE, ATTR_INDEXER, ATTR_SHRINKABLE |
Fields inherited from class org.w3c.tools.resources.ContainerResource |
---|
acquired, ATTR_KEY, debug |
Fields inherited from class org.w3c.tools.resources.AbstractContainer |
---|
ur |
Fields inherited from class org.w3c.tools.resources.FramedResource |
---|
ATTR_OID, attrListener, debugEvent, event_disabled, framesRef, structListener |
Fields inherited from class org.w3c.tools.resources.Resource |
---|
ATTR_CONTEXT, ATTR_HELP_URL, ATTR_IDENTIFIER, ATTR_LAST_MODIFIED, ATTR_PARENT, ATTR_RESOURCE_FRAMES, ATTR_STORE_ENTRY, ATTR_URL, co, id |
Fields inherited from class org.w3c.tools.resources.AttributeHolder |
---|
attributes, values |
Constructor Summary | |
---|---|
ZipDirectoryResource()
|
Method Summary | |
---|---|
ResourceReference |
createDirectoryResource(java.lang.String name)
Create a DirectoryResource and the physical directory too. |
ResourceReference |
createResource(java.lang.String name)
Create a Resource and the physical file too. |
protected boolean |
entryExists(java.lang.String name)
|
protected java.util.Enumeration |
enumerateAllResourceIdentifiers()
Enumerate all available children resource identifiers. |
java.util.Enumeration |
enumerateResourceIdentifiers(boolean all)
Enumerate all available children resource identifiers. |
java.lang.String |
getEntryPath()
|
java.io.File |
getZipFile()
Get this zip file. |
boolean |
hasEntry()
|
protected Resource |
index(java.lang.String name,
java.util.Hashtable defs,
RequestInterface req)
Index a Resource. |
void |
initialize(java.lang.Object[] values)
Initialize this directory resource with the given set of attributes. |
void |
reindex()
Reindex recursivly all the resources from this DirectoryResource. |
protected ResourceContext |
updateDefaultChildAttributes(java.util.Hashtable attrs)
Initialize and register a new resource into this directory. |
Methods inherited from class org.w3c.tools.resources.DirectoryResource |
---|
createDefaultResource, createDefaultResource, createResource, delete, getDirectory, getDirStamp, getExtensibleFlag, getIndexedName, getIndexer, getShrinkableFlag, lookup, reindex, resourceRemoved, setValue, unsafeGetDirectory, unsafeGetShrinkableFlag, verify |
Methods inherited from class org.w3c.tools.resources.ContainerResource |
---|
acquireChildren, addResource, delete, deleteChildren, getChildrenSpaceEntry, getClone, getKey, getMatchingCharsCount, getSpaceEntry, internalLookup, lookup, notifyUnload, registerResource, replace, resourceCreated, resourceModified |
Methods inherited from class org.w3c.tools.resources.AbstractContainer |
---|
attributeChanged, enumerateResourceIdentifiers, resourceUnloaded |
Methods inherited from class org.w3c.tools.resources.Resource |
---|
acceptUnload, checkMultipleLock, collectFrames, getContext, getFrame, getFrames, getHelpURL, getHelpURL, getIdentifier, getLastModified, getParent, getResourceReference, getServer, getSpace, getStoreEntry, getURLPath, getValue, getValue, initialize, isInitialized, isUnloaded, pickleValues, setContext, setContext, setValue, unsafeGetContext, unsafeGetFrame, unsafeGetFrames, unsafeGetIdentifier, unsafeGetResourceReference, unsafeGetURLPath, unsafeGetValue, updateAttributes |
Methods inherited from class org.w3c.tools.resources.AttributeHolder |
---|
definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, lookupAttribute, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unsafeDefinesAttribute, unsafeGetDouble, unsafeGetString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int ATTR_ZIPFILE
protected static int ATTR_ENTRYPATH
protected java.util.Hashtable directories
Constructor Detail |
---|
public ZipDirectoryResource()
Method Detail |
---|
public java.io.File getZipFile()
public java.lang.String getEntryPath()
protected java.util.Enumeration enumerateAllResourceIdentifiers()
enumerateAllResourceIdentifiers
in class DirectoryResource
public void reindex()
protected ResourceContext updateDefaultChildAttributes(java.util.Hashtable attrs)
updateDefaultChildAttributes
in class DirectoryResource
resource
- The uninitialized resource to be added.public java.util.Enumeration enumerateResourceIdentifiers(boolean all)
enumerateResourceIdentifiers
in interface ContainerInterface
enumerateResourceIdentifiers
in class DirectoryResource
all
- Should all resources be enumerated ? Resources are often
created on demand only, this flag allows the caller to tell the
container about wether it is interested only in already created
resources, or in all resources (even the one that have not yet been
created).
protected boolean entryExists(java.lang.String name)
protected Resource index(java.lang.String name, java.util.Hashtable defs, RequestInterface req)
index
in class DirectoryResource
name
- The name of the resource to index.defs
- The defaults attributes.req
- The protocol request.
SampleResourceIndexer
public ResourceReference createResource(java.lang.String name)
createResource
in class DirectoryResource
name
- the name of the resource.
public ResourceReference createDirectoryResource(java.lang.String name)
createDirectoryResource
in class DirectoryResource
name
- the name of the resource.
public void initialize(java.lang.Object[] values)
DirectoryResource
initialize
in class DirectoryResource
values
- The attribute values.public boolean hasEntry()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |