Xindice API
version 1.1

org.apache.xindice.client.xmldb.services
Class CollectionManagementServiceImpl

java.lang.Object
  |
  +--org.apache.xindice.client.xmldb.CommonConfigurable
        |
        +--org.apache.xindice.client.xmldb.services.CollectionManagementServiceImpl
All Implemented Interfaces:
org.xmldb.api.modules.CollectionManagementService, CollectionManager, org.xmldb.api.base.Configurable, DatabaseInstanceManager, org.xmldb.api.base.Service

public class CollectionManagementServiceImpl
extends CommonConfigurable
implements org.xmldb.api.modules.CollectionManagementService, CollectionManager, DatabaseInstanceManager

XML:DB CollectionManagementService implementation using XML-RPC to communicate with Xindice.

Version:
$Revision: 511426 $, $Date: 2007-02-24 22:25:02 -0500 (Sat, 24 Feb 2007) $
Author:
James Bates, Kimbro Staken

Fields inherited from class org.apache.xindice.client.xmldb.CommonConfigurable
config
 
Constructor Summary
CollectionManagementServiceImpl()
           
 
Method Summary
 org.xmldb.api.base.Collection createCollection(String childCollName)
          Inserts new child collection into this collection
 org.xmldb.api.base.Collection createCollection(String path, org.w3c.dom.Document configuration)
          Creates a new collection in the database identified by name and using the provided configuration.
 void createIndexer(org.w3c.dom.Document configuration)
          Creates a new Indexer for this collection.
 void createXMLObject(org.w3c.dom.Document configuration)
          Creates a new collection level XMLObject using the provided configuration.
 void dropCollection(String name)
          Drops a child collection from this collection.
 void dropIndexer(String name)
          Drops the indexer from the collection
 void dropXMLObject(String name)
          Drops a collection level XMLObject from the collection.
 String getCanonicalName()
          Returns the fully qualified name of the collection that this manager is associated with.
 String getCollectionName()
          Returns the name of the collection that this manager is associated with.
 String getName()
          Returns service name
 String getVersion()
          Returns service version
 String[] listIndexers()
          Returns a list of all indexers for this collection.
 String[] listXMLObjects()
          Returns a list of all collection level XMLObjects for this collection.
 void removeCollection(String childCollName)
          Removes child collection from this collection
 void setCollection(org.xmldb.api.base.Collection collection)
          Sets collection this service should operate on
 void shutdown()
          Shutsdown the Database instance
 
Methods inherited from class org.apache.xindice.client.xmldb.CommonConfigurable
getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Constructor Detail

CollectionManagementServiceImpl

public CollectionManagementServiceImpl()
Method Detail

getVersion

public String getVersion()
                  throws org.xmldb.api.base.XMLDBException
Returns service version
Specified by:
getVersion in interface org.xmldb.api.base.Service
Returns:
1.0

createCollection

public org.xmldb.api.base.Collection createCollection(String childCollName)
                                               throws org.xmldb.api.base.XMLDBException
Inserts new child collection into this collection
Specified by:
createCollection in interface org.xmldb.api.modules.CollectionManagementService
Parameters:
childCollName - name for new child collection
Returns:
the newly created child

removeCollection

public void removeCollection(String childCollName)
                      throws org.xmldb.api.base.XMLDBException
Removes child collection from this collection
Specified by:
removeCollection in interface org.xmldb.api.modules.CollectionManagementService
Parameters:
childCollName - name of child collection to remove

getName

public String getName()
Returns service name
Specified by:
getName in interface org.xmldb.api.base.Service
Returns:
CollectionManagementService

setCollection

public void setCollection(org.xmldb.api.base.Collection collection)
Sets collection this service should operate on
Specified by:
setCollection in interface org.xmldb.api.base.Service
Parameters:
collection - the collection this service should operate on

getCollectionName

public String getCollectionName()
                         throws org.xmldb.api.base.XMLDBException
Returns the name of the collection that this manager is associated with.
Specified by:
getCollectionName in interface CollectionManager
Returns:
the name of the collection
Throws:
org.xmldb.api.base.XMLDBException -  

getCanonicalName

public String getCanonicalName()
                        throws org.xmldb.api.base.XMLDBException
Returns the fully qualified name of the collection that this manager is associated with. This name includes all parent collections.
Specified by:
getCanonicalName in interface CollectionManager
Returns:
the fully qualified name for this collection.
Throws:
org.xmldb.api.base.XMLDBException -  

createCollection

public org.xmldb.api.base.Collection createCollection(String path,
                                                      org.w3c.dom.Document configuration)
                                               throws org.xmldb.api.base.XMLDBException
Creates a new collection in the database identified by name and using the provided configuration.
Specified by:
createCollection in interface CollectionManager
Parameters:
path - the path of the new collection
configuration - the XML collection configuration to use for creating this collection.
Returns:
The newly created collection
Throws:
org.xmldb.api.base.XMLDBException -  

dropCollection

public void dropCollection(String name)
                    throws org.xmldb.api.base.XMLDBException
Drops a child collection from this collection.
Specified by:
dropCollection in interface CollectionManager
Parameters:
name - The name of the child collection to drop.
Throws:
org.xmldb.api.base.XMLDBException -  

listIndexers

public String[] listIndexers()
                      throws org.xmldb.api.base.XMLDBException
Returns a list of all indexers for this collection.
Specified by:
listIndexers in interface CollectionManager
Returns:
the list of indexers
Throws:
org.xmldb.api.base.XMLDBException -  

createIndexer

public void createIndexer(org.w3c.dom.Document configuration)
                   throws org.xmldb.api.base.XMLDBException
Creates a new Indexer for this collection.
Specified by:
createIndexer in interface CollectionManager
Parameters:
configuration - The configuration to use for this indexer.
Throws:
org.xmldb.api.base.XMLDBException -  

dropIndexer

public void dropIndexer(String name)
                 throws org.xmldb.api.base.XMLDBException
Description copied from interface: CollectionManager
Drops the indexer from the collection
Specified by:
dropIndexer in interface CollectionManager
Following copied from interface: org.apache.xindice.client.xmldb.services.CollectionManager
Parameters:
name - The name of the indexer to drop.
Throws:
org.xmldb.api.base.XMLDBException -  

shutdown

public void shutdown()
              throws org.xmldb.api.base.XMLDBException
Shutsdown the Database instance
Specified by:
shutdown in interface DatabaseInstanceManager
Throws:
org.xmldb.api.base.XMLDBException -  

listXMLObjects

public String[] listXMLObjects()
                        throws org.xmldb.api.base.XMLDBException
Returns a list of all collection level XMLObjects for this collection.
Specified by:
listXMLObjects in interface CollectionManager
Returns:
the list of XMLObjects.
Throws:
org.xmldb.api.base.XMLDBException -  

createXMLObject

public void createXMLObject(org.w3c.dom.Document configuration)
                     throws org.xmldb.api.base.XMLDBException
Creates a new collection level XMLObject using the provided configuration. The XMLObject will be added to the collection using the provided name as a key.
Specified by:
createXMLObject in interface CollectionManager
Parameters:
configuration - The XML configuration to use
Throws:
org.xmldb.api.base.XMLDBException -  

dropXMLObject

public void dropXMLObject(String name)
                   throws org.xmldb.api.base.XMLDBException
Drops a collection level XMLObject from the collection.
Specified by:
dropXMLObject in interface CollectionManager
Parameters:
name - The name of the XMLObject to drop.
Throws:
org.xmldb.api.base.XMLDBException -  

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.