anl.aida.ae.gate
Class InputAnnotationBuilder

java.lang.Object
  extended by anl.aida.ae.gate.AbstractUGAnnotationBuilder
      extended by anl.aida.ae.gate.InputAnnotationBuilder
All Implemented Interfaces:
AnnotationBuilder

public class InputAnnotationBuilder
extends AbstractUGAnnotationBuilder
implements AnnotationBuilder

Builds GATE style annotations from UIMA ones.


Field Summary
private  boolean indexed
           
 
Fields inherited from class anl.aida.ae.gate.AbstractUGAnnotationBuilder
annotationSet, fBuilders, gateType, type
 
Constructor Summary
InputAnnotationBuilder(java.lang.String gateType, org.apache.uima.cas.Type type, boolean indexed)
           
 
Method Summary
 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> indexMap)
          Runs the annotation builder using the supplied CAS and Document.
 void setFilter(AnnotationBuilderFilter filter)
          Adds the specified AnnotationBuilderFilter.
 
Methods inherited from class anl.aida.ae.gate.AbstractUGAnnotationBuilder
addFeatureBuilder, getAnnotationSet, getUIMAName, setAnnotationSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface anl.aida.ae.gate.AnnotationBuilder
addFeatureBuilder, getAnnotationSet, getUIMAName, setAnnotationSet
 

Field Detail

indexed

private boolean indexed
Constructor Detail

InputAnnotationBuilder

public InputAnnotationBuilder(java.lang.String gateType,
                              org.apache.uima.cas.Type type,
                              boolean indexed)
Method Detail

run

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

Specified by:
run in interface AnnotationBuilder
Parameters:
cas - the UIMA CAS
doc - the gate Document
indexMap - map of GATE Annotation id ints to UIMA AnnotationFS.
Throws:
UGMappingException - if there is an error while building the annotations.

isIndexed

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

Specified by:
isIndexed in interface AnnotationBuilder
Returns:
true if the anntotations are mapped otherwise false.

setFilter

public void setFilter(AnnotationBuilderFilter filter)
Adds the specified AnnotationBuilderFilter.

Specified by:
setFilter in interface AnnotationBuilder
Parameters:
filter - the filter to add