org.exist.xmldb
Class DatabaseImpl
java.lang.Object
org.exist.xmldb.DatabaseImpl
- All Implemented Interfaces:
- org.xmldb.api.base.Configurable, org.xmldb.api.base.Database
public class DatabaseImpl
- extends Object
- implements org.xmldb.api.base.Database
The XMLDB driver class for eXist. This driver manages two different
internal implementations. The first communicates with a remote
database using the XMLRPC protocol. The second has direct access
to an embedded database instance running in the same virtual machine.
The driver chooses an implementation depending on the XML:DB URI passed
to getCollection().
When running in embedded mode, the driver can create a new database
instance if none is available yet. It will do so if the property
"create-database" is set to "true" or if there is a system property
"exist.initdb" with value "true".
You may optionally provide the location of an alternate configuration
file through the "configuration" property. The driver is also able to
address different database instances - which may have been installed at
different places.
- Author:
- Wolfgang Meier
|
Field Summary |
static String |
CONF_XML
Default config filename to configure an Instance |
CONF_XML
public static final String CONF_XML
- Default config filename to configure an Instance
- See Also:
- Constant Field Values
DatabaseImpl
public DatabaseImpl()
acceptsURI
public boolean acceptsURI(String uri)
throws org.xmldb.api.base.XMLDBException
- Specified by:
acceptsURI in interface org.xmldb.api.base.Database
- Throws:
org.xmldb.api.base.XMLDBException
acceptsURI
public boolean acceptsURI(XmldbURI xmldbURI)
throws org.xmldb.api.base.XMLDBException
- Throws:
org.xmldb.api.base.XMLDBException
getCollection
public org.xmldb.api.base.Collection getCollection(String uri,
String user,
String password)
throws org.xmldb.api.base.XMLDBException
- Specified by:
getCollection in interface org.xmldb.api.base.Database
- Throws:
org.xmldb.api.base.XMLDBException
getCollection
public org.xmldb.api.base.Collection getCollection(XmldbURI xmldbURI,
String user,
String password)
throws org.xmldb.api.base.XMLDBException
- Throws:
org.xmldb.api.base.XMLDBException
readCollection
public static org.xmldb.api.base.Collection readCollection(String c,
XmlRpcClient rpcClient)
throws org.xmldb.api.base.XMLDBException
- Throws:
org.xmldb.api.base.XMLDBException
setDatabaseShutdownListener
public void setDatabaseShutdownListener(ShutdownListener listener)
throws org.xmldb.api.base.XMLDBException
- Register a ShutdownListener for the current database instance. The ShutdownListener is called
after the database has shut down. You have to register a listener before any calls to getCollection().
- Parameters:
listener -
- Throws:
org.xmldb.api.base.XMLDBException
getConformanceLevel
public String getConformanceLevel()
throws org.xmldb.api.base.XMLDBException
- Specified by:
getConformanceLevel in interface org.xmldb.api.base.Database
- Throws:
org.xmldb.api.base.XMLDBException
getName
public String getName()
throws org.xmldb.api.base.XMLDBException
- Deprecated.
- Specified by:
getName in interface org.xmldb.api.base.Database
- Throws:
org.xmldb.api.base.XMLDBException
getNames
public String[] getNames()
throws org.xmldb.api.base.XMLDBException
- Specified by:
getNames in interface org.xmldb.api.base.Database
- Throws:
org.xmldb.api.base.XMLDBException
getProperty
public String getProperty(String property)
throws org.xmldb.api.base.XMLDBException
- Specified by:
getProperty in interface org.xmldb.api.base.Configurable
- Throws:
org.xmldb.api.base.XMLDBException
setProperty
public void setProperty(String property,
String value)
throws org.xmldb.api.base.XMLDBException
- Specified by:
setProperty in interface org.xmldb.api.base.Configurable
- Throws:
org.xmldb.api.base.XMLDBException
Copyright (C) Wolfgang Meier. All rights reserved.