anl.aida.ae.lucene
Interface FieldBuilder

All Known Implementing Classes:
DefaultFieldBuilder, LuceneConsumer.CacheFieldBuilder

public interface FieldBuilder

Interface for classes that build Lucene document fields from UIMA annotations.


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.
 

Method Detail

getKeywordType

java.lang.String getKeywordType()
If this field holds keywords, then this gets the keyword type (e.g. "BioAgent"), otherwise this returns null.

Returns:
the keyword type, if applicable, otherwise null.

getFieldName

java.lang.String getFieldName()
Gets the name of the field this builder will create.

Returns:
the name of the field this builder will create.

build

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

Parameters:
cas - the CAS to use to build the field
doc - the doc to add the fields to
Throws:
AIDAException