in RegularExpressionAnnotator/src/main/java/org/apache/uima/annotator/regex/impl/Rule_impl.java [437:484]
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("Rule ");
if (this.id != null) {
buffer.append(this.id);
}
buffer.append("\n");
buffer.append("Regex: ");
buffer.append(this.regex);
if (this.matchStrategy == Rule.MATCH_ALL) {
buffer.append("\nMatch strategy: MATCH_ALL");
} else if (this.matchStrategy == Rule.MATCH_COMPLETE) {
buffer.append("\nMatch strategy: MATCH_COMPLETE");
} else if (this.matchStrategy == Rule.MATCH_FIRST) {
buffer.append("\nMatch strategy: MATCH_FIRST");
}
buffer.append("\nMatch type: ");
buffer.append(this.matchTypeStr);
buffer.append("\nFeaturePath: ");
buffer.append(this.featurePath.getFeaturePath());
if (this.confidence != 0.0) {
buffer.append("\nConfidence: ");
buffer.append(this.confidence);
}
FilterFeature[] filterFeats = getMatchTypeFilterFeatures();
if (filterFeats.length > 0) {
buffer.append("\nMatch type filter features: \n");
}
for (int i = 0; i < filterFeats.length; i++) {
buffer.append(filterFeats[i].toString());
}
buffer.append("\n");
RuleException[] ruleExceptions = getExceptions();
if (ruleExceptions.length > 0) {
buffer.append("\nRule exceptions: \n");
}
for (int i = 0; i < ruleExceptions.length; i++) {
buffer.append(ruleExceptions[i].toString());
}
buffer.append("\n");
return buffer.toString();
}