dbXML API

## org.dbxml.client.xmldb
Class DatabaseImpl

    java.lang.Object
      |
      +--org.dbxml.client.xmldb.CommonConfigurable
            |
            +--org.dbxml.client.xmldb.DatabaseImpl

All Implemented Interfaces:
  Configurable, Database

public class DatabaseImpl
extends CommonConfigurable
implements Database

DatabaseImpl is the XML:DB driver implementation for dbXML. It is the entry point into the dbXML server but is not intended for direct use by users. Users access it indirectly through the XML:DB DatabaseManager implementation. This API is an implementation of the XML:DB API. More information on this API can be found by looking at http://www.xmldb.org/xapi/index.html

The location to find the NamingService ior can be specified by setting the property dbxml.naming.ior using setProperty. By default it will be set to "http://localhost:8080/NamingService" The CORBA ORB implementation can be switched by setting the properties org.omg.CORBA.ORBClass and org.omg.CORBA.ORBSingletonClass with the values provided by your orb vendor. The values are set using setProperty().

Field Summary
`static java.lang.String` `CONFORMANCE_LEVEL` The XML:DB API Core Level Conformance of this implementation.
`static java.lang.String` `DEFAULT_CORBA_NAME` Default CORBA name service name for the Database instance.
`static java.lang.String` `DEFAULT_NAMING_URI` Default location where the Name service IOR can be located.
`static java.lang.String` `DEFAULT_ORB_CLASS` Default ORB class.
`static java.lang.String` `DEFAULT_ORB_NAMING_PROP` Property name to use to set the naming service up for resolve_initial_refs
`static java.lang.String` `DEFAULT_ORB_SINGLETON_CLASS` Default ORBSingleton class.
`static java.lang.String` `INSTANCE_NAME` Name used in the uri for collections associated with this instance.
`static java.lang.String` `NAMING_PROP` Property name to set when needing to change the location of the naming service URI.
`static java.lang.String` `ORB_CLASS_PROP` Property name to use to set the name of the ORB Class.
`static java.lang.String` `ORB_NAMING_PROP` Property name to use to set the name of the ORB property to use to configure where to find the NameService ref.
`static java.lang.String` `ORB_SINGLETON_CLASS_PROP` Property name to use to set the name of the ORB singleton Class.
`static java.lang.String` `SEP` The characters expected to separate the INSTANCE_NAME from the database name.

Constructor Summary
`DatabaseImpl()` Constructor for the DatabaseImpl object

Method Summary
`boolean` `acceptsURI(java.lang.String uri)` Used by org.xmldb.api.base.DatabaseManager to determine if this database instance is the proper one to handle a request or not.
`Collection` `getCollection(java.lang.String uri, java.lang.String username, java.lang.String password)` Creates a Collection instance using the URI to locate the collection in the dbXML instance.
`java.lang.String` `getConformanceLevel()` Gets the ConformanceLevel attribute of the DatabaseImpl object
`java.lang.String` `getName()` Gets the instance Name

Methods inherited from class org.dbxml.client.xmldb.CommonConfigurable
`getProperty, setProperty`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.xmldb.api.base.Configurable
`getProperty, setProperty`

Field Detail

### INSTANCE_NAME

    public static java.lang.String INSTANCE_NAME

  Name used in the uri for collections associated with this instance.

### SEP

    public static java.lang.String SEP

  The characters expected to separate the INSTANCE_NAME from the database name.

### CONFORMANCE_LEVEL

    public static java.lang.String CONFORMANCE_LEVEL

  The XML:DB API Core Level Conformance of this implementation.

### DEFAULT_CORBA_NAME

    public static final java.lang.String DEFAULT_CORBA_NAME

  Default CORBA name service name for the Database instance.

### DEFAULT_NAMING_URI

    public static final java.lang.String DEFAULT_NAMING_URI

  Default location where the Name service IOR can be located.

### NAMING_PROP

    public static final java.lang.String NAMING_PROP

  Property name to set when needing to change the location of the naming service URI.

### ORB_NAMING_PROP

    public static final java.lang.String ORB_NAMING_PROP

  Property name to use to set the name of the ORB property to use to configure where to find the NameService ref.

### DEFAULT_ORB_NAMING_PROP

    public static final java.lang.String DEFAULT_ORB_NAMING_PROP

  Property name to use to set the naming service up for resolve_initial_refs

### ORB_CLASS_PROP

    public static final java.lang.String ORB_CLASS_PROP

  Property name to use to set the name of the ORB Class. This is used to override the JDKs built in CORBA ORB.

### ORB_SINGLETON_CLASS_PROP

    public static final java.lang.String ORB_SINGLETON_CLASS_PROP

  Property name to use to set the name of the ORB singleton Class. This is used to override the JDKs built in CORBA ORB.

### DEFAULT_ORB_CLASS

    public static final java.lang.String DEFAULT_ORB_CLASS

  Default ORB class. This is used to override the JDKs built in CORBA ORB.

### DEFAULT_ORB_SINGLETON_CLASS

    public static final java.lang.String DEFAULT_ORB_SINGLETON_CLASS

  Default ORBSingleton class. This is used to override the JDKs built in CORBA ORB.

Constructor Detail

### DatabaseImpl

    public DatabaseImpl()

  Constructor for the DatabaseImpl object

Method Detail

### getName

    public java.lang.String getName()
                             throws XMLDBException

  Gets the instance Name
  Specified by:
    `getName` in interface `Database`
  Returns:
    The Name value
  Throws:
    `XMLDBException` -

### getCollection

    public Collection getCollection(java.lang.String uri,
                                    java.lang.String username,
                                    java.lang.String password)
                             throws XMLDBException

  Creates a Collection instance using the URI to locate the collection in the dbXML instance. Applications should not call this method directly. Instead they should call org.xmldb.api.base.DatabaseManager.getCollection().

  The URI format accepted by this method: dbxml:/[Nameservice host]//[Database Instance Name in the CORBA Name Service]/[collection path]

  Nameservice host is optional. This usually looks something like this: dbxml:///db/root/ocs. or dbxml://some.host.com:8309/db/root/ocs

  When you pass the URI to DatabaseManager.getCollection(uri) you must prepend an xmldb: to the beginning to make it a valid XML:DB URI. So to normal users of the API URIs will look like this: xmldb:dbxml:///db/root/ocs. DatabaseManager will strip the xmldb: before handing the URI to this getCollection implementation.

  Specified by:
    `getCollection` in interface `Database`
  Parameters:
    `uri` - The URI specifing the location of the collection.
  Returns:
    The Collection value
  Throws:
    `XMLDBException` -

### getConformanceLevel

    public java.lang.String getConformanceLevel()
                                         throws XMLDBException

  Gets the ConformanceLevel attribute of the DatabaseImpl object
  Specified by:
    `getConformanceLevel` in interface `Database`
  Returns:
    The ConformanceLevel value
  Throws:
    `XMLDBException` - Description of Exception

### acceptsURI

    public boolean acceptsURI(java.lang.String uri)
                       throws XMLDBException

  Used by org.xmldb.api.base.DatabaseManager to determine if this database instance is the proper one to handle a request or not.
  Specified by:
    `acceptsURI` in interface `Database`
  Parameters:
    `uri` - The uri to test - see getCollection for a description of the format.
  Returns:
    true if the URI can be handled, false otherwise.
  Throws:
    `XMLDBException` -

dbXML API

Copyright (c) 1999-2001 The dbXML Group, All rights reserved