anl.aida.ae.gate
Class InputAnnotationBuilder
java.lang.Object
anl.aida.ae.gate.AbstractUGAnnotationBuilder
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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
indexed
private boolean indexed
InputAnnotationBuilder
public InputAnnotationBuilder(java.lang.String gateType,
org.apache.uima.cas.Type type,
boolean indexed)
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 CASdoc
- the gate DocumentindexMap
- 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