org.exist.xmldb
Class DatabaseImpl
java.lang.Object
org.exist.xmldb.DatabaseImpl
- public class DatabaseImpl
- extends java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCAL_HOSTNAME
protected static final java.lang.String LOCAL_HOSTNAME
- See Also:
- Constant Field Values
UNKNOWN_CONNECTION
protected static final int UNKNOWN_CONNECTION
- See Also:
- Constant Field Values
LOCAL_CONNECTION
protected static final int LOCAL_CONNECTION
- See Also:
- Constant Field Values
REMOTE_CONNECTION
protected static final int REMOTE_CONNECTION
- See Also:
- Constant Field Values
CONF_XML
public static final java.lang.String CONF_XML
- Default config filename to configure an Instance
- See Also:
- Constant Field Values
autoCreate
protected boolean autoCreate
configuration
protected java.lang.String configuration
currentInstanceName
protected java.lang.String currentInstanceName
shutdown
protected ShutdownListener shutdown
mode
protected int mode
DatabaseImpl
public DatabaseImpl()
acceptsURI
public boolean acceptsURI(java.lang.String uri)
throws XMLDBException
- Throws:
XMLDBException
acceptsURI
public boolean acceptsURI(XmldbURI xmldbURI)
throws XMLDBException
- Throws:
XMLDBException
getCollection
public Collection getCollection(java.lang.String uri,
java.lang.String user,
java.lang.String password)
throws XMLDBException
- Throws:
XMLDBException
getCollection
public Collection getCollection(XmldbURI xmldbURI,
java.lang.String user,
java.lang.String password)
throws XMLDBException
- Throws:
XMLDBException
readCollection
public static Collection readCollection(java.lang.String c,
XmlRpcClient rpcClient)
throws XMLDBException
- Throws:
XMLDBException
setDatabaseShutdownListener
public void setDatabaseShutdownListener(ShutdownListener listener)
throws 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:
XMLDBException
getConformanceLevel
public java.lang.String getConformanceLevel()
throws XMLDBException
- Throws:
XMLDBException
getName
public java.lang.String getName()
throws XMLDBException
- Throws:
XMLDBException
getNames
public java.lang.String[] getNames()
throws XMLDBException
- Throws:
XMLDBException
getProperty
public java.lang.String getProperty(java.lang.String property)
throws XMLDBException
- Throws:
XMLDBException
setProperty
public void setProperty(java.lang.String property,
java.lang.String value)
throws XMLDBException
- Throws:
XMLDBException
<oXygen/>
XML Editor
provides support for editing and debugging XQuery
expressions against the eXist XML Database.