org.gxos
Class DatabaseManager
java.lang.Object
|
+--org.gxos.DatabaseManager
- public class DatabaseManager
- extends java.lang.Object
XML database implementations registered and initialized through this manager.
$Id: DatabaseManager.java,v 1.1 2001/10/19 03:22:10 balsoy Exp $
Method Summary |
static XMLObject |
getDatabase(java.lang.String uri)
Returns a registered and initialized database associated with the
given URI prefix. |
static Database |
initialize(Configuration cfg)
Initializes the context manages with the given configuration settings. |
static Database |
registerDatabase(java.lang.String databaseImplementer)
Registers the database implementation class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatabaseManager
public DatabaseManager()
registerDatabase
public static Database registerDatabase(java.lang.String databaseImplementer)
throws XMLException
- Registers the database implementation class. The parameter must be
a class which implements Database interface.
- Parameters:
databaseImplementer
- class name which implements database features- Throws:
XMLException
- if an error is encountered.
initialize
public static Database initialize(Configuration cfg)
throws XMLException
- Initializes the context manages with the given configuration settings.
- Parameters:
cfg
- Current configuration settings.- Throws:
XMLException
- if an error is encountered.
getDatabase
public static XMLObject getDatabase(java.lang.String uri)
throws XMLException
- Returns a registered and initialized database associated with the
given URI prefix.
- Parameters:
uriPrefix
- URI prefix which will be used to access a database.- Returns:
- the root XML object of the database implementation
if registration and initialization has not failed.
- Throws:
XMLException
- if an error is encountered.