Package org.apache.uima.fit.factory
Class AnnotationFactory
java.lang.Object
org.apache.uima.fit.factory.AnnotationFactory
Convenience methods to create annotations
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends org.apache.uima.jcas.tcas.Annotation>
TcreateAnnotation
(org.apache.uima.jcas.JCas jCas, int begin, int end, Class<T> cls) Provides a convenient way to create an annotation and addToIndexes in a single line.
-
Method Details
-
createAnnotation
public static <T extends org.apache.uima.jcas.tcas.Annotation> T createAnnotation(org.apache.uima.jcas.JCas jCas, int begin, int end, Class<T> cls) Provides a convenient way to create an annotation and addToIndexes in a single line.- Type Parameters:
T
- the annotation type- Parameters:
jCas
- the JCas to create the annotation inbegin
- the begin offsetend
- the end offsetcls
- the annotation class as generated by JCasGen- Returns:
- the new annotation
-