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 Annotation>
TcreateAnnotation(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 Annotation> T createAnnotation(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
-