|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.noaa.eds.xapi.generic.GenericConfigurable
gov.noaa.eds.xapi.generic.GenericCollection
An implementation of Collection which uses a hashtable to map resource ids to resource objects.
Field Summary | |
(package private) int |
nextId
|
(package private) java.lang.Object |
nextIdMutex
|
Fields inherited from class gov.noaa.eds.xapi.generic.GenericConfigurable |
properties |
Constructor Summary | |
GenericCollection()
Creates a new instance of ListCollection |
Method Summary | |
void |
close()
Does nothing, it never closes. |
java.lang.String |
createId()
Returns a random number that is not currently taken. |
org.xmldb.api.base.Resource |
createResource(java.lang.String str,
java.lang.String str1)
Not implemented, throws Exception |
org.xmldb.api.base.Collection |
getChildCollection(java.lang.String str)
Not implemented, just throws an exception |
int |
getChildCollectionCount()
Not implemented, thorws Exception |
java.lang.String |
getName()
Return the name of this collection |
org.xmldb.api.base.Collection |
getParentCollection()
Exception thrown |
org.xmldb.api.base.Resource |
getResource(java.lang.String id)
Returns a resource if it is in the resources hash |
int |
getResourceCount()
Returns the number of resources |
org.xmldb.api.base.Service |
getService(java.lang.String name,
java.lang.String version)
Returns the available service with the specified name and version. |
org.xmldb.api.base.Service[] |
getServices()
Returns all know services of this collection |
protected void |
initServices()
|
boolean |
isOpen()
Always open |
java.lang.String[] |
listChildCollections()
throws exceptioin |
java.lang.String[] |
listResources()
Returns a list of Resource ids |
void |
removeResource(org.xmldb.api.base.Resource resource)
Removes the resource from the hash of resources |
void |
setName(java.lang.String name)
Set the name of this collection |
void |
storeResource(org.xmldb.api.base.Resource resource)
Store the resource in the collection |
Methods inherited from class gov.noaa.eds.xapi.generic.GenericConfigurable |
getProperty, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xmldb.api.base.Configurable |
getProperty, setProperty |
Field Detail |
int nextId
java.lang.Object nextIdMutex
Constructor Detail |
public GenericCollection()
Method Detail |
protected void initServices()
public org.xmldb.api.base.Collection getChildCollection(java.lang.String str) throws org.xmldb.api.base.XMLDBException
getChildCollection
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
- all the timepublic org.xmldb.api.base.Resource getResource(java.lang.String id) throws org.xmldb.api.base.XMLDBException
getResource
in interface org.xmldb.api.base.Collection
id
- The id of the resource to retrieve
org.xmldb.api.base.XMLDBException
public void storeResource(org.xmldb.api.base.Resource resource) throws org.xmldb.api.base.XMLDBException
storeResource
in interface org.xmldb.api.base.Collection
resource
- The resource to store
org.xmldb.api.base.XMLDBException
public void removeResource(org.xmldb.api.base.Resource resource) throws org.xmldb.api.base.XMLDBException
removeResource
in interface org.xmldb.api.base.Collection
resource
- The resource to remove
org.xmldb.api.base.XMLDBException
public java.lang.String[] listResources()
listResources
in interface org.xmldb.api.base.Collection
public void close()
close
in interface org.xmldb.api.base.Collection
public java.lang.String createId()
createId
in interface org.xmldb.api.base.Collection
public org.xmldb.api.base.Resource createResource(java.lang.String str, java.lang.String str1) throws org.xmldb.api.base.XMLDBException
createResource
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public int getChildCollectionCount() throws org.xmldb.api.base.XMLDBException
getChildCollectionCount
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
- with a NOT_IMPLEMENTED codepublic java.lang.String getName()
getName
in interface org.xmldb.api.base.Collection
public void setName(java.lang.String name)
name
- The name of this collection.public org.xmldb.api.base.Collection getParentCollection() throws org.xmldb.api.base.XMLDBException
getParentCollection
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
- with a NOT_IMPELEMNTED codepublic int getResourceCount()
getResourceCount
in interface org.xmldb.api.base.Collection
public org.xmldb.api.base.Service getService(java.lang.String name, java.lang.String version) throws org.xmldb.api.base.XMLDBException
getService
in interface org.xmldb.api.base.Collection
name
- The name of the service, like "XPathQueryService"version
- The version of the service, like "1.0"
org.xmldb.api.base.XMLDBException
- if there is not a service that matches the
requested servicepublic org.xmldb.api.base.Service[] getServices()
getServices
in interface org.xmldb.api.base.Collection
public boolean isOpen()
isOpen
in interface org.xmldb.api.base.Collection
public java.lang.String[] listChildCollections() throws org.xmldb.api.base.XMLDBException
listChildCollections
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |