public interface XMLDatabase
| Modifier and Type | Method and Description |
|---|---|
String |
backup()
make a backup of entire database.
|
boolean |
collectionExists(String collection)
check whether a collection exists.
|
void |
create(String name,
String collection,
String content)
creates a new resource or updates the resource if it already exists.
|
void |
createCollection(String collection)
creates a new collection, non recursively.
|
String |
getBackupDir()
Return the dir that contains all backups.
|
String |
getRootCollection()
returns the name of the root collection.
|
List<String> |
list(String collection)
list the content of a collection.
|
List<String> |
listChildCollections(String collection)
lists child collections.
|
String |
read(String name,
String collection)
read a resource string xml.
|
void |
registerTrigger(Trigger trigger,
String collection)
register a new trigger on a collection.
|
boolean |
remove(String name,
String collection)
removes a resource.
|
void |
removeCollection(String collection)
remove a collection.
|
void |
update(String name,
String collection,
String content)
updates and already existing resource.
|
Iterator<String> |
xquery(String xquery)
Execute an xquery.
|
void |
xupdate(String query) |
void create(String name, String collection, String content) throws org.xmldb.api.base.XMLDBException
name - file namecollection - collection namecontent - serialized xml stringorg.xmldb.api.base.XMLDBException - happensvoid update(String name, String collection, String content) throws org.xmldb.api.base.XMLDBException
name - file namecollection - collection namecontent - serialized xml stringorg.xmldb.api.base.XMLDBException - fails if the resource doesn't existboolean remove(String name, String collection) throws org.xmldb.api.base.XMLDBException
name - file namecollection - collection nameorg.xmldb.api.base.XMLDBException - could happenString read(String name, String collection) throws org.xmldb.api.base.XMLDBException
name - file namecollection - collection nameorg.xmldb.api.base.XMLDBException - happensIterator<String> xquery(String xquery) throws org.xmldb.api.base.XMLDBException
xquery - xquery sourceorg.xmldb.api.base.XMLDBException - happensvoid createCollection(String collection) throws org.xmldb.api.base.XMLDBException
collection - collection nameorg.xmldb.api.base.XMLDBException - happensvoid removeCollection(String collection) throws org.xmldb.api.base.XMLDBException
collection - collection nameorg.xmldb.api.base.XMLDBException - happens also when the collection doesn't eXistvoid xupdate(String query) throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBExceptionboolean collectionExists(String collection) throws org.xmldb.api.base.XMLDBException
collection - collection nameorg.xmldb.api.base.XMLDBException - happensList<String> listChildCollections(String collection) throws org.xmldb.api.base.XMLDBException
collection - parent collectionsorg.xmldb.api.base.XMLDBException - happensList<String> list(String collection) throws org.xmldb.api.base.XMLDBException
collection - parent collectionorg.xmldb.api.base.XMLDBException - happensString getRootCollection()
void registerTrigger(Trigger trigger, String collection) throws org.xmldb.api.base.XMLDBException
trigger - trigger instancecollection - collection patternorg.xmldb.api.base.XMLDBException - happensString backup() throws org.xmldb.api.base.XMLDBException, org.exist.util.DatabaseConfigurationException
org.xmldb.api.base.XMLDBException - could happenorg.exist.util.DatabaseConfigurationException - could happenString getBackupDir()
Copyright © 2026. All rights reserved.