anl.aida.ae.lucene
Class LuceneRRProcessor

java.lang.Object
  extended by anl.aida.ae.lucene.LuceneRRProcessor
All Implemented Interfaces:
ReaderResultProcessor

public class LuceneRRProcessor
extends java.lang.Object
implements ReaderResultProcessor

Processes ReaderResults by adding them to a LuceneIndex.


Field Summary
private  org.apache.lucene.index.IndexWriter writer
           
 
Constructor Summary
LuceneRRProcessor(org.apache.lucene.index.IndexWriter writer)
          Creates a LuceneRRProcessor that will write the specified index.
 
Method Summary
 void done()
          Notifies the processor that it is done processing results.
 void initialize()
          Initializes the processor.
 void process(ReaderResult result)
          Transforms the reader result to Document and then adds that document to a lucene index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

private org.apache.lucene.index.IndexWriter writer
Constructor Detail

LuceneRRProcessor

public LuceneRRProcessor(org.apache.lucene.index.IndexWriter writer)
Creates a LuceneRRProcessor that will write the specified index.

Parameters:
writer -
Method Detail

process

public void process(ReaderResult result)
             throws AIDAException
Transforms the reader result to Document and then adds that document to a lucene index.

Specified by:
process in interface ReaderResultProcessor
Parameters:
result - the result to add
Throws:
AIDAException - if there is an error processing the result

done

public void done()
          throws java.io.IOException
Description copied from interface: ReaderResultProcessor
Notifies the processor that it is done processing results.

Specified by:
done in interface ReaderResultProcessor
Throws:
java.io.IOException

initialize

public void initialize()
                throws AIDAException
Description copied from interface: ReaderResultProcessor
Initializes the processor.

Specified by:
initialize in interface ReaderResultProcessor
Throws:
AIDAException