lempinen.neatseeker.core
Class IndexerFactory

java.lang.Object
  |
  +--lempinen.neatseeker.core.IndexerFactory

public class IndexerFactory
extends java.lang.Object

A Factory that churns out Indexers (and Collectors).

The static method getIndexer is used for requesting a suitable Indexer from the factory.

Upon receiving a Configuration object, the factory determines the type of indexer that it should create:

This information is then used for for querying the Configuration for a fully qualified class name of a suitable Indexer. For example: if the type property is local and MIME is set to text/html, the factory queries a property called neatseeker.indexer.text/html for the name of the Indexer implementation, and the property neatseeker.collector.local for the Collector class name.

The default configuration file etc/NeatSeeker.properties shows how to configure different indexers for the factory.

The lempinen.neatseeker.core.NeatMaker class uses the factory to create suitable indexers and collectors on the fly. It can be used as an entry point for any type of Indexer.


Constructor Summary
IndexerFactory()
           
 
Method Summary
static Indexer getIndexer(Configuration conf)
          Returns an indexer based on the Configuration object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

IndexerFactory

public IndexerFactory()
Method Detail

getIndexer

public static Indexer getIndexer(Configuration conf)
                          throws java.io.IOException
Returns an indexer based on the Configuration object.