dbXML API

## com.dbxml.db.core.indexer
Class IndexManager

    java.lang.Object
      com.dbxml.util.SimpleConfigurable
          com.dbxml.db.core.indexer.IndexManager

All Implemented Interfaces:
  Configurable

public final class IndexManager
extends SimpleConfigurable

IndexManager is a class that manages Indexes. Good description, eh? I should win a Pulitzer Prize for that one.

Constructor Summary
`IndexManager(Collection collection)`

Method Summary
`void` `addDocument(Transaction tx, Key key, DocumentTable doc)`
`void` `closeAll()` closeAll closes all opened Indexers.
`Indexer` `create(Configuration cfg)` create creates a new Indexer object and any associated system resources that the Indexer will need.
`boolean` `drop(java.lang.String name)` drop physically removes the specified Indexer and any associated system resources that the Indexer uses.
`Indexer` `get(java.lang.String name)` get retrieves an Indexer by name.
`Indexer` `getBestIndexer(java.lang.String style, IndexPattern pattern)` getBestIndexer retrieves the best Indexer to use for the specified IndexPattern.
`java.lang.String[]` `list()` list returns a list of the Indexers that this IndexerManager has registered.
`void` `removeDocument(Transaction tx, Key key, DocumentTable doc)`
`void` `setConfig(Configuration config)` setConfig sets the configuration information for the Configurable object instance.
`static void` `setMagicUser(User magicUser)`
`static void` `setUserStack(UserStack userStack)`

Methods inherited from class com.dbxml.util.SimpleConfigurable
`getConfig`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IndexManager

    public IndexManager(Collection collection)

Method Detail

### setConfig

    public void setConfig(Configuration config)
                   throws dbXMLException

  Description copied from interface: `Configurable`
  setConfig sets the configuration information for the Configurable object instance.

  Specified by:
    `setConfig` in interface `Configurable`
  Overrides:
    `setConfig` in class `SimpleConfigurable`
  Throws:
    `dbXMLException`

### setMagicUser

    public static void setMagicUser(User magicUser)
                             throws SecurityException

  Throws:
    `SecurityException`

### setUserStack

    public static void setUserStack(UserStack userStack)
                             throws SecurityException

  Throws:
    `SecurityException`

### list

    public java.lang.String[] list()

  list returns a list of the Indexers that this IndexerManager has registered.

  Returns:
    An array containing the Indexer names

### drop

    public boolean drop(java.lang.String name)
                 throws DBException

  drop physically removes the specified Indexer and any associated system resources that the Indexer uses.

  Parameters:
    `name` - The Indexer to drop
  Returns:
    Whether or not the Indexer was dropped
  Throws:
    `DBException`

### create

    public Indexer create(Configuration cfg)
                   throws DBException

  create creates a new Indexer object and any associated system resources that the Indexer will need.

  Parameters:
    `cfg` - The Indexer's configuration
  Returns:
    The Indexer that was created
  Throws:
    `DBException`

### closeAll

    public void closeAll()

  closeAll closes all opened Indexers. This method is called by the containing Collection when it is being disposed of.

### get

    public Indexer get(java.lang.String name)

  get retrieves an Indexer by name.

  Parameters:
    `name` - The Indexer name
  Returns:
    The Indexer

### getBestIndexer

    public Indexer getBestIndexer(java.lang.String style,
                                  IndexPattern pattern)

  getBestIndexer retrieves the best Indexer to use for the specified IndexPattern.

  Parameters:
    `style` - The Indexer Style (ex: Node, Value)
    `pattern` - The IndexPattern to use
  Returns:
    The best Indexer (or null)

### addDocument

    public void addDocument(Transaction tx,
                            Key key,
                            DocumentTable doc)

### removeDocument

    public void removeDocument(Transaction tx,
                               Key key,
                               DocumentTable doc)

dbXML API

Copyright (c) 2004 The dbXML Group