|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.api.xmldb.BXCollectionManagementService
public final class BXCollectionManagementService
Implementation of the CollectionManagementService Interface for the XMLDB:API. Note that a BaseX database has one collection at a time, so creating a new collection creates a new database as well, and the specified collection reference is reset every time a database is created.
Field Summary |
---|
Fields inherited from interface org.basex.api.xmldb.BXXMLDBText |
---|
CONFORMANCE_LEVEL, DBURI, ERR_BINARY, ERR_CONT, ERR_DOC, ERR_EMPTY, ERR_ID, ERR_INV, ERR_ITER, ERR_NSURI, ERR_PROP, ERR_RES, ERR_TYPE, ERR_UNKNOWN, ERR_URI, LOCALHOST, XMLDB, XMLDBURI |
Constructor Summary | |
---|---|
BXCollectionManagementService(Collection c)
Standard Constructor. |
Method Summary | |
---|---|
static Context |
create(java.lang.String name)
Creates a new collection and returns the context. |
Collection |
createCollection(java.lang.String name)
Creates a new collection. |
java.lang.String |
getName()
Returns the name associated with the Service instance. |
java.lang.String |
getProperty(java.lang.String nm)
Returns the value of the property identified by name . |
java.lang.String |
getVersion()
Gets the Version attribute of the Service object |
void |
removeCollection(java.lang.String name)
Removes a named Collection from the system. |
void |
setCollection(Collection c)
Sets the Collection attribute of the Service object |
void |
setProperty(java.lang.String nm,
java.lang.String value)
Sets the property name to have the value provided in
value . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BXCollectionManagementService(Collection c)
c
- Collection referenceMethod Detail |
---|
public Collection createCollection(java.lang.String name) throws XMLDBException
createCollection
in interface CollectionManagementService
name
- name of collection
XMLDBException
- exceptionpublic static Context create(java.lang.String name) throws XMLDBException
name
-
XMLDBException
- exceptionpublic void removeCollection(java.lang.String name)
CollectionManagementService
Collection
from the system. The
name for the Collection
to remove is relative to the
Collection
from which the CollectionManagementService
was retrieved.
removeCollection
in interface CollectionManagementService
name
- The name of the collection to remove.public java.lang.String getName()
Service
getName
in interface Service
public java.lang.String getVersion()
Service
getVersion
in interface Service
public void setCollection(Collection c)
Service
setCollection
in interface Service
c
- The new Collection valuepublic java.lang.String getProperty(java.lang.String nm)
Configurable
name
.
getProperty
in interface Configurable
nm
- the name of the property to retrieve.
public void setProperty(java.lang.String nm, java.lang.String value) throws XMLDBException
Configurable
name
to have the value provided in
value
.
setProperty
in interface Configurable
nm
- the name of the property to set.value
- the value to set for the property.
XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |