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()
Annotation
getAnnotationType
in interface Annotation
public Position getBegin()
Annotation
getBegin
in interface Annotation
public Position getEnd()
Annotation
getEnd
in interface Annotation
public String getId()
Annotation
getId
in interface Annotation
public void addFeature(Feature aFeature)
Annotation
addFeature
in interface Annotation
aFeature
- The feature to be added.public Feature[] getFeatures()
Annotation
getFeatures
in interface Annotation
public boolean validate(String coveredText, String ruleID) throws Exception
Annotation
validate
in interface Annotation
coveredText
- covered text of the annotation that should be createdruleID
- ruleID (if specified) of the rule that created the matchException
public boolean hasValidator()
Annotation
hasValidator
in interface Annotation
public void typeInit(org.apache.uima.cas.TypeSystem ts) throws org.apache.uima.resource.ResourceInitializationException
ts
- org.apache.uima.resource.ResourceInitializationException
public void initialize() throws RegexAnnotatorConfigException
RegexAnnotatorConfigException
Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.