Package org.basex.api.xmldb
Class BXCollection
java.lang.Object
org.basex.api.xmldb.BXCollection
- All Implemented Interfaces:
org.xmldb.api.base.Collection,org.xmldb.api.base.Configurable
Implementation of the Collection Interface for the XMLDB:API.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Constructor Summary
ConstructorsConstructorDescriptionBXCollection(String name, boolean open, org.xmldb.api.base.Database database) Constructor to create/open a collection. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createId()createResource(String id, String type) org.xmldb.api.base.CollectiongetChildCollection(String name) intgetName()org.xmldb.api.base.CollectiongetProperty(String name) getResource(String id) intorg.xmldb.api.base.ServicegetService(String name, String version) org.xmldb.api.base.Service[]booleanisOpen()String[]String[]voidremoveResource(org.xmldb.api.base.Resource resource) voidsetProperty(String name, String val) voidstoreResource(org.xmldb.api.base.Resource resource)
-
Constructor Details
-
BXCollection
public BXCollection(String name, boolean open, org.xmldb.api.base.Database database) throws org.xmldb.api.base.XMLDBException Constructor to create/open a collection.- Parameters:
name- name of the databaseopen- open existing databasedatabase- database context- Throws:
org.xmldb.api.base.XMLDBException- exception
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.xmldb.api.base.Collection
-
getServices
public org.xmldb.api.base.Service[] getServices() throws org.xmldb.api.base.XMLDBException- Specified by:
getServicesin interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
getService
public org.xmldb.api.base.Service getService(String name, String version) throws org.xmldb.api.base.XMLDBException - Specified by:
getServicein interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
getParentCollection
public org.xmldb.api.base.Collection getParentCollection() throws org.xmldb.api.base.XMLDBException- Specified by:
getParentCollectionin interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
getChildCollection
public org.xmldb.api.base.Collection getChildCollection(String name) throws org.xmldb.api.base.XMLDBException - Specified by:
getChildCollectionin interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
getChildCollectionCount
public int getChildCollectionCount() throws org.xmldb.api.base.XMLDBException- Specified by:
getChildCollectionCountin interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
listChildCollections
- Specified by:
listChildCollectionsin interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
getResourceCount
public int getResourceCount() throws org.xmldb.api.base.XMLDBException- Specified by:
getResourceCountin interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
listResources
- Specified by:
listResourcesin interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
createResource
public BXXMLResource createResource(String id, String type) throws org.xmldb.api.base.XMLDBException - Specified by:
createResourcein interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
removeResource
public void removeResource(org.xmldb.api.base.Resource resource) throws org.xmldb.api.base.XMLDBException - Specified by:
removeResourcein interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
storeResource
public void storeResource(org.xmldb.api.base.Resource resource) throws org.xmldb.api.base.XMLDBException - Specified by:
storeResourcein interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
getResource
- Specified by:
getResourcein interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
createId
- Specified by:
createIdin interfaceorg.xmldb.api.base.Collection- Throws:
org.xmldb.api.base.XMLDBException
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceorg.xmldb.api.base.Collection
-
close
public void close()- Specified by:
closein interfaceorg.xmldb.api.base.Collection
-
getProperty
- Specified by:
getPropertyin interfaceorg.xmldb.api.base.Configurable- Throws:
org.xmldb.api.base.XMLDBException
-
setProperty
- Specified by:
setPropertyin interfaceorg.xmldb.api.base.Configurable- Throws:
org.xmldb.api.base.XMLDBException
-