public interface DBConnection
Modifier and Type | Method and Description |
---|---|
void |
close()
Close down the connection to the database.
|
org.xmldb.api.base.Collection |
createCollection(java.lang.String collectionName,
org.xmldb.api.base.Collection containerCollection)
Create a collection.
|
org.xmldb.api.base.Collection |
createRootCollection(java.lang.String collectionName)
Convenience method for creating a root collection.
|
void |
deleteCollection(java.lang.String collectionPath)
Delete a collection.
|
void |
deleteCollection(java.lang.String collectionName,
org.xmldb.api.base.Collection containerCollection)
Delete a collection.
|
org.xmldb.api.base.Collection |
getCollection(java.lang.String collectionPath)
Get a specific collection from the database connection
|
org.xmldb.api.base.Collection |
getCollection(java.lang.String collectionName,
org.xmldb.api.base.Collection container)
Get a collection given the name of the collection (not its full path) and its container collection.
|
java.lang.String |
getDatabaseURI()
Returns the URI to access the Xindice database for this connection.
|
boolean |
hasCollection(java.lang.String collectionPath)
Test if a specific collection exists.
|
boolean |
hasCollection(java.lang.String collectionName,
org.xmldb.api.base.Collection containerCollection)
Test if a specific collection exists.
|
org.xmldb.api.base.Collection createCollection(java.lang.String collectionName, org.xmldb.api.base.Collection containerCollection) throws XBRLException
collectionName
- The name of the collectioncontainerCollection
- The container collection itselfXBRLException
org.xmldb.api.base.Collection createRootCollection(java.lang.String collectionName) throws XBRLException
collectionName
- The name of the collection.XBRLException
void deleteCollection(java.lang.String collectionPath) throws XBRLException
collectionPath
- The identifier of the collection.XBRLException
void deleteCollection(java.lang.String collectionName, org.xmldb.api.base.Collection containerCollection) throws XBRLException
collectionName
- The name of the collection.containerCollection
- The collection containing the collection to be deleted.XBRLException
org.xmldb.api.base.Collection getCollection(java.lang.String collectionPath) throws XBRLException
collectionPath
- The collection identifierXBRLException
org.xmldb.api.base.Collection getCollection(java.lang.String collectionName, org.xmldb.api.base.Collection container) throws XBRLException
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).XBRLException
- if the required collection cannot be retrieved.boolean hasCollection(java.lang.String collectionPath) throws XBRLException
collectionPath
- The name of the collection including its full path.XBRLException
- if the existence of the collection cannot be ascertained.boolean hasCollection(java.lang.String collectionName, org.xmldb.api.base.Collection containerCollection) throws XBRLException
collectionName
- The name of the collectioncontainerCollection
- The container collection for the collection being tested for.XBRLException
- if the existence of the collection cannot be ascertained.java.lang.String getDatabaseURI()
void close() throws XBRLException
XBRLException
- if the connection does not close cleanly.