All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.jigsaw.zip.ZipDirectoryResource

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
extends DirectoryResource

Variable Index

 o ATTR_ENTRYPATH
Attribute index - The index for our entry path.
 o ATTR_ZIPFILE
Attributes index - The filename attribute.
 o directories

Constructor Index

 o ZipDirectoryResource()

Method Index

 o createDirectoryResource(String)
Create a DirectoryResource and the physical directory too.
 o createResource(String)
Create a Resource and the physical file too.
 o entryExists(String)
 o enumerateAllResourceIdentifiers()
Enumerate all available children resource identifiers.
 o enumerateResourceIdentifiers(boolean)
Enumerate all available children resource identifiers.
 o getEntryPath()
 o getZipFile()
Get this zip file.
 o index(String, Hashtable, RequestInterface)
Index a Resource.
 o initialize(Object[])
Initialize this directory resource with the given set of attributes.
 o reindex()
Reindex recursivly all the resources from this DirectoryResource.
 o updateDefaultChildAttributes(Hashtable)
Initialize and register a new resource into this directory.

Variables

 o ATTR_ZIPFILE
 protected static int ATTR_ZIPFILE
Attributes index - The filename attribute.

 o ATTR_ENTRYPATH
 protected static int ATTR_ENTRYPATH
Attribute index - The index for our entry path.

 o directories
 protected Hashtable directories

Constructors

 o ZipDirectoryResource
 public ZipDirectoryResource()

Methods

 o getZipFile
 public synchronized File getZipFile()
Get this zip file.

 o getEntryPath
 public String getEntryPath()
 o enumerateAllResourceIdentifiers
 protected synchronized Enumeration enumerateAllResourceIdentifiers()
Enumerate all available children resource identifiers. This method requires that we create all our pending resources.

Returns:
An enumeration of all our resources.
Overrides:
enumerateAllResourceIdentifiers in class DirectoryResource
 o reindex
 public synchronized void reindex()
Reindex recursivly all the resources from this DirectoryResource.

Overrides:
reindex in class DirectoryResource
 o updateDefaultChildAttributes
 protected ResourceContext updateDefaultChildAttributes(Hashtable attrs)
Initialize and register a new resource into this directory.

Parameters:
resource - The uninitialized resource to be added.
Overrides:
updateDefaultChildAttributes in class DirectoryResource
 o enumerateResourceIdentifiers
 public synchronized Enumeration enumerateResourceIdentifiers(boolean all)
Enumerate all available children resource identifiers. This method requires that we create all our pending resources if we are in the extensible mode...too bad !

Returns:
An enumeration of all our resources.
Overrides:
enumerateResourceIdentifiers in class DirectoryResource
 o entryExists
 protected boolean entryExists(String name)
 o index
 protected Resource index(String name,
                          Hashtable defs,
                          RequestInterface req)
Index a Resource. Call the indexer.

Parameters:
name - The name of the resource to index.
defs - The defaults attributes.
req - The protocol request.
Returns:
A resource instance.
Overrides:
index in class DirectoryResource
See Also:
SampleResourceIndexer
 o createResource
 public ResourceReference createResource(String name)
Create a Resource and the physical file too.

Parameters:
name - the name of the resource.
Returns:
A ResourceReference instance.
Overrides:
createResource in class DirectoryResource
 o createDirectoryResource
 public ResourceReference createDirectoryResource(String name)
Create a DirectoryResource and the physical directory too.

Parameters:
name - the name of the resource.
Returns:
A ResourceReference instance.
Overrides:
createDirectoryResource in class DirectoryResource
 o initialize
 public void initialize(Object values[])
Initialize this directory resource with the given set of attributes.

Overrides:
initialize in class DirectoryResource

All Packages  Class Hierarchy  This Package  Previous  Next  Index