org.gxos.xml
Interface Database

All Known Implementing Classes:
ContextManager

public interface Database

XML object database interface.

$Id: Database.java,v 1.2 2001/10/19 03:25:34 balsoy Exp $


Method Summary
 XMLObject getXMLObject(java.lang.String databaseName)
          Retrieves the root XML object for the given name.
 void initialize()
          Initializes the database with current environment variables and default configuration values.
 void initialize(java.util.Hashtable env)
          Initializes the database with the given variables.
 boolean isInitialized()
          Checks if context manager is initialized previously.
 

Method Detail

getXMLObject

public XMLObject getXMLObject(java.lang.String databaseName)
                       throws XMLException
Retrieves the root XML object for the given name. If there is no database under the given name, then a new database is constructed.

Parameters:
databaseName - name of the database to be retrieved or constructed.
Returns:
root XML object of this database.
Throws:
XMLException - if an error is encountered.

isInitialized

public boolean isInitialized()
Checks if context manager is initialized previously.
Returns:
true if initialized correctly; false otherwise.
See Also:
initialize()

initialize

public void initialize()
                throws XMLException
Initializes the database with current environment variables and default configuration values. Configuration file is attemted to be found in the CLASSPATH.

Throws:
XMLException - if the database is already initialized.

initialize

public void initialize(java.util.Hashtable env)
                throws XMLException
Initializes the database with the given variables.

Parameters:
env - Current environment settings. It should include at least "java.naming.factory.initial".
Throws:
XMLException - if the database is already initialized.