public class Rule extends Object implements Comparable
Rule
matches against DOM4J Node so that some action
can be performed such as in the XSLT processing model.
Modifier and Type | Field and Description |
---|---|
private Action |
action
Holds value of property action.
|
private int |
appearenceCount
Holds value of property appearenceCount.
|
private int |
importPrecedence
Holds value of property importPrecedence.
|
private String |
mode
Holds value of property mode.
|
private Pattern |
pattern
Holds value of property pattern.
|
private double |
priority
Holds value of property priority.
|
Constructor and Description |
---|
Rule() |
Rule(Pattern pattern) |
Rule(Pattern pattern,
Action action) |
Rule(Rule that,
Pattern pattern)
Constructs a new Rule with the same instance data
as the given rule but a different pattern.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object that) |
int |
compareTo(Rule that)
Compares two rules in XSLT processing model order
assuming that the modes are equal.
|
boolean |
equals(Object that) |
Action |
getAction()
Getter for property action.
|
int |
getAppearenceCount()
Getter for property appearenceCount.
|
int |
getImportPrecedence()
Getter for property importPrecedence.
|
String |
getMatchesNodeName()
For patterns which only match an ATTRIBUTE_NODE or an
ELEMENT_NODE then this pattern may return the name of the
element or attribute it matches.
|
short |
getMatchType() |
String |
getMode()
Getter for property mode.
|
Pattern |
getPattern()
Getter for property pattern.
|
double |
getPriority()
Getter for property priority.
|
Rule[] |
getUnionRules()
If this rule contains a union pattern then this
method should return an array of Rules which
describe the union rule, which should contain more than one rule.
|
boolean |
matches(Node node) |
void |
setAction(Action action)
Setter for property action.
|
void |
setAppearenceCount(int appearenceCount)
Setter for property appearenceCount.
|
void |
setImportPrecedence(int importPrecedence)
Setter for property importPrecedence.
|
void |
setMode(String mode)
Setter for property mode.
|
void |
setPattern(Pattern pattern)
Setter for property pattern.
|
void |
setPriority(double priority)
Setter for property priority.
|
String |
toString() |
private int importPrecedence
private double priority
private int appearenceCount
public Rule()
public int compareTo(Object that)
compareTo
in interface Comparable
public int compareTo(Rule that)
public final boolean matches(Node node)
public Rule[] getUnionRules()
public final short getMatchType()
public final String getMatchesNodeName()
public void setMode(String mode)
mode
- New value of property mode.public int getImportPrecedence()
public void setImportPrecedence(int importPrecedence)
importPrecedence
- New value of property importPrecedence.public double getPriority()
public void setPriority(double priority)
priority
- New value of property priority.public int getAppearenceCount()
public void setAppearenceCount(int appearenceCount)
appearenceCount
- New value of property appearenceCount.public Pattern getPattern()
public void setPattern(Pattern pattern)
pattern
- New value of property pattern.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses