org.openanzo.indexer
Class IndexerFactoryBase

java.lang.Object
  extended by org.openanzo.indexer.IndexerFactoryBase
Direct Known Subclasses:
LuceneIndexerFactory

public abstract class IndexerFactoryBase
extends java.lang.Object

Factory for indexer-related classes.

Author:
Wing Yung ( wingyung@us.ibm.com )

Constructor Summary
IndexerFactoryBase()
           
 
Method Summary
abstract  IIndexer createIndexer(java.util.Properties properties)
          Create an indexer for the given properties
abstract  IQuery createQuery(java.util.Properties properties)
          Create an IQuery for the given properties
abstract  IQuery createQueryFromDefaultFieldAndText(java.lang.String defaultField, java.lang.String text)
          Return IQuery for the given default field and text
abstract  ISearch createSearch(java.util.Properties properties)
          Create an ISearch object for the given properties
abstract  ISearch createSearchFromLocation(java.lang.String location)
          Create an ISearch object from the given location
static IndexerFactoryBase getFactory(java.util.Properties properties)
          Returns a factory object.
static IndexerFactoryBase getFactory(java.lang.String factoryClassName)
          Returns a factory object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexerFactoryBase

public IndexerFactoryBase()
Method Detail

getFactory

public static IndexerFactoryBase getFactory(java.util.Properties properties)
                                     throws IndexerException
Returns a factory object.

Parameters:
properties - Expected to contain the IndexerProperties.KEY_INDEXER_FACTORY_CLASS property, which is the name of the factory class to instantiate.
Returns:
a factory object
Throws:
IndexerException

getFactory

public static IndexerFactoryBase getFactory(java.lang.String factoryClassName)
                                     throws IndexerException
Returns a factory object.

Parameters:
factoryClassName - Name of the factory class to instantiate.
Returns:
a factory for given class name
Throws:
IndexerException

createIndexer

public abstract IIndexer createIndexer(java.util.Properties properties)
                                throws IndexerException
Create an indexer for the given properties

Parameters:
properties - configuration properties for creating indexer
Returns:
indexer for the given properties
Throws:
IndexerException

createSearch

public abstract ISearch createSearch(java.util.Properties properties)
                              throws IndexerException
Create an ISearch object for the given properties

Parameters:
properties - configuration properties
Returns:
ISearch object for the given properties
Throws:
IndexerException

createSearchFromLocation

public abstract ISearch createSearchFromLocation(java.lang.String location)
                                          throws IndexerException
Create an ISearch object from the given location

Parameters:
location - location of properties
Returns:
ISearch object for the properties at the given location
Throws:
IndexerException

createQuery

public abstract IQuery createQuery(java.util.Properties properties)
                            throws IndexerException
Create an IQuery for the given properties

Parameters:
properties - configuration properties
Returns:
IQuery for the given properties
Throws:
IndexerException

createQueryFromDefaultFieldAndText

public abstract IQuery createQueryFromDefaultFieldAndText(java.lang.String defaultField,
                                                          java.lang.String text)
                                                   throws IndexerException
Return IQuery for the given default field and text

Parameters:
defaultField - This parameter specifies the default field for the query to take place over (When items are inserted into the index, they usually have one or more fields associated with them).
text - Query text to search for.
Returns:
IQuery for the given default field and text
Throws:
IndexerException


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.