org.dom4j.rule
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.
Version: $Revision: 1.7 $
Constructor Summary | |
---|---|
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.
|
Method Summary | |
---|---|
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()
DOCUMENT ME!
|
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. |
int | hashCode() |
boolean | matches(Node node)
DOCUMENT ME!
|
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() |
Parameters: that DOCUMENT ME! pattern DOCUMENT ME!
Parameters: that DOCUMENT ME!
Returns: DOCUMENT ME!
Returns: Value of property action.
Returns: Value of property appearenceCount.
Returns: Value of property importPrecedence.
Returns: the name of the element or attribute this pattern matches or null if this pattern matches any or more than one name.
Returns: the type of node the pattern matches which by default should return ANY_NODE if it can match any kind of node.
Returns: Value of property mode.
Returns: Value of property pattern.
Returns: Value of property priority.
Returns: an array of the rules which make up this union rule or null if this rule is not a union rule
Parameters: node DOCUMENT ME!
Returns: true if the pattern matches the given DOM4J node.
Parameters: action New value of property action.
Parameters: appearenceCount New value of property appearenceCount.
Parameters: importPrecedence New value of property importPrecedence.
Parameters: mode New value of property mode.
Parameters: pattern New value of property pattern.
Parameters: priority New value of property priority.