org.apache.uima.annotator.regex
Interface Annotation

All Known Implementing Classes:
Annotation_impl

public interface Annotation


Method Summary
 void addFeature(Feature aFeat)
          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
 java.lang.String getId()
          Get the annotation identifier.
 boolean hasValidator()
          Returns true if for the current annotation an validator is available.
 boolean validate(java.lang.String coveredText, java.lang.String ruleID)
          Validate the covered Text of the annotation and checks if the annotation is valid or not.
 

Method Detail

getId

java.lang.String getId()
Get the annotation identifier.

Returns:
returns the annotation identifier

getAnnotationType

org.apache.uima.cas.Type getAnnotationType()
Get the annotation type of this annotation.

Returns:
returns the annotation type of this annotation

getBegin

Position getBegin()
Get the annotation begin position of this annotation.

Returns:
returns the annotation begin position.

getEnd

Position getEnd()
Get the annotation end position of this annotation.

Returns:
returns the annotation end position.

addFeature

void addFeature(Feature aFeat)
Adds the given feature to this annotation.

Parameters:
aFeat - The feature to be added.

getFeatures

Feature[] getFeatures()
Returns the feature array for this annotation

Returns:
returns the feature array for this annotation

validate

boolean validate(java.lang.String coveredText,
                 java.lang.String ruleID)
                 throws java.lang.Exception
Validate the covered Text of the annotation and checks if the annotation is valid or not.

Parameters:
coveredText - covered text of the annotation that should be created
ruleID - ruleID (if specified) of the rule that created the match
Returns:
true if the annotation is valid or if not validation was specified. If the annotation is invalid, false is returned.
Throws:
java.lang.Exception

hasValidator

boolean hasValidator()
Returns true if for the current annotation an validator is available.

Returns:
Returns true if an validator is available.


Copyright © 2011. All Rights Reserved.