public class Annotation_impl extends Object implements Annotation
| Constructor and Description |
|---|
Annotation_impl(String annotId,
String annotType,
Position begin,
Position end,
String validationClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFeature(Feature aFeature)
Adds the given feature to this annotation.
|
org.apache.uima.cas.Type |
getAnnotationType()
Get the annotation type of this annotation.
|
Position |
getBegin()
Get the annotation begin position of this annotation.
|
Position |
getEnd()
Get the annotation end position of this annotation.
|
Feature[] |
getFeatures()
Returns the feature array for this annotation
|
String |
getId()
Get the annotation identifier.
|
boolean |
hasValidator()
Returns true if for the current annotation an validator is available.
|
void |
initialize()
initialize the Regex Annotation object with all the annotation features
|
String |
toString() |
void |
typeInit(org.apache.uima.cas.TypeSystem ts) |
boolean |
validate(String coveredText,
String ruleID)
Validate the covered Text of the annotation and checks if the annotation
is valid or not.
|
public org.apache.uima.cas.Type getAnnotationType()
AnnotationgetAnnotationType in interface Annotationpublic Position getBegin()
AnnotationgetBegin in interface Annotationpublic Position getEnd()
AnnotationgetEnd in interface Annotationpublic String getId()
AnnotationgetId in interface Annotationpublic void addFeature(Feature aFeature)
AnnotationaddFeature in interface AnnotationaFeature - The feature to be added.public Feature[] getFeatures()
AnnotationgetFeatures in interface Annotationpublic boolean validate(String coveredText, String ruleID) throws Exception
Annotationvalidate in interface AnnotationcoveredText - covered text of the annotation that should be createdruleID - ruleID (if specified) of the rule that created the matchExceptionpublic boolean hasValidator()
AnnotationhasValidator in interface Annotationpublic void typeInit(org.apache.uima.cas.TypeSystem ts)
throws org.apache.uima.resource.ResourceInitializationException
ts - org.apache.uima.resource.ResourceInitializationExceptionpublic void initialize()
throws RegexAnnotatorConfigException
RegexAnnotatorConfigExceptionCopyright © 2006–2025 The Apache Software Foundation. All rights reserved.