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-21, BSD License, Christian Gruen
  • 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 database
      open - open existing database
      database - database context
      Throws:
      org.xmldb.api.base.XMLDBException - exception
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.xmldb.api.base.Collection
    • getServices

      public org.xmldb.api.base.Service[] getServices() throws org.xmldb.api.base.XMLDBException
      Specified by:
      getServices in interface org.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 interface org.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 interface org.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 interface org.xmldb.api.base.Collection
      Throws:
      org.xmldb.api.base.XMLDBException
    • getChildCollectionCount

      public int getChildCollectionCount() throws org.xmldb.api.base.XMLDBException
      Specified by:
      getChildCollectionCount in interface org.xmldb.api.base.Collection
      Throws:
      org.xmldb.api.base.XMLDBException
    • listChildCollections

      public String[] listChildCollections() throws org.xmldb.api.base.XMLDBException
      Specified by:
      listChildCollections in interface org.xmldb.api.base.Collection
      Throws:
      org.xmldb.api.base.XMLDBException
    • getResourceCount

      public int getResourceCount() throws org.xmldb.api.base.XMLDBException
      Specified by:
      getResourceCount in interface org.xmldb.api.base.Collection
      Throws:
      org.xmldb.api.base.XMLDBException
    • listResources

      public String[] listResources() throws org.xmldb.api.base.XMLDBException
      Specified by:
      listResources in interface org.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 interface org.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 interface org.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 interface org.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 interface org.xmldb.api.base.Collection
      Throws:
      org.xmldb.api.base.XMLDBException
    • createId

      public String createId() throws org.xmldb.api.base.XMLDBException
      Specified by:
      createId in interface org.xmldb.api.base.Collection
      Throws:
      org.xmldb.api.base.XMLDBException
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface org.xmldb.api.base.Collection
    • close

      public void close()
      Specified by:
      close in interface org.xmldb.api.base.Collection
    • getProperty

      public String getProperty(String name) throws org.xmldb.api.base.XMLDBException
      Specified by:
      getProperty in interface org.xmldb.api.base.Configurable
      Throws:
      org.xmldb.api.base.XMLDBException
    • setProperty

      public void setProperty(String name, String val) throws org.xmldb.api.base.XMLDBException
      Specified by:
      setProperty in interface org.xmldb.api.base.Configurable
      Throws:
      org.xmldb.api.base.XMLDBException