org.w3c.tools.resources
Interface ResourceSpace

All Known Implementing Classes:
ResourceStoreManager

public interface ResourceSpace


Method Summary
 void acquireChildren(SpaceEntry sentry)
          Acquire the children of the resource.
 void acquireChildren(SpaceEntry sentry, java.io.File repository, boolean transientFlag)
          acquire children from an external file.
 ResourceReference addResource(SpaceEntry sentry, Resource resource, java.util.Hashtable defs)
          Add this resource to the space.
 void checkpoint()
          Checkpoint all modified resource, by saving them to disk.
 void deleteChildren(SpaceEntry sentry)
          Delete all the children of resource indentified by its space entry.
 void deleteResource(SpaceEntry sentry, Resource resource)
          Delete this resource from the space.
 java.util.Enumeration enumerateResourceIdentifiers(SpaceEntry sentry)
          Enumerate the name (ie identifiers) of the resource children identified by its space entry.
 ResourceEventQueue getEventQueue()
           
 ResourceReference loadResource(SpaceEntry sentry, java.lang.String identifier, java.util.Hashtable defs)
          Restore the resource whose name is given.
 ResourceReference loadRootResource(java.lang.String identifier, java.util.Hashtable defs)
          Restore the resource whose name is given from the root.
 ResourceReference lookupResource(SpaceEntry sentry, java.lang.String identifier)
          Lookup this resource.
 void markModified(SpaceEntry sentry, Resource resource)
          Mark the given resource as being modified.
 void renameResource(SpaceEntry sentry, java.lang.String oldid, java.lang.String newid)
          Rename a resource in this resource space.
 void saveChildren(SpaceEntry sentry)
          Save all the children of the resource indentified by its spaec entry.
 void saveResource(SpaceEntry sentry, Resource resource)
          Save this resource to the space.
 void shutdown()
          Shutdown this resource space.
 

Method Detail

getEventQueue

ResourceEventQueue getEventQueue()

shutdown

void shutdown()
Shutdown this resource space. Go through all entries, and shut them down.


checkpoint

void checkpoint()
Checkpoint all modified resource, by saving them to disk.


loadRootResource

ResourceReference loadRootResource(java.lang.String identifier,
                                   java.util.Hashtable defs)
Restore the resource whose name is given from the root.

Parameters:
identifier - The identifier of the resource to restore.
defs - Default attribute values.

lookupResource

ResourceReference lookupResource(SpaceEntry sentry,
                                 java.lang.String identifier)
Lookup this resource.

Parameters:
sentry - The resource space entry.
identifier - The resource identifier.
Returns:
A Resource instance, or null if either the resource doesn't exist, or it isn't loaded yet.

loadResource

ResourceReference loadResource(SpaceEntry sentry,
                               java.lang.String identifier,
                               java.util.Hashtable defs)
Restore the resource whose name is given.

Parameters:
sentry - The resource space entry.
identifier - The identifier of the resource to restore.
defs - Default attribute values.

addResource

ResourceReference addResource(SpaceEntry sentry,
                              Resource resource,
                              java.util.Hashtable defs)
Add this resource to the space.

Parameters:
sentry - The resource space entry.
resource - The resource to add.
defs - Default attribute values.

saveResource

void saveResource(SpaceEntry sentry,
                  Resource resource)
Save this resource to the space.

Parameters:
sentry - The resource space entry.
resource - The resource to save.

markModified

void markModified(SpaceEntry sentry,
                  Resource resource)
Mark the given resource as being modified.

Parameters:
sentry - The resource space entry.
resource - The resource to mark as modified.

renameResource

void renameResource(SpaceEntry sentry,
                    java.lang.String oldid,
                    java.lang.String newid)
Rename a resource in this resource space.

Parameters:
sentry - The resource space entry.
oldid - The old resorce identifier.
newid - The new resorce identifier.

deleteResource

void deleteResource(SpaceEntry sentry,
                    Resource resource)
Delete this resource from the space.

Parameters:
sentry - The resource space entry.
resource - The resource to delete.

deleteChildren

void deleteChildren(SpaceEntry sentry)
Delete all the children of resource indentified by its space entry.

Parameters:
sentry - The resource space entry

saveChildren

void saveChildren(SpaceEntry sentry)
Save all the children of the resource indentified by its spaec entry.

Parameters:
sentry - The resource space entry

acquireChildren

void acquireChildren(SpaceEntry sentry)
Acquire the children of the resource.

Parameters:
sentry - The resource space entry.

acquireChildren

void acquireChildren(SpaceEntry sentry,
                     java.io.File repository,
                     boolean transientFlag)
acquire children from an external file.

Parameters:
sentry - The resource space entry.
repository - The file used to store children.

enumerateResourceIdentifiers

java.util.Enumeration enumerateResourceIdentifiers(SpaceEntry sentry)
Enumerate the name (ie identifiers) of the resource children identified by its space entry.

Parameters:
sentry - The space entry.
Returns:
An enumeration, providing one element per child, which is the name of the child, as a String.