|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xindice.client.xmldb.CommonConfigurable | +--org.apache.xindice.client.xmldb.CollectionImpl
Implements the XML:DB API Collection interface for encapsulating access to an XML database collection. This allows you to store/retrieve/delete resources within the database and provides access to other services for the database.
This API is an implementation of the XML:DB API. More information on this API can be found by looking at http://www.xmldb.org/xapi/index.html The Xindice implemenation of Collection makes the following services available to applications.
XMLObjectService
,
DatabaseInstanceManager
,
CollectionManager
Constructor Summary | |
CollectionImpl(Collection collection,
Database db,
DatabaseImpl database)
Creates a new CollectionImpl for the XML:DB API Collection interface. |
Method Summary | |
void |
close()
The close method must be called when access to a collection is complete. |
java.lang.String |
createId()
Creates a new unique ID within the context of the Collection |
Resource |
createResource(java.lang.String id,
java.lang.String type)
Creates a new Resource instance for storing data in the repository. |
java.lang.String |
getCanonicalName()
Returns the fully qualified name of the Collection |
Collection |
getChildCollection(java.lang.String name)
Returns a Collection instance for the requested child collection if it exists. |
int |
getChildCollectionCount()
Returns the number of child Collections |
java.lang.String |
getName()
Returns the name of the Collection |
Collection |
getParentCollection()
Gets the ParentCollection for this Collection if one exists. |
Resource |
getResource(java.lang.String id)
Retrieves the Resource identified by id from the repository. |
int |
getResourceCount()
Returns the number of resources stored by this Collection |
Collection |
getServerObject()
Returns the Xindice underlying collection implementation. |
Service |
getService(java.lang.String name,
java.lang.String version)
Get a Service instance based on the name and version. |
Service[] |
getServices()
Returns the list of Services supported by this Collection. |
boolean |
isOpen()
Returns true if the Collection is open false otherwise. |
java.lang.String[] |
listChildCollections()
Returns a list of Collection names naming all child collections of the current collection. |
java.lang.String[] |
listResources()
Returns a list of the ids for all resources stored in the collection. |
void |
registerService(Service service)
Registers a new Service with this Collection. |
void |
remove()
Frees any server side resources consumed by this collection and releases the server side Servant. |
void |
removeResource(Resource resource)
Removes the provided resource from the repository. |
void |
storeResource(Resource resource)
Stores the Resource in the repository |
Methods inherited from class org.apache.xindice.client.xmldb.CommonConfigurable |
getProperty, setProperty |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xmldb.api.base.Configurable |
getProperty, setProperty |
Constructor Detail |
public CollectionImpl(Collection collection, Database db, DatabaseImpl database) throws XMLDBException
collection
- the Xindice collection to wrapdb
- the Xindice Database instance that the collection is
associated with.database
- XML:DB Database instance for XindiceXMLDBException
- Method Detail |
public java.lang.String getName() throws XMLDBException
getName
in interface Collection
XMLDBException
- public java.lang.String getCanonicalName() throws XMLDBException
XMLDBException
- public Service[] getServices() throws XMLDBException
getServices
in interface Collection
XMLDBException
- public Service getService(java.lang.String name, java.lang.String version) throws XMLDBException
getService
in interface Collection
name
- The Service instance to retrieveversion
- The version of the service to retrieve.XMLDBException
- public Collection getParentCollection() throws XMLDBException
getParentCollection
in interface Collection
XMLDBException
- public int getChildCollectionCount() throws XMLDBException
getChildCollectionCount
in interface Collection
XMLDBException
- public java.lang.String[] listChildCollections() throws XMLDBException
listChildCollections
in interface Collection
XMLDBException
- public Collection getChildCollection(java.lang.String name) throws XMLDBException
getChildCollection
in interface Collection
name
- the name of the child collection to retrieve.XMLDBException
- public int getResourceCount() throws XMLDBException
getResourceCount
in interface Collection
XMLDBException
- public java.lang.String[] listResources() throws XMLDBException
listResources
in interface Collection
XMLDBException
- public Resource getResource(java.lang.String id) throws XMLDBException
getResource
in interface Collection
id
- The unique id for the resourceXMLDBException
- public void registerService(Service service) throws XMLDBException
service
- Description of ParameterXMLDBException
- public Resource createResource(java.lang.String id, java.lang.String type) throws XMLDBException
createResource
in interface Collection
id
- The unique id to use for the created resource.XMLDBException
- public void removeResource(Resource resource) throws XMLDBException
removeResource
in interface Collection
resource
- The resource to remove.XMLDBException
- public void storeResource(Resource resource) throws XMLDBException
storeResource
in interface Collection
resource
- The resource to store.XMLDBException
- public java.lang.String createId() throws XMLDBException
Collection
Collection
createId
in interface Collection
XMLDBException
- public void close() throws XMLDBException
close
in interface Collection
XMLDBException
- public boolean isOpen() throws XMLDBException
Collection
is open false otherwise.isOpen
in interface Collection
Collection
is open, false otherwise.XMLDBException
- public void remove()
remove
in interface ManagedObject
public Collection getServerObject()
|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |