swpatho.ap1.editor.db
Class BefundDatabase


java.lang.Object

  extended byswpatho.ap1.editor.db.BefundDatabase


public class BefundDatabase
extends java.lang.Object

A Database establishes a connection with a XML Database which stores the XML data and supports the XML:DB API. It is used to query the underlying XML database and improves query performance by caching the queries and their results. Furthermore, it provides access to the collections and services


Constructor Summary
BefundDatabase(java.lang.String DBDriver, java.lang.String befundCollectionPath)
          Creates a Database object with the given parameters.
 
Method Summary
 void close()
          Closes a Database Object so that all internals are properly closed and (hopefully) no memory leaks occur.
 Collection getbefundCollection()
          Returns the collection for this Database
 java.lang.String getbefundCollectionPath()
          Returns the currently set collection path
 java.lang.String getDBDriver()
          Returns the database driver that was used in this Database object to establish a connection with the XML database.
 XPathQueryService getQueryService()
          Returns the service for this Database
 ResourceSet query(java.lang.String xpath)
          Queries the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BefundDatabase


public BefundDatabase(java.lang.String DBDriver,
                      java.lang.String befundCollectionPath)
               throws DBException
Creates a Database object with the given parameters. It needs the driver for the database, the path to the collection

Parameters:
DBDriver - The driver for the database, e.g. "org.apache.xindice.client.xmldb.DatabaseImpl" for Xindice 1.0
befundCollectionPath - The path to the collection in the database, e.g. "xmldb:xindice:///db/Befunde"
Throws:
DBException - When any of the parameters is null or if cacheSize is <= 0.
Method Detail

getbefundCollectionPath


public java.lang.String getbefundCollectionPath()
Returns the currently set collection path

Returns:
Current collection path

getDBDriver


public java.lang.String getDBDriver()
Returns the database driver that was used in this Database object to establish a connection with the XML database.

Returns:
The database Driver from this Database

getbefundCollection


public Collection getbefundCollection()
Returns the collection for this Database

Returns:
Current collection

getQueryService


public XPathQueryService getQueryService()
Returns the service for this Database

Returns:
Current service

query


public ResourceSet query(java.lang.String xpath)
                  throws DBException
Queries the database

Parameters:
xpath - The XPath query that should be executed
Returns:
The ResourceSet that is produced by the xpath expression
Throws:
DBException

close


public void close()
Closes a Database Object so that all internals are properly closed and (hopefully) no memory leaks occur.