anl.aida.ae.lucene
Class LuceneConsumer.CacheFieldBuilder

java.lang.Object
  extended by anl.aida.ae.lucene.LuceneConsumer.CacheFieldBuilder
All Implemented Interfaces:
FieldBuilder
Enclosing class:
LuceneConsumer

private static class LuceneConsumer.CacheFieldBuilder
extends java.lang.Object
implements FieldBuilder


Field Summary
private  java.io.File cacheDir
           
 
Constructor Summary
LuceneConsumer.CacheFieldBuilder(java.lang.String dir)
           
 
Method Summary
 org.apache.lucene.document.Field build(org.apache.uima.cas.CAS cas, org.apache.lucene.document.Document doc, Keywords keywords)
          Builds a Field in the specified Document using values from the specified CAS.
 java.lang.String getFieldName()
          Gets the name of the field this builder will create.
 java.lang.String getKeywordType()
          If this field holds keywords, then this gets the keyword type (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheDir

private java.io.File cacheDir
Constructor Detail

LuceneConsumer.CacheFieldBuilder

public LuceneConsumer.CacheFieldBuilder(java.lang.String dir)
Method Detail

getFieldName

public java.lang.String getFieldName()
Description copied from interface: FieldBuilder
Gets the name of the field this builder will create.

Specified by:
getFieldName in interface FieldBuilder
Returns:
the name of the field this builder will create.

getKeywordType

public java.lang.String getKeywordType()
Description copied from interface: FieldBuilder
If this field holds keywords, then this gets the keyword type (e.g. "BioAgent"), otherwise this returns null.

Specified by:
getKeywordType in interface FieldBuilder
Returns:
the keyword type, if applicable, otherwise null.

build

public org.apache.lucene.document.Field build(org.apache.uima.cas.CAS cas,
                                              org.apache.lucene.document.Document doc,
                                              Keywords keywords)
                                       throws AIDAException
Description copied from interface: FieldBuilder
Builds a Field in the specified Document using values from the specified CAS.

Specified by:
build in interface FieldBuilder
Parameters:
cas - the CAS to use to build the field
doc - the doc to add the fields to
Throws:
AIDAException