Xindice API

org.apache.xindice.core
Class CollectionManager

java.lang.Object
  |
  +--org.apache.xindice.core.CollectionManager
All Implemented Interfaces:
Configurable, Disposable
Direct Known Subclasses:
Collection

public class CollectionManager
extends java.lang.Object
implements Configurable, Disposable

CollectionManager is the base class for both Database and Collection.


Method Summary
 Collection createCollection(java.lang.String path, Configuration cfg)
          createCollection creates a new Collection object and any associated system resources that the Collection will need.
 void dispose()
          dispose disposes of the object instance.
 boolean dropCollection(Collection collection)
          dropCollection physically removes the specified Collection and any associated system resources that the Collection uses.
 Collection getCollection(java.lang.String path)
          getCollection retrieves a Collection by name.
 Configuration getConfig()
          getConfig retrieves the configuration information for the Configurable object instance.
 java.lang.String[] listCollections()
          listCollections retrieves a list of Collections as an array of Strings.
 void setConfig(Configuration config)
          setConfig sets the configuration information for the Configurable object instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setConfig

public void setConfig(Configuration config)
               throws XindiceException
Description copied from interface: Configurable
setConfig sets the configuration information for the Configurable object instance.
Specified by:
setConfig in interface Configurable
Following copied from interface: org.apache.xindice.util.Configurable
Parameters:
config - The configuration Node

getConfig

public Configuration getConfig()
Description copied from interface: Configurable
getConfig retrieves the configuration information for the Configurable object instance.
Specified by:
getConfig in interface Configurable
Following copied from interface: org.apache.xindice.util.Configurable
Returns:
The configuration Node

getCollection

public Collection getCollection(java.lang.String path)
                         throws DBException
getCollection retrieves a Collection by name.
Parameters:
path - The Collection path
Returns:
The Collection (or null)

listCollections

public final java.lang.String[] listCollections()
                                         throws DBException
listCollections retrieves a list of Collections as an array of Strings.
Returns:
The Collection list

dropCollection

public boolean dropCollection(Collection collection)
                       throws DBException
dropCollection physically removes the specified Collection and any associated system resources that the Collection uses.
Parameters:
collection - The Collection to drop
Returns:
Whether or not the Collection was dropped

createCollection

public Collection createCollection(java.lang.String path,
                                   Configuration cfg)
                            throws DBException
createCollection creates a new Collection object and any associated system resources that the Collection will need.
Parameters:
path - The relative path of the Collection
cfg - The Collection's configuration
Returns:
The newly created Collection

dispose

public void dispose()
Description copied from interface: Disposable
dispose disposes of the object instance.
Specified by:
dispose in interface Disposable

Xindice API

Copyright (c) 1999-2001 The Apache Software Foundation