|
SienaXML (v.2.0.0) API documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsiena.xml.rules.Rule
public class Rule
This object represent the idea of a Rule which is applied to XML statements. Currently the rule is used for XSchema processing only.
Constructor Summary | |
---|---|
Rule(java.lang.String target,
java.lang.String action)
This is the constructor for the rule. |
Method Summary | |
---|---|
void |
addCondition(siena.xml.rules.Condition condition)
This method will add a condition to the list of conditions which need to be met by the target in order for the rule to apply to it. |
java.lang.String |
apply(org.w3c.dom.Node node)
This method will apply the rule to the node. |
boolean |
doesRuleApplyToNode(org.w3c.dom.Node node)
This method determins if a DOM tree node matches the target and condition for this rule. |
java.lang.String |
getAction()
This method will return the string version of the action. |
java.lang.String |
getTarget()
This method returns the target string for the rule. |
java.lang.String |
getTargetTag()
Returns the XML target tag. |
void |
setAttributeTargets(java.util.Vector targets)
Sets the attribute targets for the rule. |
void |
setToAndRule()
Sets this rule to an "and" rule |
void |
setToOrRule()
Sets this rule to an "or" rule |
java.lang.String |
toString()
Method to convert the Object to a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Rule(java.lang.String target, java.lang.String action)
target
- This is the target string to apply the rule to. This
can be a tag or an attribute in the XSchema file.action
- A string containing the action.Method Detail |
---|
public java.lang.String getAction()
public boolean doesRuleApplyToNode(org.w3c.dom.Node node)
node
- The node to be tested to see if the rule can be applied to it.
public void addCondition(siena.xml.rules.Condition condition)
condition
- A string description of the condition.public java.lang.String getTarget()
public void setToAndRule()
public void setToOrRule()
public java.lang.String getTargetTag()
public void setAttributeTargets(java.util.Vector targets)
public java.lang.String apply(org.w3c.dom.Node node)
node
- A DOM tree node for the XML document
public java.lang.String toString()
toString
in class java.lang.Object
|
SienaXML (v.2.0.0) API documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |