Interface w3c.tools.store.ContainerInterface
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface w3c.tools.store.ContainerInterface

public interface ContainerInterface
extends Object
The duties assigned to a resource container. A resource container may or may not be a resource itself, in all cases, it must provide the following methods.

Method Index

 o enumerateResourceIdentifiers(boolean)
Enumerate children resource identifiers.
 o getResourceStore(ResourceStoreHolder)
Get the store of that resource container.
 o hasResourceStore()
Does this container manages its children through a ResourceStore ? If the container uses a resource store to hold its children, it must implement properly the getResourceStore method.
 o lookup(String)
Lookup a children in the container.

Methods

 o hasResourceStore
  public abstract boolean hasResourceStore()
Does this container manages its children through a ResourceStore ? If the container uses a resource store to hold its children, it must implement properly the getResourceStore method.

The only reason for a container not to use a resource store to hold its * children, is if these children are created dynamically, or on demand.

Returns:
A boolean, true if the container uses a resource store to hold its children.
 o getResourceStore
  public abstract ResourceStore getResourceStore(ResourceStoreHolder holder)
Get the store of that resource container. Provides access to the underlying store of the container, when possible. The holder is attached to the underlying resource store of the resource container.
Parameters:
holder - The holder to attach to the container's store.
Returns:
A pointer to the underlying store, on success, null on failure.
 o enumerateResourceIdentifiers
  public abstract Enumeration enumerateResourceIdentifiers(boolean all)
Enumerate children resource identifiers.
Parameters:
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).
Returns:
An String enumeration, one element per child.
 o lookup
  public abstract Resource lookup(String name) throws InvalidResourceException
Lookup a children in the container.
Parameters:
name - The name of the children to lookup.
Throws: InvalidResourceException
If the container could not restore the resource from its store.

All Packages  Class Hierarchy  This Package  Previous  Next  Index