Xindice API
version 1.2m1

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

java.lang.Object
  extended byorg.apache.xindice.client.xmldb.CommonConfigurable
      extended byorg.apache.xindice.client.xmldb.embed.DatabaseImpl
          extended byorg.apache.xindice.client.xmldb.managed.DatabaseImpl
All Implemented Interfaces:
org.xmldb.api.base.Configurable, org.xmldb.api.base.Database

public class DatabaseImpl
extends DatabaseImpl

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. This driver will throw an exception if the database instance you are trying to access hasn't been registered.

Version:
$Revision: 541508 $, $Date: 2007-05-24 21:54:12 -0400 (Thu, 24 May 2007) $
Author:
Kevin O'Neill, Vadim Gritsenko

Field Summary
static 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.embed.DatabaseImpl
PROP_XINDICE_CONFIGURATION, PROP_XINDICE_DB_HOME, PROP_XINDICE_MANAGED, SYSPROP_XINDICE_CONFIGURATION, SYSPROP_XINDICE_DB_HOME, SYSPROP_XINDICE_MANAGED
 
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.
 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.embed.DatabaseImpl
getCollection, getConfiguration, getConformanceLevel
 
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 String DRIVER_NAME
Prefix used to denote XML:DB URI's that should use this driver

See Also:
Constant Field Values
Constructor Detail

DatabaseImpl

public DatabaseImpl()
Creates new DatabaseImpl instance.


DatabaseImpl

public DatabaseImpl(CommonConfigurable config)
Create a new DatabaseImpl object with a copy of the properties from the 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.

Parameters:
config - from which the initial parameters for this DatabaseImpl object are copied.
Method Detail

isManaged

protected boolean isManaged()
Overrides:
isManaged in class DatabaseImpl
Returns:
true

acceptsURI

public boolean acceptsURI(String uri)
Description copied from class: DatabaseImpl
Determines whether this Database implementation can handle the URI. It should return true if the Database instance knows how to handle the URI and false otherwise.

Specified by:
acceptsURI in interface org.xmldb.api.base.Database
Overrides:
acceptsURI in class DatabaseImpl
Parameters:
uri - the URI to check for.
Returns:
true if the URI can be handled, false otherwise.

getName

public String getName()
Description copied from class: DatabaseImpl
Returns the prefix used in XML:DB to denote URI's that this driver can handle.

Specified by:
getName in interface org.xmldb.api.base.Database
Overrides:
getName in class DatabaseImpl
Returns:
the prefix driver name

getNames

public String[] getNames()
Description copied from class: DatabaseImpl
Returns an array of names associated with the Database instance.

Specified by:
getNames in interface org.xmldb.api.base.Database
Overrides:
getNames in class DatabaseImpl
Returns:
the array of name of the object.

Xindice API
version 1.2m1

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