|
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.DatabaseImpl
DatabaseImpl is the XML:DB driver implementation for Xindice. It is the entry point into the Xindice server but is not intended for direct use by users. Users access it indirectly through the XML:DB DatabaseManager implementation.
This API is an implementation of the XML:DB API. More information on this API can be found by looking at http://xmldb-org.sourceforge.net/xapi/index.html
This implementation simply acts as a proxy for the protocol specific API implementations.
Field Summary | |
static String |
CONFORMANCE_LEVEL
The XML:DB API Core Level Conformance of this implementation. |
protected org.xmldb.api.base.Database |
driver
|
static String |
EMBED_URI
|
static String |
INSTANCE_NAME
Name used in the uri for collections associated with this instance. |
static String |
MANAGED_URI
|
static String |
XMLRPC_URI
These are the URI prefixes this proxy impl understands. |
Constructor Summary | |
DatabaseImpl()
Constructor for the DatabaseImpl object |
Method Summary | |
boolean |
acceptsURI(String uri)
Determines whether this Database implementation can handle
the URI. |
protected void |
createDriver(String uri)
|
org.xmldb.api.base.Collection |
getCollection(String uri,
String username,
String password)
Creates a Collection instance using the URI to locate the collection in the Xindice instance. |
String |
getConformanceLevel()
Returns the XML:DB API Conformance level for the implementation. |
String |
getName()
Returns the prefix used in XML:DB to denote URI's that this driver can handle. |
String[] |
getNames()
Returns an array of names associated with the Database instance. |
protected boolean |
knownPrefix(String uri)
|
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 |
Field Detail |
protected org.xmldb.api.base.Database driver
public static final String XMLRPC_URI
public static final String EMBED_URI
public static final String MANAGED_URI
public static final String INSTANCE_NAME
public static final String CONFORMANCE_LEVEL
Constructor Detail |
public DatabaseImpl()
Method Detail |
public String getName() throws org.xmldb.api.base.XMLDBException
getName
in interface org.xmldb.api.base.Database
org.xmldb.api.base.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public String[] getNames() throws org.xmldb.api.base.XMLDBException
getNames
in interface org.xmldb.api.base.Database
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 getCollection(String uri, String username, String password) throws org.xmldb.api.base.XMLDBException
DatabaseManager.getCollection(String, String, String)
.
The URI format accepted by this method:
xindice://[Database Host]/[Database Instance Name]/[Collection Path]
Database host is optional.
This usually looks something like this:
xindice:///db/root/ocs
or
xindice://some.host.com:8309/db/root/ocs
When you pass the URI to DatabaseManager.getCollection(uri) you must
prepend an xmldb:
to the beginning to make it a valid XML:DB URI.
So to normal users of the API URIs will look like this:
xmldb:xindice:///db/root/ocs
. DatabaseManager will strip the
xmldb:
before handing the URI to this getCollection implementation.
getCollection
in interface org.xmldb.api.base.Database
uri
- The URI specifing the location of the collection.
org.xmldb.api.base.XMLDBException
public String getConformanceLevel() throws org.xmldb.api.base.XMLDBException
getConformanceLevel
in interface org.xmldb.api.base.Database
org.xmldb.api.base.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public boolean acceptsURI(String uri) throws org.xmldb.api.base.XMLDBException
Database
implementation can handle
the URI. It should return true if the Database instance knows how to
handle the URI and false otherwise.
This method is called by org.xmldb.api.base.DatabaseManager.
acceptsURI
in interface org.xmldb.api.base.Database
uri
- the URI to check for.
org.xmldb.api.base.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.ErrroCodes.INVALID_URI
If the URI is not in a valid format. for a description of the URI's format
protected void createDriver(String uri) throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBException
protected boolean knownPrefix(String uri)
|
Xindice API version 1.2m1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |