anl.aida.ae.gate
Class OutputAnnotationBuilder
java.lang.Object
anl.aida.ae.gate.AbstractUGAnnotationBuilder
anl.aida.ae.gate.OutputAnnotationBuilder
- All Implemented Interfaces:
- AnnotationBuilder
public class OutputAnnotationBuilder
- extends AbstractUGAnnotationBuilder
- implements AnnotationBuilder
Builds UIMA style annotations from GATE ones.
Constructor Summary |
OutputAnnotationBuilder(java.lang.String gateType,
org.apache.uima.cas.Type type,
boolean indexed)
|
Method Summary |
private void |
buildAnnotation(org.apache.uima.cas.CAS cas,
org.apache.uima.cas.text.AnnotationFS uAnt,
gate.Annotation gAnt)
|
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
filter
private AnnotationBuilderFilter filter
OutputAnnotationBuilder
public OutputAnnotationBuilder(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.
buildAnnotation
private void buildAnnotation(org.apache.uima.cas.CAS cas,
org.apache.uima.cas.text.AnnotationFS uAnt,
gate.Annotation gAnt)
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