org.sixdml.excelon
Class xlnSixdmlDatabase

java.lang.Object
  |
  +--org.sixdml.excelon.xlnSixdmlDatabase
All Implemented Interfaces:
org.xmldb.api.base.Configurable, org.xmldb.api.base.Database, org.sixdml.SixdmlDatabase

public class xlnSixdmlDatabase
extends java.lang.Object
implements org.sixdml.SixdmlDatabase

  
 xlnSixdmlDatabase.java

 The database object that represents an interface to the eXcelon DXE database. It represents an 
 XMLStore whose name is "sixdml".
 
 Created: Sat Jan 12 02:15:15 2002
 


Constructor Summary
xlnSixdmlDatabase()
          Initializes the class.
 
Method Summary
 boolean acceptsURI(java.lang.String uri)
          Determines whether this Database implementation can handle the URI.
 org.sixdml.dbmanagement.SixdmlIndex createIndex(java.lang.String name, java.util.HashMap indexFields)
          Creates an index with a name, an indexFields table and an underlying DXE database.
 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()
          Returns the XML:DB API Conformance level for the implementation.
 java.lang.String getName()
          Returns the name associated with the Database instance.
 java.lang.String getProperty(java.lang.String name)
          Returns the value of the property identified by name.
 org.xmldb.api.base.Resource getResource(java.lang.String uri, java.lang.String username, java.lang.String password)
          Gets the specified resource from the database.
 org.xmldb.api.base.Service getService(java.lang.String name, java.lang.String version)
          Returns all the top level documents and collections in the database.
 org.xmldb.api.base.Service[] getServices()
          Provides a list of all services known to the collection.
 org.sixdml.dbmanagement.SixdmlIndexType[] getSupportedIndexTypes()
          Gets the types of index that are supported by the this database.
 org.sixdml.transform.SixdmlTransformType[] getSupportedTransformTypes()
          Gets the types of transforms that are supported by the this database.
static void main(java.lang.String[] args)
          Main used for testing class.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the property name to have the value provided in value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

xlnSixdmlDatabase

public xlnSixdmlDatabase()
Initializes the class.
Method Detail

createIndex

public org.sixdml.dbmanagement.SixdmlIndex createIndex(java.lang.String name,
                                                       java.util.HashMap indexFields)
                                                throws org.sixdml.exceptions.UnsupportedIndexTypeException
Creates an index with a name, an indexFields table and an underlying DXE database.
NOTE: Runtime error may occur if table not properly populated.
Parameters:
name - the name of the index.
indexFields - the index fields for the class.
Throws:
org.xmldb.api.base.XMLDBException - if an error occurs.
org.sixdml.exceptions.UnsupportedIndexTypeException - if the type of index requested is unsupported by the database.

getProperty

public java.lang.String getProperty(java.lang.String name)
Returns the value of the property identified by name.
Specified by:
getProperty in interface org.xmldb.api.base.Configurable
Returns:
the value of the property or null if there is no matching value for the key in hash table.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets the property name to have the value provided in value.
Specified by:
setProperty in interface org.xmldb.api.base.Configurable
Parameters:
name - the name of the property to set.
value - the value to set for the property.

getResource

public org.xmldb.api.base.Resource getResource(java.lang.String uri,
                                               java.lang.String username,
                                               java.lang.String password)
Gets the specified resource from the database. This implementation does not support authentication.
Specified by:
getResource in interface org.sixdml.SixdmlDatabase
Parameters:
uri - the name or path to the resource to obtain.
username - The username to use for authentication to the database or null if the database does not support authentication.
password - The password to use for authentication to the database or null if the database does not support authentication.
Returns:
the requested resource.

getSupportedIndexTypes

public org.sixdml.dbmanagement.SixdmlIndexType[] getSupportedIndexTypes()
Gets the types of index that are supported by the this database.
Returns:
an array of SixdmlIndexTypes which the database supports.
Throws:
org.xmldb.api.base.XMLDBException - if an error occurs.

getSupportedTransformTypes

public org.sixdml.transform.SixdmlTransformType[] getSupportedTransformTypes()
Gets the types of transforms that are supported by the this database.
Returns:
an array of SixdmlTransformTypes which the database supports.
Throws:
org.xmldb.api.base.XMLDBException - if an error occurs.

getName

public java.lang.String getName()
Returns the name associated with the Database instance.
Specified by:
getName in interface org.xmldb.api.base.Database
Returns:
the name of the database instance.

getConformanceLevel

public java.lang.String getConformanceLevel()
Returns the XML:DB API Conformance level for the implementation. This can be used by client programs to determine what functionality is available to them.
Specified by:
getConformanceLevel in interface org.xmldb.api.base.Database
Returns:
XML:DB API conformance level for this implementation.

acceptsURI

public boolean acceptsURI(java.lang.String uri)
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. In this implementation it checks to see if the target of the URI exists in the DB, this may not be what is meant for this method to do.
Specified by:
acceptsURI in interface org.xmldb.api.base.Database
Parameters:
uri - the URI to check for.
Returns:
true if the URI can be handled, false otherwise

getCollection

public 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. This implementation does not support authentication.
Specified by:
getCollection in interface org.xmldb.api.base.Database
Parameters:
uri - the URI to use to locate the collection.
username - The username to use for authentication to the database or null if the database does not support authentication.
password - The password to use for authentication to the database or null if the database does not support authentication.
Returns:
the requested vollection.
Throws:
org.xmldb.api.base.XMLDBException - if no such collection exists

getService

public org.xmldb.api.base.Service getService(java.lang.String name,
                                             java.lang.String version)
Returns all the top level documents and collections in the database.
Specified by:
getService in interface org.sixdml.SixdmlDatabase
Parameters:
name - the name of the service to return.
version - the version number of the service to return.
Returns:
an array containing the names of all the top level /** Returns a Service instance for the requested service name and version. If no Service exists for those parameters a null value is returned. The only valid name and version number for this implementation are "XSLT" and "1.0" respectively.

getServices

public org.xmldb.api.base.Service[] getServices()
Provides a list of all services known to the collection. If no services are known an empty list is returned.
Specified by:
getServices in interface org.sixdml.SixdmlDatabase
Returns:
An array of registered Service implementations.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main used for testing class.
Parameters:
args - IGNORED