|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.okapi.lib.segmentation.Rule
public class Rule
Stores the data for a SRX <rule> element.
| Field Summary | |
|---|---|
protected java.lang.String |
after
Pattern for after the break point. |
protected java.lang.String |
before
Pattern for before the break point. |
protected java.lang.String |
comment
Optional comment placed just before the rule. |
protected boolean |
isActive
Flag indicating if the rule is active. |
protected boolean |
isBreak
Flag indicating if the rule is a breaking rule. |
| Constructor Summary | |
|---|---|
Rule()
Creates an empty breaking and active Rule object. |
|
Rule(java.lang.String before,
java.lang.String after,
boolean isBreak)
Creates a Rule object with given patterns and a flag indicating if the rule is a breaking one or a breaking exception. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAfter()
Gets the pattern after the break point for this rule. |
java.lang.String |
getBefore()
Gets the pattern before the break point for this rule. |
java.lang.String |
getComment()
Gets the optional comment for this rule. |
boolean |
isActive()
Indicates if this rule is active. |
boolean |
isBreak()
Indicates if this rule is a breaking rule. |
void |
setActive(boolean value)
Sets the flag indicating if this rule is active. |
void |
setAfter(java.lang.String value)
Sets the pattern after the break point for this rule. |
void |
setBefore(java.lang.String value)
Sets the pattern before the break point for this rule. |
void |
setBreak(boolean value)
Sets the flag indicating if this rule is a breaking rule. |
void |
setComment(java.lang.String text)
Sets the comment for this rule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String before
protected java.lang.String after
protected boolean isBreak
protected boolean isActive
protected java.lang.String comment
| Constructor Detail |
|---|
public Rule()
public Rule(java.lang.String before,
java.lang.String after,
boolean isBreak)
before - the pattern for before the break point.after - the pattern for after the break point.isBreak - true if the rule is a breaking rule, false if it is a
breaking exception.| Method Detail |
|---|
public java.lang.String getBefore()
public void setBefore(java.lang.String value)
value - the new pattern before the break point for this rule.public java.lang.String getAfter()
public void setAfter(java.lang.String value)
value - the new pattern after the break point for this rule.public boolean isBreak()
public void setBreak(boolean value)
value - true if this rule is a breaking rule, false if it is a
breaking exception.public boolean isActive()
public void setActive(boolean value)
value - true if this rule is active, false otherwise.public java.lang.String getComment()
public void setComment(java.lang.String text)
text - the new comment. Use null or empty string to remove the comment.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||