Xindice API
version 1.1b3

org.apache.xindice.client.xmldb.managed
Class ManagedDatabaseImpl

java.lang.Object
  |
  +--org.apache.xindice.client.xmldb.CommonConfigurable
        |
        +--org.apache.xindice.client.xmldb.managed.ManagedDatabaseImpl
All Implemented Interfaces:
org.xmldb.api.base.Configurable, org.xmldb.api.base.Database

public class ManagedDatabaseImpl
extends CommonConfigurable
implements org.xmldb.api.base.Database

The xindice-managed is a xindice client driver that requires third party code to create the database within the constraints of the client classloader. Typically it is used in embedded environments where database creation is managed by the third party code. The driver will look for a database with the name passed in the constructor. If the no argument constructor is used then the name defaults to 'db' though this can be changed by setting DATABASE_NAME_PROPERTY system property. This driver will throw an exception if the database instance hasn't been registered.

Version:
CVS $Revision: 1.6 $, $Date: 2003/12/11 11:48:54 $
Author:
Kevin O'Neill

Field Summary
static java.lang.String CONFORMANCE_LEVEL
          XML:DB conformance level of this driver
protected  Database database
          Database instance
static java.lang.String DATABASE_NAME
          Default database name in case none was specified via DATABASE_NAME_PROPERTY property
static java.lang.String DATABASE_NAME_PROPERTY
          System property storing the name of the database to connect to
static java.lang.String DRIVER_NAME
          Prefix used to denote XML:DB URI's that should use this driver
 
Fields inherited from class org.apache.xindice.client.xmldb.CommonConfigurable
config
 
Constructor Summary
ManagedDatabaseImpl()
           
ManagedDatabaseImpl(java.lang.String databaseName)
           
 
Method Summary
 boolean acceptsURI(java.lang.String uri)
           
 org.xmldb.api.base.Collection getCollection(java.lang.String uri, java.lang.String username, java.lang.String password)
          Retrieves a Collection instance based on the URI provided in the uri parameter.
 java.lang.String getConformanceLevel()
           
 java.lang.String getName()
           
 
Methods inherited from class org.apache.xindice.client.xmldb.CommonConfigurable
getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Field Detail

DRIVER_NAME

public static final java.lang.String DRIVER_NAME
Prefix used to denote XML:DB URI's that should use this driver

DATABASE_NAME

public static final java.lang.String DATABASE_NAME
Default database name in case none was specified via DATABASE_NAME_PROPERTY property

DATABASE_NAME_PROPERTY

public static final java.lang.String DATABASE_NAME_PROPERTY
System property storing the name of the database to connect to

CONFORMANCE_LEVEL

public static final java.lang.String CONFORMANCE_LEVEL
XML:DB conformance level of this driver

database

protected Database database
Database instance
Constructor Detail

ManagedDatabaseImpl

public ManagedDatabaseImpl()
                    throws java.io.FileNotFoundException,
                           XindiceException

ManagedDatabaseImpl

public ManagedDatabaseImpl(java.lang.String databaseName)
                    throws java.io.FileNotFoundException,
                           XindiceException
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface org.xmldb.api.base.Database

getCollection

public org.xmldb.api.base.Collection getCollection(java.lang.String uri,
                                                   java.lang.String username,
                                                   java.lang.String password)
                                            throws org.xmldb.api.base.XMLDBException
Retrieves a Collection instance based on the URI provided in the uri parameter. The format of the URI is defined in the documentation for DatabaseManager.getCollection().

Specified by:
getCollection in interface org.xmldb.api.base.Database

acceptsURI

public boolean acceptsURI(java.lang.String uri)
                   throws org.xmldb.api.base.XMLDBException
Specified by:
acceptsURI in interface org.xmldb.api.base.Database

getConformanceLevel

public java.lang.String getConformanceLevel()
                                     throws org.xmldb.api.base.XMLDBException
Specified by:
getConformanceLevel in interface org.xmldb.api.base.Database

Xindice API
version 1.1b3

Copyright (c) 1999-2003 The Apache Software Foundation. All Rights Reserved.