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
public final class BXCollection extends Object implements org.xmldb.api.base.Collection
Implementation of the Collection Interface for the XMLDB:API.- Author:
- BaseX Team 2005-23, BSD License, Christian Gruen
-
-
Constructor Summary
Constructors Constructor Description BXCollection(String name, boolean open, org.xmldb.api.base.Database database)
Constructor to create/open a collection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
String
createId()
BXXMLResource
createResource(String id, String type)
org.xmldb.api.base.Collection
getChildCollection(String name)
int
getChildCollectionCount()
String
getName()
org.xmldb.api.base.Collection
getParentCollection()
String
getProperty(String name)
BXXMLResource
getResource(String id)
int
getResourceCount()
org.xmldb.api.base.Service
getService(String name, String version)
org.xmldb.api.base.Service[]
getServices()
boolean
isOpen()
String[]
listChildCollections()
String[]
listResources()
void
removeResource(org.xmldb.api.base.Resource resource)
void
setProperty(String name, String val)
void
storeResource(org.xmldb.api.base.Resource resource)
-
-
-
Constructor Detail
-
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 Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.xmldb.api.base.Collection
-
getServices
public org.xmldb.api.base.Service[] getServices() throws org.xmldb.api.base.XMLDBException
- Specified by:
getServices
in 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:
getService
in 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:
getParentCollection
in 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:
getChildCollection
in interfaceorg.xmldb.api.base.Collection
- Throws:
org.xmldb.api.base.XMLDBException
-
getChildCollectionCount
public int getChildCollectionCount() throws org.xmldb.api.base.XMLDBException
- Specified by:
getChildCollectionCount
in interfaceorg.xmldb.api.base.Collection
- Throws:
org.xmldb.api.base.XMLDBException
-
listChildCollections
public String[] listChildCollections() throws org.xmldb.api.base.XMLDBException
- Specified by:
listChildCollections
in interfaceorg.xmldb.api.base.Collection
- Throws:
org.xmldb.api.base.XMLDBException
-
getResourceCount
public int getResourceCount() throws org.xmldb.api.base.XMLDBException
- Specified by:
getResourceCount
in interfaceorg.xmldb.api.base.Collection
- Throws:
org.xmldb.api.base.XMLDBException
-
listResources
public String[] listResources() throws org.xmldb.api.base.XMLDBException
- Specified by:
listResources
in 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:
createResource
in 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:
removeResource
in 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:
storeResource
in interfaceorg.xmldb.api.base.Collection
- Throws:
org.xmldb.api.base.XMLDBException
-
getResource
public BXXMLResource getResource(String id) throws org.xmldb.api.base.XMLDBException
- Specified by:
getResource
in interfaceorg.xmldb.api.base.Collection
- Throws:
org.xmldb.api.base.XMLDBException
-
createId
public String createId() throws org.xmldb.api.base.XMLDBException
- Specified by:
createId
in interfaceorg.xmldb.api.base.Collection
- Throws:
org.xmldb.api.base.XMLDBException
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfaceorg.xmldb.api.base.Collection
-
close
public void close()
- Specified by:
close
in interfaceorg.xmldb.api.base.Collection
-
getProperty
public String getProperty(String name) throws org.xmldb.api.base.XMLDBException
- Specified by:
getProperty
in interfaceorg.xmldb.api.base.Configurable
- Throws:
org.xmldb.api.base.XMLDBException
-
-