Xindice API

org.apache.xindice.core.indexer
Class IndexManager

java.lang.Object
  |
  +--org.apache.xindice.util.SimpleConfigurable
        |
        +--org.apache.xindice.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(Key key, org.w3c.dom.Document doc)
           
 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.
 Indexer register(java.lang.Class c, Configuration cfg)
           
 void removeDocument(Key key, org.w3c.dom.Document doc)
           
 void setConfig(Configuration config)
          setConfig sets the configuration information for the Configurable object instance.
 void unregister(java.lang.String name)
           
 
Methods inherited from class org.apache.xindice.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 XindiceException
Description copied from interface: Configurable
setConfig sets the configuration information for the Configurable object instance.
Overrides:
setConfig in class SimpleConfigurable
Following copied from interface: org.apache.xindice.util.Configurable
Parameters:
config - The configuration Node

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)
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

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

register

public Indexer register(java.lang.Class c,
                        Configuration cfg)
                 throws DBException

unregister

public void unregister(java.lang.String name)

get

public Indexer get(java.lang.String name)
get retrieves an Indexer by 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(Key key,
                        org.w3c.dom.Document doc)

removeDocument

public void removeDocument(Key key,
                           org.w3c.dom.Document doc)

Xindice API

Copyright (c) 1999-2001 The Apache Software Foundation