XBRLAPI

A Java API for XBRL


org.xbrlapi.data.exist
Interface DBConnection

All Known Implementing Classes:
DBConnectionImpl

public interface DBConnection

Data store connection interface.

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Method Summary
 void close()
          Close down the connection to the database.
 Collection createCollection(String collectionName, Collection containerCollection)
          Create a collection.
 Collection createRootCollection(String collectionName)
          Convenience method for creating a root collection.
 void deleteCollection(String collectionPath)
          Delete a collection.
 void deleteCollection(String collectionName, Collection containerCollection)
          Delete a collection.
 Collection getCollection(String collectionPath)
          Get a specific collection from the database connection
 Collection getCollection(String collectionName, Collection container)
          Get a collection given the name of the collection (not its full path) and its container collection.
 String getDatabaseURI()
          Returns the URI to access the Xindice database for this connection.
 boolean hasCollection(String collectionPath)
          Test if a specific collection exists.
 boolean hasCollection(String collectionName, Collection containerCollection)
          Test if a specific collection exists.
 

Method Detail

createCollection

Collection createCollection(String collectionName,
                            Collection containerCollection)
                            throws XBRLException
Create a collection.

Parameters:
collectionName - The name of the collection
containerCollection - The container collection itself
Throws:
XBRLException

createRootCollection

Collection createRootCollection(String collectionName)
                                throws XBRLException
Convenience method for creating a root collection.

Parameters:
collectionName - The name of the collection.
Throws:
XBRLException

deleteCollection

void deleteCollection(String collectionPath)
                      throws XBRLException
Delete a collection.

Parameters:
collectionPath - The identifier of the collection.
Throws:
XBRLException

deleteCollection

void deleteCollection(String collectionName,
                      Collection containerCollection)
                      throws XBRLException
Delete a collection.

Parameters:
collectionName - The name of the collection.
containerCollection - The collection containing the collection to be deleted.
Throws:
XBRLException

getCollection

Collection getCollection(String collectionPath)
                         throws XBRLException
Get a specific collection from the database connection

Parameters:
collectionPath - The collection identifier
Returns:
the specified collection or null if it does not exist
Throws:
XBRLException

getCollection

Collection getCollection(String collectionName,
                         Collection container)
                         throws XBRLException
Get a collection given the name of the collection (not its full path) and its container collection.

Parameters:
collectionName - The name of the collection (eg: for collection /db/shakespeare/plays this would be plays).
container - The container collection (eg: for collection /db/shakespeare/plays this would be the /db/shakespeare collection).
Returns:
The required collection.
Throws:
XBRLException - if the required collection cannot be retrieved.

hasCollection

boolean hasCollection(String collectionPath)
                      throws XBRLException
Test if a specific collection exists.

Parameters:
collectionPath - The name of the collection including its full path.
Returns:
true if the collection exists and false otherwise.
Throws:
XBRLException - if the existence of the collection cannot be ascertained.

hasCollection

boolean hasCollection(String collectionName,
                      Collection containerCollection)
                      throws XBRLException
Test if a specific collection exists.

Parameters:
collectionName - The name of the collection
containerCollection - The container collection for the collection being tested for.
Returns:
true if the collection exists and false otherwise.
Throws:
XBRLException - if the existence of the collection cannot be ascertained.

getDatabaseURI

String getDatabaseURI()
Returns the URI to access the Xindice database for this connection.

Returns:
The URI for accessing the Xindice database for this connection.

close

void close()
           throws XBRLException
Close down the connection to the database.

Throws:
XBRLException - if the connection does not close cleanly.

SourceForge Logo