|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgov.noaa.gdsg.xmldbremote.service.BaseHandler
gov.noaa.gdsg.xmldbremote.service.CollectionHandler
Handles the saving and involking of Collection objects.
| Constructor Summary | |
CollectionHandler()
Creates a new instance of CollectionHandler |
|
| Method Summary | |
void |
close(CollectionTransport transport)
Closes the specified collection |
void |
closeAllCollections()
Closes all known collections -- use for cleanup. |
java.lang.String |
createId(CollectionTransport transport)
Creates an Id for the given collection{ |
org.xmldb.api.base.Resource |
createResource(CollectionTransport transport,
java.lang.String id,
java.lang.String type)
Creates a new empty resource with the given id |
protected BaseTransport |
createTransportObject(java.lang.Object object)
Needed by the super class to create the appropriate object |
org.xmldb.api.base.Collection |
getChildCollection(CollectionTransport transport,
java.lang.String name)
Returns the child collection |
int |
getChildCollectionCount(CollectionTransport transport)
Returns whatever is returned by the wrapped Collection. |
org.xmldb.api.base.Collection |
getParentCollection(CollectionTransport transport)
Finds the parent collection for the specified collection |
org.xmldb.api.base.Resource |
getResource(CollectionTransport transport,
java.lang.String id)
Finds the specified resource |
int |
getResourceCount(CollectionTransport transport)
Returns the number of resources in the specified collection by calling the wrapped Collection.getResourceCount() method. |
org.xmldb.api.base.Service |
getService(CollectionTransport transport,
java.lang.String name,
java.lang.String version)
Returns the specified service of the specified name by calling the Collection.getService(java.lang.String, java.lang.String) method. |
org.xmldb.api.base.Service[] |
getServices(CollectionTransport transport)
A wrapper for the Collection.getServices() method. |
boolean |
isOpen(CollectionTransport transport)
Wrapper for the Collection.isOpen() method. |
java.lang.String[] |
listChildCollections(CollectionTransport transport)
Returns a list of collection names naming all child collections of the specified collection by wrapping Collection.listChildCollections(). |
java.lang.String[] |
listResources(CollectionTransport transport)
Returns a list of the ids for all resources store in the specified collection. |
void |
removeResource(CollectionTransport transport,
org.xmldb.api.base.Resource resource)
Removes the resource |
void |
storeResource(CollectionTransport transport,
org.xmldb.api.base.Resource resource)
Stores the provided resource |
| Methods inherited from class gov.noaa.gdsg.xmldbremote.service.BaseHandler |
getAllStoredObjects, getObjectFromSession, nextId, saveForSession |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CollectionHandler()
| Method Detail |
protected BaseTransport createTransportObject(java.lang.Object object)
throws org.xmldb.api.base.XMLDBException
createTransportObject in class BaseHandlerobject - The object to base the transport object on.
org.xmldb.api.base.XMLDBException - All exceptions are rethrown as one.
public void close(CollectionTransport transport)
throws org.xmldb.api.base.XMLDBException
transport - The object representing the collection to close
org.xmldb.api.base.XMLDBException - If the collection object throws an exception...
public java.lang.String createId(CollectionTransport transport)
throws org.xmldb.api.base.XMLDBException
transport - The object representing the collection to close
org.xmldb.api.base.XMLDBException - If Collection.createId() throws one.
public org.xmldb.api.base.Resource createResource(CollectionTransport transport,
java.lang.String id,
java.lang.String type)
throws org.xmldb.api.base.XMLDBException
transport - The object representing the collection to closeid - The id of the new resourcetype - The type of resource to create
org.xmldb.api.base.XMLDBException - If Collection.createResource(java.lang.String, java.lang.String) throws one.
public org.xmldb.api.base.Collection getChildCollection(CollectionTransport transport,
java.lang.String name)
throws org.xmldb.api.base.XMLDBException
transport - The object representing the real object.name - The name of the child collection to get.
org.xmldb.api.base.XMLDBException - If Collectiion#getChildCollection throws one.
public int getChildCollectionCount(CollectionTransport transport)
throws org.xmldb.api.base.XMLDBException
transport - The transport object which represents the actual object.
Collection#getchildCollectionCount returns.
org.xmldb.api.base.XMLDBException - If the wrapped colelction throws an exception.
public org.xmldb.api.base.Collection getParentCollection(CollectionTransport transport)
throws org.xmldb.api.base.XMLDBException
transport - The transport object representin the actual object.
org.xmldb.api.base.XMLDBException - If the wrapped Collection.getParentCollection() object thows something.
public org.xmldb.api.base.Resource getResource(CollectionTransport transport,
java.lang.String id)
throws org.xmldb.api.base.XMLDBException
transport - The transport object representing the real object.id - The id to pass to the wrapped Collection.getResource(java.lang.String) method.
org.xmldb.api.base.XMLDBException - IF the wrapped method throws one.
public int getResourceCount(CollectionTransport transport)
throws org.xmldb.api.base.XMLDBException
Collection.getResourceCount() method.
transport - The object representing the actual object.
org.xmldb.api.base.XMLDBException - If the wrapped method throws one.
public org.xmldb.api.base.Service getService(CollectionTransport transport,
java.lang.String name,
java.lang.String version)
throws org.xmldb.api.base.XMLDBException
Collection.getService(java.lang.String, java.lang.String) method.
transport - The transport representing the actual object.version - The version passed to the wrapped method.name - The name of the service, passed to the wrapped method.
org.xmldb.api.base.XMLDBException - If the wrapped method throws one.
public org.xmldb.api.base.Service[] getServices(CollectionTransport transport)
throws org.xmldb.api.base.XMLDBException
Collection.getServices() method.
transport - The transport object representing the actual object.
org.xmldb.api.base.XMLDBException - Whatever the wrapped method throws.
public boolean isOpen(CollectionTransport transport)
throws org.xmldb.api.base.XMLDBException
Collection.isOpen() method.
transport - The transport object representing the actual object.
org.xmldb.api.base.XMLDBException - Whatever is thrown by the wrapped method.
public java.lang.String[] listChildCollections(CollectionTransport transport)
throws org.xmldb.api.base.XMLDBException
Collection.listChildCollections().
transport - Represents the actual object.
org.xmldb.api.base.XMLDBException - Whatever the wrapped method throws.
public java.lang.String[] listResources(CollectionTransport transport)
throws org.xmldb.api.base.XMLDBException
Collection.listResources().
transport - The transport object which represents the actual object.
org.xmldb.api.base.XMLDBException - Whatever the wrapped method throws.
public void storeResource(CollectionTransport transport,
org.xmldb.api.base.Resource resource)
throws org.xmldb.api.base.XMLDBException
transport - which represents the actual object.resource - Passed to the wrapped method.
org.xmldb.api.base.XMLDBException - Whatever the wrapped method throws.
public void removeResource(CollectionTransport transport,
org.xmldb.api.base.Resource resource)
throws org.xmldb.api.base.XMLDBException
transport - which represents the actual object.resource - passed to the wrapped method.
org.xmldb.api.base.XMLDBException - whatever the wrapped method throws.public void closeAllCollections()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||