DLESE Tools
v1.6.0

org.dlese.dpc.index.writer
Class XMLFileIndexingWriterFactory

java.lang.Object
  extended by org.dlese.dpc.index.writer.XMLFileIndexingWriterFactory

public class XMLFileIndexingWriterFactory
extends Object

Factory used to create the XmlFileIndexingWriter appropriate for handling a given XML format.

Author:
John Weatherley
See Also:
XMLFileIndexingWriter

Constructor Summary
XMLFileIndexingWriterFactory(RecordDataService rds, SimpleLuceneIndex simpleLuceneIndex, XMLIndexerFieldsConfig xmlIndexerFieldsConfig)
          Constructor for use when a RecordDataService is needed.
XMLFileIndexingWriterFactory(RecordDataService rds, SimpleLuceneIndex simpleLuceneIndex, XMLIndexerFieldsConfig xmlIndexerFieldsConfig, Hashtable additionalIndexers)
          Constructor for use when a RecordDataService is needed.
XMLFileIndexingWriterFactory(SimpleLuceneIndex simpleLuceneIndex, XMLIndexerFieldsConfig xmlIndexerFieldsConfig)
          Constructor for use when no RecordDataService is needed.
 
Method Summary
 XMLFileIndexingWriter getIndexingWriter(String collection, String xmlFormat)
          Gets the XML indexingWriter appropriate for indexing the given xml format.
 Class getIndexingWriterClass(String xmlFormat)
          returns a FileIndexing Class that can be instantiated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLFileIndexingWriterFactory

public XMLFileIndexingWriterFactory(SimpleLuceneIndex simpleLuceneIndex,
                                    XMLIndexerFieldsConfig xmlIndexerFieldsConfig)
Constructor for use when no RecordDataService is needed.

Parameters:
index - The index being used

XMLFileIndexingWriterFactory

public XMLFileIndexingWriterFactory(RecordDataService rds,
                                    SimpleLuceneIndex simpleLuceneIndex,
                                    XMLIndexerFieldsConfig xmlIndexerFieldsConfig,
                                    Hashtable additionalIndexers)
Constructor for use when a RecordDataService is needed.

Parameters:
rds - The RecordDataService being used, or null if none needed.
simpleLuceneIndex - The index being used
additionalIndexers -

XMLFileIndexingWriterFactory

public XMLFileIndexingWriterFactory(RecordDataService rds,
                                    SimpleLuceneIndex simpleLuceneIndex,
                                    XMLIndexerFieldsConfig xmlIndexerFieldsConfig)
Constructor for use when a RecordDataService is needed.

Parameters:
rds - The RecordDataService being used, or null if none needed.
simpleLuceneIndex - The index being used
Method Detail

getIndexingWriterClass

public Class getIndexingWriterClass(String xmlFormat)
returns a FileIndexing Class that can be instantiated

Parameters:
xmlFormat -
Returns:

getIndexingWriter

public XMLFileIndexingWriter getIndexingWriter(String collection,
                                               String xmlFormat)
                                        throws Exception
Gets the XML indexingWriter appropriate for indexing the given xml format.

Parameters:
collection - The collection key, for example dcc, comet, etc.
xmlFormat - The xml format specifier, for example adn, news_opps, dlese_collect.
Returns:
The indexingWriter value
Throws:
Exception - If error creating the writer

DLESE Tools
v1.6.0