|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.uima.annotator.regex.impl.Rule_impl
public class Rule_impl
Implementation of the Rule interface.
| Field Summary |
|---|
| Fields inherited from interface org.apache.uima.annotator.regex.Rule |
|---|
MATCH_ALL, MATCH_COMPLETE, MATCH_FIRST, MATCH_GROUP_REGEX_BEGIN, MATCH_GROUP_REGEX_END, MATCH_GROUP_REGEX_PATTERN, MATCH_GROUP_START |
| Constructor Summary | |
|---|---|
Rule_impl(String regex,
int matchStrategy,
String matchType,
String id,
float confidence,
String featurePath,
RegexVariables variables)
Constructor to create a new Rule object. |
|
| 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 |
String |
getId()
Get the rule id |
int |
getMatchGroupNumber(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 |
Pattern |
getRegexPattern()
Get the regular expression of this rule. |
void |
initialize()
|
boolean |
isFeaturePathMatch()
Returns true if a featurePath for this rule was specified. |
String |
toString()
|
void |
typeInit(org.apache.uima.cas.TypeSystem ts)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Rule_impl(String regex,
int matchStrategy,
String matchType,
String id,
float confidence,
String featurePath,
RegexVariables variables)
regex - regex pattern as StringmatchStrategy - matching strategymatchType - match type as Stringid - rule id (can also be null)confidence - confidence valuefeaturePath - featurePath (can also be null)| Method Detail |
|---|
public void addFilterFeature(FilterFeature aFeature)
Rule
addFilterFeature in interface RuleaFeature - The feature to be added.public FilterFeature[] getMatchTypeFilterFeatures()
Rule
getMatchTypeFilterFeatures in interface Rulepublic int getMatchStrategy()
Rule
getMatchStrategy in interface Rulepublic org.apache.uima.cas.Type getMatchType()
Rule
getMatchType in interface Rulepublic Pattern getRegexPattern()
Rule
getRegexPattern in interface Rulepublic float getConfidence()
Rule
getConfidence in interface Rulepublic String getId()
Rule
getId in interface Rulepublic void addUpdateFeature(Feature aFeature)
Rule
addUpdateFeature in interface RuleaFeature - The feature to be added.public Feature[] getMatchTypeUpdateFeatures()
Rule
getMatchTypeUpdateFeatures in interface Rulepublic void addException(RuleException aException)
Rule
addException in interface RuleaException - The exception to be added.public RuleException[] getExceptions()
Rule
getExceptions in interface Rulepublic FeaturePath getMatchTypeFeaturePath()
Rule
getMatchTypeFeaturePath in interface Rulepublic boolean isFeaturePathMatch()
Rule
isFeaturePathMatch in interface Rule
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
RegexAnnotatorConfigExceptionpublic int getMatchGroupNumber(String matchGroupName)
Rule
getMatchGroupNumber in interface RulematchGroupName - match group name
public String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||