| 
Xindice API version 1.2m1  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xindice.client.xmldb.CommonConfigurable
org.apache.xindice.client.xmldb.embed.DatabaseImpl
Implements XML:DB's Database interface providing embedded access to
 a Xindice database. Usually, this class is not used
 directly, but DatabaseImpl is used instead.
 Embedded database driver supports multiple database instances simultaneously. To use
 multiple instances, configure several root-collection elements in the
 Xindice configuration file and point this driver to this configuration.
 Currently, databases are loaded by the driver lazily, on first access to the
 database.
 Embedded database driver uses following configuration parameters:
 
DatabaseImpl)DatabaseImpl
     and setting its properties (see CommonConfigurable.setProperty(java.lang.String, java.lang.String)). You won't use this class
     directly in this case.CommonConfigurable.setProperty(java.lang.String, java.lang.String) method before
     obtaining collection with getCollection(String, String, String) method.System.setProperty(String, String))DatabaseImpl(CommonConfigurable) and
     passing instance of CommonConfigurable with all properties already set.
| Field Summary | |
static String | 
DRIVER_NAME
Prefix used to denote XML:DB URI's that should use this driver  | 
static String | 
PROP_XINDICE_CONFIGURATION
Driver property name for the xindice configuration file.  | 
static String | 
PROP_XINDICE_DB_HOME
Driver property name for the xindice database home.  | 
static String | 
PROP_XINDICE_MANAGED
Driver property name for the managed configuration parameter.  | 
static String | 
SYSPROP_XINDICE_CONFIGURATION
System property name for the xindice configuration file.  | 
static String | 
SYSPROP_XINDICE_DB_HOME
System property name for the xindice database home.  | 
static String | 
SYSPROP_XINDICE_MANAGED
System property name for the managed configuration parameter.  | 
| Constructor Summary | |
DatabaseImpl()
Creates new DatabaseImpl instance. | 
|
DatabaseImpl(CommonConfigurable config)
Create a new DatabaseImpl object with a copy of the properties from the config parameter. | 
|
| Method Summary | |
 boolean | 
acceptsURI(String uri)
Determines whether this Database implementation  can handle
 the URI. | 
 org.xmldb.api.base.Collection | 
getCollection(String uri,
              String userName,
              String password)
Retrieves a Collection instance based on the URI provided
 in the uri parameter. | 
protected  Configuration | 
getConfiguration(String dbName)
Get configuration for the named database  | 
 String | 
getConformanceLevel()
Returns the XML:DB API Conformance level for the implementation.  | 
 String | 
getName()
Returns the prefix used in XML:DB to denote URI's that this driver can handle.  | 
 String[] | 
getNames()
Returns an array of names associated with the Database instance.  | 
protected  boolean | 
isManaged()
 | 
| 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 | 
public static final String PROP_XINDICE_DB_HOME
public static final String SYSPROP_XINDICE_DB_HOME
public static final String PROP_XINDICE_CONFIGURATION
public static final String SYSPROP_XINDICE_CONFIGURATION
public static final String PROP_XINDICE_MANAGED
public static final String SYSPROP_XINDICE_MANAGED
public static final String DRIVER_NAME
| Constructor Detail | 
public DatabaseImpl()
DatabaseImpl instance.
public DatabaseImpl(CommonConfigurable config)
config parameter.
 This allows to pass properties such as PROP_XINDICE_CONFIGURATION
 to this instance. Usually this is done by instantiating not this
 class, but DatabaseImpl,
 set all the necessary parameters, and then get a collection.
config - from which the initial parameters for this
        DatabaseImpl object are copied.| Method Detail | 
protected boolean isManaged()
protected Configuration getConfiguration(String dbName)
                                  throws org.xmldb.api.base.XMLDBException
dbName - Database name
org.xmldb.api.base.XMLDBException - if unable to load database configuration
public boolean acceptsURI(String uri)
                   throws org.xmldb.api.base.XMLDBException
Database implementation  can handle
 the URI. It should return true if the Database instance knows how to
 handle the URI and false otherwise.
acceptsURI in interface org.xmldb.api.base.Databaseuri - the URI to check for.
org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
  specific errors that occur.ErrroCodes.INVALID_URI If the URI is not in a valid format. 
public org.xmldb.api.base.Collection getCollection(String uri,
                                                   String userName,
                                                   String password)
                                            throws org.xmldb.api.base.XMLDBException
Collection instance based on the URI provided
 in the uri parameter. The format of the URI is defined in the
 documentation for DatabaseManager.getCollection().
 Authentication is handled via username and password however it is not
 required that the database support authentication. Databases that do not
 support authentication MUST ignore the
 username and password if those provided are not
 null.
getCollection in interface org.xmldb.api.base.Databaseuri - the URI to use to locate the collection.password - The password to use for authentication to the database or
    null if the database does not support authentication.
Collection instance for the requested collection or
  null if the collection could not be found.
org.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
  specific errors that occur.ErrroCodes.INVALID_URI If the URI is not in a valid format. ErrroCodes.PERMISSION_DENIED If the username
    and password were not accepted by the database.
public String getName()
               throws org.xmldb.api.base.XMLDBException
getName in interface org.xmldb.api.base.Databaseorg.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
  specific errors that occur.
public String[] getNames()
                  throws org.xmldb.api.base.XMLDBException
getNames in interface org.xmldb.api.base.Databaseorg.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
  specific errors that occur.
public String getConformanceLevel()
                           throws org.xmldb.api.base.XMLDBException
getConformanceLevel in interface org.xmldb.api.base.Databaseorg.xmldb.api.base.XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
  specific errors that occur.
  | 
Xindice API version 1.2m1  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||