|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.api.xmldb.BXDatabase
public final class BXDatabase
Implementation of the Database Interface for the XMLDB:API.
| Field Summary |
|---|
| Fields inherited from interface org.basex.api.xmldb.BXXMLDBText |
|---|
CONFORMANCE_LEVEL, DBURI, ERR_BINARY, ERR_CONT, ERR_DOC, ERR_EMPTY, ERR_ID, ERR_INV, ERR_ITER, ERR_NSURI, ERR_PROP, ERR_RES, ERR_TYPE, ERR_UNKNOWN, ERR_URI, LOCALHOST, XMLDB, XMLDBURI |
| Constructor Summary | |
|---|---|
BXDatabase()
|
|
| Method Summary | |
|---|---|
boolean |
acceptsURI(java.lang.String uri)
acceptsURI determines whether this Database implementation
can handle the URI. |
Collection |
getCollection(java.lang.String uri,
java.lang.String username,
java.lang.String password)
Retrieves a Collection instance based on the URI provided
in the uri parameter. |
java.lang.String |
getConformanceLevel()
Returns the XML:DB API Conformance level for the implementation. |
java.lang.String |
getName()
Returns the name associated with the Database instance. |
java.lang.String |
getProperty(java.lang.String key)
Returns the value of the property identified by name. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets the property name to have the value provided in
value. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BXDatabase()
| Method Detail |
|---|
public boolean acceptsURI(java.lang.String uri)
throws XMLDBException
DatabaseDatabase implementation
can handle the URI. It should return true
if the Database instance knows how to handle the URI and false otherwise.
acceptsURI in interface Databaseuri - the URI to check for.
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.
public Collection getCollection(java.lang.String uri,
java.lang.String username,
java.lang.String password)
throws XMLDBException
DatabaseCollection instance based on the URI provided
in the uri parameter. The format of the URI is defined in the
documentation for DatabaseManager.getCollection().
Authentication is handled via username and password however it is not
required that the database support authentication. Databases that do not
support authentication MUST ignore the
username and password if those provided are not
null.
getCollection in interface Databaseuri - the URI to use to locate the collection.username - the Username to use to locate the collection.password - The password to use for authentication to the database or
null if the database does not support authentication.
Collection instance for the requested collection or
null if the collection could not be found.
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. ErrroCodes.PERMISSION_DENIED If the username
and password were not accepted by the database.public java.lang.String getConformanceLevel()
Database
getConformanceLevel in interface Databasepublic java.lang.String getName()
Database
getName in interface Databasepublic java.lang.String getProperty(java.lang.String key)
Configurablename.
getProperty in interface Configurablekey - the name of the property to retrieve.
public void setProperty(java.lang.String key,
java.lang.String value)
throws XMLDBException
Configurablename to have the value provided in
value.
setProperty in interface Configurablekey - the name of the property to set.value - the value to set for the property.
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||