|
Xindice API version 1.1 |
||||||||
| 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.XindiceCollection
|
+--org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl
Implementation of XML:DB's Collection interface using
XML-RPC to interact with database server
| Fields inherited from class org.apache.xindice.client.xmldb.XindiceCollection |
collPath, QUERY_NS, services |
| Fields inherited from class org.apache.xindice.client.xmldb.CommonConfigurable |
config |
| Constructor Summary | |
CollectionImpl(org.apache.xmlrpc.XmlRpcClient client,
String collPath)
Creates new CollectionImpl instance representing connection
to server collection. |
|
| Method Summary | |
void |
close()
Releases all resources consumed by the Collection. |
org.xmldb.api.base.Collection |
createCollection(String name)
Creates a new child collection in this collection |
org.xmldb.api.base.Collection |
createCollection(String path,
org.w3c.dom.Document configuration)
Creates a new child collection. |
String |
createId()
Creates a new unique ID within the context of the Collection |
void |
createIndexer(org.w3c.dom.Document configuration)
Creates a new Indexer for this collection. |
void |
dropIndexer(String name)
Drops the indexer from the collection |
org.xmldb.api.base.Collection |
getChildCollection(String name)
Returns a Collection instance for the requested child collection
if it exists. |
int |
getChildCollectionCount()
Returns the number of child collections under this Collection or 0 if no child collections exist. |
MetaData |
getMetaData(String id)
Returns MetaData object for the specified document or the current
collection |
org.xmldb.api.base.Collection |
getParentCollection()
Returns the parent collection for this collection or null if no parent collection exists. |
org.xmldb.api.base.Resource |
getResource(String id)
Retrieves a Resource from the database. |
int |
getResourceCount()
Returns the number of resources currently stored in this collection or 0 if the collection is empty. |
String |
getURI()
Returns XML:DB URI that would retrieve this collection |
boolean |
isOpen()
Checks if the collection is still open. |
String[] |
listChildCollections()
Returns a list of collection names naming all child collections of the current collection. |
String[] |
listIndexers()
Returns a list of all indexers for this collection. |
String[] |
listResources()
Returns a list of the ids for all resources stored in the collection. |
org.xmldb.api.base.ResourceSet |
query(String name,
String queryLang,
String query,
Hashtable nsMap)
Queries a specific document or the entire collection and returns result |
void |
removeCollection(String childName)
Removes child collection from this collection |
void |
removeResource(org.xmldb.api.base.Resource res)
Removes the Resource from the database. |
void |
setMetaData(String id,
MetaData meta)
Updates MetaData object for the specified document or the current
collection |
void |
shutdown()
Shutsdown the Database instance |
void |
storeResource(org.xmldb.api.base.Resource res)
Stores the provided resource into the database. |
| Methods inherited from class org.apache.xindice.client.xmldb.XindiceCollection |
checkOpen, createResource, getCanonicalName, getName, getService, getServices, query, registerService |
| Methods inherited from class org.apache.xindice.client.xmldb.CommonConfigurable |
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 |
| Constructor Detail |
public CollectionImpl(org.apache.xmlrpc.XmlRpcClient client,
String collPath)
throws org.xmldb.api.base.XMLDBException
CollectionImpl instance representing connection
to server collection.client - XML-RPC client connected to the Xindice XML-RPC server.collPath - is the name of the collection to open.org.xmldb.api.base.XMLDBException - thrown if a connection could not be established,
because of URL syntax errors, or connection failure, or if no
collection with path collPath could be located.| Method Detail |
public org.xmldb.api.base.Resource getResource(String id)
throws org.xmldb.api.base.XMLDBException
Resource from the database. If the
Resource could not be
located a null value will be returned.id - the unique id for the requested resource.Resource instance.org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collection
public int getResourceCount()
throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collection
public void storeResource(org.xmldb.api.base.Resource res)
throws org.xmldb.api.base.XMLDBException
res - the resource to store in the database.org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.INVALID_RESOURCE if the Resource is
not valid.
ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collectionpublic boolean isOpen()
XindiceCollectionisOpen in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionpublic String getURI()
XindiceCollectiongetURI in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollection
public org.xmldb.api.base.Collection getChildCollection(String name)
throws org.xmldb.api.base.XMLDBException
Collection instance for the requested child collection
if it exists.name - the name of the child collection to retrieve.org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collection
public String createId()
throws org.xmldb.api.base.XMLDBException
Collectionorg.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collection
public void close()
throws org.xmldb.api.base.XMLDBException
Collection.
The close method must
always be called when use of a Collection is complete. It is
not safe to use a Collection after the close
method has been called.org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public org.xmldb.api.base.Collection getParentCollection()
throws org.xmldb.api.base.XMLDBException
Collection instance.org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collection
public void removeResource(org.xmldb.api.base.Resource res)
throws org.xmldb.api.base.XMLDBException
Resource from the database.res - the resource to remove.org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.INVALID_RESOURCE if the Resource is
not valid.ErrorCodes.NO_SUCH_RESOURCE if the Resource is
not known to this Collection.
ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collection
public String[] listChildCollections()
throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collection
public int getChildCollectionCount()
throws org.xmldb.api.base.XMLDBException
Collection or 0 if no child collections exist.org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collection
public String[] listResources()
throws org.xmldb.api.base.XMLDBException
Resources in the collection.org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.COLLECTION_CLOSED if the close
method has been called on the Collection
public org.xmldb.api.base.ResourceSet query(String name,
String queryLang,
String query,
Hashtable nsMap)
throws org.xmldb.api.base.XMLDBException
XindiceCollectionquery in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionname - name of document to query, or null to query
entire collection.queryLang - XUpdate or XPath.query - the text of the query statementnsMap - namespace bindings to use when evaluating queryorg.xmldb.api.base.XMLDBException - thrown in case of invalid query or other error
public org.xmldb.api.base.Collection createCollection(String name)
throws org.xmldb.api.base.XMLDBException
XindiceCollectioncreateCollection in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionname - The name for new child collectionorg.xmldb.api.base.XMLDBException - thrown if collection creation fails for some
reason
public org.xmldb.api.base.Collection createCollection(String path,
org.w3c.dom.Document configuration)
throws org.xmldb.api.base.XMLDBException
XindiceCollectioncreateCollection in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionpath - The path for new child collectionorg.xmldb.api.base.XMLDBException - thrown if collection creation fails for some
reason
public void removeCollection(String childName)
throws org.xmldb.api.base.XMLDBException
XindiceCollectionremoveCollection in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionname - name of child collectionorg.xmldb.api.base.XMLDBException - thrown if collection creation fails for some
reason
public String[] listIndexers()
throws org.xmldb.api.base.XMLDBException
XindiceCollectionlistIndexers in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionorg.xmldb.api.base.XMLDBException -
public void createIndexer(org.w3c.dom.Document configuration)
throws org.xmldb.api.base.XMLDBException
XindiceCollectioncreateIndexer in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionconfiguration - The configuration to use for this indexer.org.xmldb.api.base.XMLDBException -
public void dropIndexer(String name)
throws org.xmldb.api.base.XMLDBException
XindiceCollectiondropIndexer in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionname - The name of the indexer to drop.org.xmldb.api.base.XMLDBException -
public void shutdown()
throws org.xmldb.api.base.XMLDBException
XindiceCollectionshutdown in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionorg.xmldb.api.base.XMLDBException -
public MetaData getMetaData(String id)
throws org.xmldb.api.base.XMLDBException
XindiceCollectionMetaData object for the specified document or the current
collectiongetMetaData in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionname - name of document to get meta, or null to get meta
of the collection.org.xmldb.api.base.XMLDBException - thrown if unable to obtain meta information
public void setMetaData(String id,
MetaData meta)
throws org.xmldb.api.base.XMLDBException
XindiceCollectionMetaData object for the specified document or the current
collectionsetMetaData in class XindiceCollectionorg.apache.xindice.client.xmldb.XindiceCollectionname - name of document to update meta, or null to update meta
of the collection.meta - meta data objectorg.xmldb.api.base.XMLDBException - thrown if unable to obtain meta information
|
Xindice API version 1.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||