gov.noaa.eds.xapi.generic
Class GenericDatabase

java.lang.Object
  extended bygov.noaa.eds.xapi.generic.GenericConfigurable
      extended bygov.noaa.eds.xapi.generic.GenericDatabase
All Implemented Interfaces:
org.xmldb.api.base.Configurable, org.xmldb.api.base.Database

public class GenericDatabase
extends GenericConfigurable
implements org.xmldb.api.base.Database

An implementation of an XAPI Database, when the database is just a collection of XAPI Collection objects.

Version:
$Id: GenericDatabase.java,v 1.2 2004/12/23 22:26:01 mrxtravis Exp $
Author:
tns

Field Summary
 
Fields inherited from class gov.noaa.eds.xapi.generic.GenericConfigurable
properties
 
Constructor Summary
GenericDatabase()
          Creates a new instance of ListDatabase
 
Method Summary
 boolean acceptsURI(java.lang.String uri)
          Checks the list of collections and determines if one of them is named with the specified uri.
 void addCollection(org.xmldb.api.base.Collection collection)
          Add a Collection to the list of collections.
 org.xmldb.api.base.Collection getCollection(java.lang.String uri, java.lang.String userName, java.lang.String password)
          Returns a collection with the specified uri
 java.lang.String getConformanceLevel()
          Returns the conformance level.
 java.lang.String getName()
          Returns null, use getNames
 java.lang.String[] getNames()
          Returns the known collections
 void setConformanceLevel(java.lang.String conformanceLevel)
          Sets the conformance level as specified at http://xmldb-org.sourceforge.net/xapi/.
 
Methods inherited from class gov.noaa.eds.xapi.generic.GenericConfigurable
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
 

Constructor Detail

GenericDatabase

public GenericDatabase()
Creates a new instance of ListDatabase

Method Detail

addCollection

public void addCollection(org.xmldb.api.base.Collection collection)
                   throws org.xmldb.api.base.XMLDBException
Add a Collection to the list of collections. If a collection is added that has the same name as another collection, the old one is replaced.

Parameters:
collection - A collection to add.
Throws:
org.xmldb.api.base.XMLDBException

acceptsURI

public boolean acceptsURI(java.lang.String uri)
Checks the list of collections and determines if one of them is named with the specified uri.

Specified by:
acceptsURI in interface org.xmldb.api.base.Database
Parameters:
uri - The uri to check if a collection exists

getName

public java.lang.String getName()
Returns null, use getNames

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

getNames

public java.lang.String[] getNames()
Returns the known collections

Returns:
The known collection names

getConformanceLevel

public java.lang.String getConformanceLevel()
Returns the conformance level. The default is "Core Level 1.0".

Specified by:
getConformanceLevel in interface org.xmldb.api.base.Database
Returns:
The conformance level

setConformanceLevel

public void setConformanceLevel(java.lang.String conformanceLevel)
Sets the conformance level as specified at http://xmldb-org.sourceforge.net/xapi/. The default is set to Core Level 0.

Parameters:
conformanceLevel -

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
Returns a collection with the specified uri

Specified by:
getCollection in interface org.xmldb.api.base.Database
Parameters:
uri - The uri of the collection
userName - The user name to use for permissions
password - The user name to use for permissions
Throws:
org.xmldb.api.base.XMLDBException


Copyright © 2004 National Oceanic and Atmospheric Administration > National Geophysical Data Center > Enterprise Data Services Division. All Rights Reserved.