|
Xindice API version 1.2m1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xindice.client.xmldb.CommonConfigurable org.apache.xindice.client.xmldb.XindiceCollection
This is a base XML:DB Collection that is extended by all Xindice XML:DB API drivers. It includes the functionality that is common to all drivers and abstract methods for all other driver specific methods. This enables the implementation of drivers in just two classes and the use of common services implementations.
Field Summary | |
protected String |
collPath
Path to the collection on target server |
static String |
QUERY_NS
Xindice query result meta-info namespace |
protected Hashtable |
services
Instantiated named services map |
Constructor Summary | |
XindiceCollection(String collPath)
Creates new CollectionImpl instance representing connection
to server collection. |
Method Summary | |
protected void |
checkOpen()
Throws an exception if collection is no longer open |
abstract org.xmldb.api.base.Collection |
createCollection(String name)
Creates a new child collection in this collection |
abstract org.xmldb.api.base.Collection |
createCollection(String path,
org.w3c.dom.Document configuration)
Creates a new child collection. |
abstract void |
createIndexer(org.w3c.dom.Document configuration)
Creates a new Indexer for this collection. |
org.xmldb.api.base.Resource |
createResource(String name,
String type)
Constructs a new resource that will belong in this collection. |
abstract void |
dropIndexer(String name)
Drops the indexer from the collection |
String |
getCanonicalName()
Returns complete path to collection |
abstract MetaData |
getMetaData(String name)
Returns MetaData object for the specified document or the current
collection |
String |
getName()
Returns the name associated with the Collection instance. |
org.xmldb.api.base.Service |
getService(String name,
String version)
Returns a Service instance for the requested service name and version. |
org.xmldb.api.base.Service[] |
getServices()
Provides a list of all services known to the collection. |
abstract String |
getURI()
Returns XML:DB URI that would retrieve this collection |
abstract boolean |
isOpen()
Checks if the collection is still open. |
abstract String[] |
listIndexers()
Returns a list of all indexers for this collection. |
org.xmldb.api.base.ResourceSet |
query(String queryLang,
String query,
Hashtable nsMap)
Queries the entire collection and resturns the result |
abstract 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 |
registerService(org.xmldb.api.base.Service service)
Registers a new Service with this Collection. |
abstract void |
removeCollection(String name)
Removes child collection from this collection |
abstract void |
setMetaData(String name,
MetaData meta)
Updates MetaData object for the specified document or the current
collection |
abstract void |
shutdown()
Shutsdown the Database instance |
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.Collection |
close, createId, getChildCollection, getChildCollectionCount, getParentCollection, getResource, getResourceCount, listChildCollections, listResources, removeResource, storeResource |
Methods inherited from interface org.xmldb.api.base.Configurable |
getProperty, setProperty |
Field Detail |
public static final String QUERY_NS
protected final Hashtable services
protected final String collPath
Constructor Detail |
public XindiceCollection(String collPath) throws org.xmldb.api.base.XMLDBException
CollectionImpl
instance representing connection
to server collection.
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.Service[] getServices() throws org.xmldb.api.base.XMLDBException
getServices
in interface org.xmldb.api.base.Collection
Service
implementations.
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.Service getService(String name, String version) throws org.xmldb.api.base.XMLDBException
Service
instance for the requested service name and version. If
no Service
exists for those parameters a null value is returned.
getService
in interface org.xmldb.api.base.Collection
name
- Description of Parameterversion
- Description of Parameter
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 registerService(org.xmldb.api.base.Service service) throws org.xmldb.api.base.XMLDBException
service
- Description of Parameter
org.xmldb.api.base.XMLDBException
public abstract boolean isOpen()
isOpen
in interface org.xmldb.api.base.Collection
protected void checkOpen() throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBException
- thrown if collection is closedpublic String getName()
Collection
instance.
getName
in interface org.xmldb.api.base.Collection
public String getCanonicalName()
public abstract String getURI()
public org.xmldb.api.base.Resource createResource(String name, String type) throws org.xmldb.api.base.XMLDBException
storeResource()
.
createResource
in interface org.xmldb.api.base.Collection
name
- Name for the new resource. If it is empty or null
, a name
will be assigned when storing the resource in the database.type
- Type must be either XMLResource
or BinaryResource
.
org.xmldb.api.base.XMLDBException
- thrown in case of an invalid resource type or namepublic org.xmldb.api.base.ResourceSet query(String queryLang, String query, Hashtable nsMap) throws org.xmldb.api.base.XMLDBException
queryLang
- XUpdate
or XPath
query
- the text of the query statementnsMap
- namespace bindings to use when evaluating query
org.xmldb.api.base.XMLDBException
- thrown in case of invalid query or other errorpublic abstract org.xmldb.api.base.ResourceSet query(String name, String queryLang, String query, Hashtable nsMap) throws org.xmldb.api.base.XMLDBException
name
- 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 query
org.xmldb.api.base.XMLDBException
- thrown in case of invalid query or other errorpublic abstract org.xmldb.api.base.Collection createCollection(String name) throws org.xmldb.api.base.XMLDBException
name
- The name for new child collection
org.xmldb.api.base.XMLDBException
- thrown if collection creation fails for some
reasonpublic abstract org.xmldb.api.base.Collection createCollection(String path, org.w3c.dom.Document configuration) throws org.xmldb.api.base.XMLDBException
path
- The path for new child collection
org.xmldb.api.base.XMLDBException
- thrown if collection creation fails for some
reasonpublic abstract void removeCollection(String name) throws org.xmldb.api.base.XMLDBException
name
- name of child collection
org.xmldb.api.base.XMLDBException
- thrown if collection creation fails for some
reasonpublic abstract String[] listIndexers() throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBException
public abstract void createIndexer(org.w3c.dom.Document configuration) throws org.xmldb.api.base.XMLDBException
configuration
- The configuration to use for this indexer.
org.xmldb.api.base.XMLDBException
public abstract void dropIndexer(String name) throws org.xmldb.api.base.XMLDBException
name
- The name of the indexer to drop.
org.xmldb.api.base.XMLDBException
public abstract void shutdown() throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBException
public abstract MetaData getMetaData(String name) throws org.xmldb.api.base.XMLDBException
MetaData
object for the specified document or the current
collection
name
- 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 informationpublic abstract void setMetaData(String name, MetaData meta) throws org.xmldb.api.base.XMLDBException
MetaData
object for the specified document or the current
collection
name
- name of document to update meta, or null
to update meta
of the collection.meta
- meta data object
org.xmldb.api.base.XMLDBException
- thrown if unable to obtain meta information
|
Xindice API version 1.2m1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |