DatabaseManager is the entry point for the API and enables you to get the
initial Collection references necessary to do anything useful with the API.
DatabaseManager is intended to be
provided as a concrete implementation in a particular programming
language. Individual language mappings should define the exact syntax and
semantics of its use.
getDatabase(String uri) Retrieves the registered Database instance associated with the provided
URI.
Parameters: uri - The uri containing the database reference.
getDatabases() Returns a list of all available Database implementations
that have been registered with this DatabaseManager.
An array of Database instances.
Deregisters a Database implementation from the DatabaseManager. Once a
Database has been deregistered it can no longer be used to handle
requests.
Parameters: database - The Database instance to deregister. exception: XMLDBException - with expected error codes. ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.
Retreives a Collection instance from the database for the
given URI. The format of the majority of the URI is database
implementation specific however the uri must begin with characters xmldb:
and be followed by the name of the database instance as returned by
Database.getName() and a colon
character. An example would be for the database named "vendordb" the URI
handed to getCollection would look something like the following.
xmldb:vendordb://host:port/path/to/collection. The xmldb:
prefix will be removed from the URI prior to handing the URI to the
Database instance for handling.
Parameters: uri - The database specific URI to use to locate the collection. A Collection instance for the requested collection ornull if the collection could not be found. exception: XMLDBException - with expected error codes. ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur. ErrroCodes.INVALID_URI If the URI is not in a valid format. ErrroCodes.NO_SUCH_DATABASE If a Databaseinstance could not be found to handle the provided URI.
Returns the Core Level conformance value for the provided URI. The current
API defines valid resuls of "0" or "1" as defined in the XML:DB API
specification.
Parameters: uri - The database specific URI to use to locate the collection. The XML:DB Core Level conformance for the uri. exception: XMLDBException - with expected error codes. ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.ErrroCodes.INVALID_URI If the URI is not in a valid format. ErrroCodes.NO_SUCH_DATABASE If a Databaseinstance could not be found to handle the provided URI.
Retrieves the registered Database instance associated with the provided
URI.
Parameters: uri - The uri containing the database reference. the requested Database instance.
Returns a list of all available Database implementations
that have been registered with this DatabaseManager.
An array of Database instances. One for each Database registeredwith the DatabaseManager. If no Databaseinstances exist then an empty array is returned.
Registers a new Database implementation with the
DatabaseManager.
Parameters: database - The database instance to register. exception: XMLDBException - with expected error codes. ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur. ErrorCodes.INVALID_DATABASE if the provided Database instance is invalid.
Removes the URI_PREFIX from the front of the URI. This is so the database
can focus on handling its own URIs.
Parameters: uri - The full URI to strip. The database specific portion of the URI.