anl.aida.ae.gate
Interface AnnotationBuilder

All Known Implementing Classes:
InputAnnotationBuilder, OutputAnnotationBuilder

public interface AnnotationBuilder

Interface for classes that port Annotations between UIMA representations and GATE.


Method Summary
 void addFeatureBuilder(FeatureBuilder builder)
          Adds the specified feature builder.
 java.lang.String getAnnotationSet()
          Gets the name of GATE annotation set, if any, used by this builder.
 java.lang.String getUIMAName()
          Gets the UIMA name of this annotation builder.
 boolean isIndexed()
          Returns whether or not this AnnotationBuilder will map the gate and uima annotations to each other.
 void run(org.apache.uima.cas.CAS cas, gate.Document doc, java.util.Map<java.lang.Integer,org.apache.uima.cas.FeatureStructure> index)
          Runs the annotation builder using the supplied CAS and Document.
 void setAnnotationSet(java.lang.String annotationSet)
          Sets the name of GATE annotation set, if any, used by this builder.
 void setFilter(AnnotationBuilderFilter filter)
          Sets the specified AnnotationBuilderFilter.
 

Method Detail

run

void run(org.apache.uima.cas.CAS cas,
         gate.Document doc,
         java.util.Map<java.lang.Integer,org.apache.uima.cas.FeatureStructure> index)
         throws UGMappingException
Runs the annotation builder using the supplied CAS and Document. Annotations will be transfered between the two.

Parameters:
cas - the UIMA CAS
doc - the gate Document
index - Map of GATE Annotation id ints to UIMA AnnotationFS.
Throws:
UGMappingException - if there is an error while building the annotations.

isIndexed

boolean isIndexed()
Returns whether or not this AnnotationBuilder will map the gate and uima annotations to each other.

Returns:
true if the anntotations are mapped otherwise false.

getUIMAName

java.lang.String getUIMAName()
Gets the UIMA name of this annotation builder.

Returns:
the UIMA name of this annotation builder.

getAnnotationSet

java.lang.String getAnnotationSet()
Gets the name of GATE annotation set, if any, used by this builder.

Returns:
the name of GATE annotation set used by this builder, or null if not set is specified.

setAnnotationSet

void setAnnotationSet(java.lang.String annotationSet)
Sets the name of GATE annotation set, if any, used by this builder.

Parameters:
annotationSet - the name of the annotation set.

addFeatureBuilder

void addFeatureBuilder(FeatureBuilder builder)
Adds the specified feature builder.

Parameters:
builder - the builder to add

setFilter

void setFilter(AnnotationBuilderFilter filter)
Sets the specified AnnotationBuilderFilter.

Parameters:
filter - the filter to set