|
||||||||||
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(java.lang.String regex,
int matchStrategy,
java.lang.String matchType,
java.lang.String id,
float confidence,
java.lang.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 |
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. |
void |
initialize()
|
boolean |
isFeaturePathMatch()
Returns true if a featurePath for this rule was specified. |
java.lang.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(java.lang.String regex, int matchStrategy, java.lang.String matchType, java.lang.String id, float confidence, java.lang.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 Rule
aFeature
- The feature to be added.public FilterFeature[] getMatchTypeFilterFeatures()
Rule
getMatchTypeFilterFeatures
in interface Rule
public int getMatchStrategy()
Rule
getMatchStrategy
in interface Rule
public org.apache.uima.cas.Type getMatchType()
Rule
getMatchType
in interface Rule
public java.util.regex.Pattern getRegexPattern()
Rule
getRegexPattern
in interface Rule
public float getConfidence()
Rule
getConfidence
in interface Rule
public java.lang.String getId()
Rule
getId
in interface Rule
public void addUpdateFeature(Feature aFeature)
Rule
addUpdateFeature
in interface Rule
aFeature
- The feature to be added.public Feature[] getMatchTypeUpdateFeatures()
Rule
getMatchTypeUpdateFeatures
in interface Rule
public void addException(RuleException aException)
Rule
addException
in interface Rule
aException
- The exception to be added.public RuleException[] getExceptions()
Rule
getExceptions
in interface Rule
public FeaturePath getMatchTypeFeaturePath()
Rule
getMatchTypeFeaturePath
in interface Rule
public 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
RegexAnnotatorConfigException
public int getMatchGroupNumber(java.lang.String matchGroupName)
Rule
getMatchGroupNumber
in interface Rule
matchGroupName
- match group name
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |