org.apache.uima.annotator.regex
Interface Rule

All Known Implementing Classes:
Rule_impl

public interface Rule

Rule interface defines the access to the Rule settings and allows to add new Rule settings.


Field Summary
static int MATCH_ALL
           
static int MATCH_COMPLETE
           
static int MATCH_FIRST
           
static java.lang.String MATCH_GROUP_REGEX_BEGIN
           
static java.lang.String MATCH_GROUP_REGEX_END
           
static java.util.regex.Pattern MATCH_GROUP_REGEX_PATTERN
           
static java.lang.String MATCH_GROUP_START
           
 
Method Summary
 void addException(RuleException aException)
          Adds the given exception to this rule
 void addFilterFeature(FilterFeature aFeature)
          Adds the given feature to the match type filter features
 void addUpdateFeature(Feature aFeature)
          Adds the given feature to the match type annotation update features
 float getConfidence()
          Get the rule confidence
 RuleException[] getExceptions()
          Returns the exceptions for this rule
 java.lang.String getId()
          Get the rule id
 int getMatchGroupNumber(java.lang.String matchGroupName)
          Returns the match group number for the given match group name or -1 if the match group name is not available.
 int getMatchStrategy()
          Get the match strategy of this rule;
 org.apache.uima.cas.Type getMatchType()
          Get the match type of this rule.
 FeaturePath getMatchTypeFeaturePath()
          Returns the match type featurePath object.
 FilterFeature[] getMatchTypeFilterFeatures()
          Returns the match type filter features
 Feature[] getMatchTypeUpdateFeatures()
          Returns the match type annotation update features
 java.util.regex.Pattern getRegexPattern()
          Get the regular expression of this rule.
 boolean isFeaturePathMatch()
          Returns true if a featurePath for this rule was specified.
 

Field Detail

MATCH_FIRST

static final int MATCH_FIRST
See Also:
Constant Field Values

MATCH_ALL

static final int MATCH_ALL
See Also:
Constant Field Values

MATCH_COMPLETE

static final int MATCH_COMPLETE
See Also:
Constant Field Values

MATCH_GROUP_START

static final java.lang.String MATCH_GROUP_START
See Also:
Constant Field Values

MATCH_GROUP_REGEX_BEGIN

static final java.lang.String MATCH_GROUP_REGEX_BEGIN
See Also:
Constant Field Values

MATCH_GROUP_REGEX_END

static final java.lang.String MATCH_GROUP_REGEX_END
See Also:
Constant Field Values

MATCH_GROUP_REGEX_PATTERN

static final java.util.regex.Pattern MATCH_GROUP_REGEX_PATTERN
Method Detail

getRegexPattern

java.util.regex.Pattern getRegexPattern()
Get the regular expression of this rule.

Returns:
returns the regular expression of this rule.

getId

java.lang.String getId()
Get the rule id

Returns:
returns the rule id

getConfidence

float getConfidence()
Get the rule confidence

Returns:
returns the rule confidence

getMatchStrategy

int getMatchStrategy()
Get the match strategy of this rule;

Returns:
returns the match strategy of this rule.

getMatchType

org.apache.uima.cas.Type getMatchType()
Get the match type of this rule.

Returns:
returns the match type of this rule.

addFilterFeature

void addFilterFeature(FilterFeature aFeature)
Adds the given feature to the match type filter features

Parameters:
aFeature - The feature to be added.

getMatchTypeFilterFeatures

FilterFeature[] getMatchTypeFilterFeatures()
Returns the match type filter features

Returns:
returns the match type feature filters

addUpdateFeature

void addUpdateFeature(Feature aFeature)
Adds the given feature to the match type annotation update features

Parameters:
aFeature - The feature to be added.

getMatchTypeUpdateFeatures

Feature[] getMatchTypeUpdateFeatures()
Returns the match type annotation update features

Returns:
returns the match type annotation update features

addException

void addException(RuleException aException)
Adds the given exception to this rule

Parameters:
aException - The exception to be added.

getExceptions

RuleException[] getExceptions()
Returns the exceptions for this rule

Returns:
returns the exceptions for this rule

getMatchTypeFeaturePath

FeaturePath getMatchTypeFeaturePath()
Returns the match type featurePath object.

Returns:
returns the match type featurePath object

isFeaturePathMatch

boolean isFeaturePathMatch()
Returns true if a featurePath for this rule was specified.

Returns:
true if a featurePath was specified for this rule

getMatchGroupNumber

int getMatchGroupNumber(java.lang.String matchGroupName)
Returns the match group number for the given match group name or -1 if the match group name is not available.

Parameters:
matchGroupName - match group name
Returns:
returns the match group number for the given name or -1 if the match group does not exist.


Copyright © 2011. All Rights Reserved.