public class RdrNode
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
RdrNode()
Default constructor
|
RdrNode(RdrNode pParent,
RdrNode pTrueChild,
RdrNode pFalseChild,
java.lang.String pCondition,
Element pConclusion,
Element pCornerStone)
Construct a new RdrNode
|
RdrNode(RdrNode parent,
java.lang.String condition,
Element conclusion)
Construct a node with the basic values provided
|
RdrNode(java.lang.String xml)
Construct a node from an xml representation
|
RdrNode(java.lang.String condition,
Element conclusion,
Element cornerstone)
Construct a node with the basic values provided
|
RdrNode(java.lang.String condition,
RdrConclusion conclusion,
Element cornerstone)
Construct a node with the basic values provided
|
RdrNode(XNode node)
Construct a node from an XNode representation
|
Modifier and Type | Method and Description |
---|---|
RdrNode |
clone() |
boolean |
equals(java.lang.Object o) |
void |
fromXML(java.lang.String xml) |
protected void |
fromXNode(XNode xNode)
Only called when adding a new node, so it will have no id, parent or children,
or for WorkletRunner transport, where connected nodes are not required
|
RdrConclusion |
getConclusion() |
java.lang.String |
getCondition() |
Element |
getCornerStone() |
java.lang.String |
getDescription() |
RdrNode |
getFalseChild() |
long |
getNodeId() |
RdrNode |
getParent() |
RdrNode |
getTrueChild() |
int |
hashCode() |
boolean |
hasIdenticalContent(RdrNode other)
Compares another node to this for equality in condition, conclusion and
cornerstone values
|
boolean |
isLeaf() |
RdrPair |
search(Element caseData,
RdrNode lastTrueNode)
Recursively search each node using the condition of each to determine
the path to take through the tree of which this node is a member.
|
void |
setAttributes(YAttributeMap map,
java.lang.String taskName) |
void |
setConclusion(RdrConclusion newConclusion) |
void |
setCondition(java.lang.String newCondition) |
void |
setCornerStone(Element newCorner) |
void |
setDescription(java.lang.String desc) |
void |
setFalseChild(RdrNode childNode) |
void |
setNodeID(long nodeID) |
void |
setParent(RdrNode parentNode) |
void |
setTrueChild(RdrNode childNode) |
java.lang.String |
toString()
returns a String representation of this node
|
java.lang.String |
toXML() |
XNode |
toXNode() |
public RdrNode()
public RdrNode(RdrNode pParent, RdrNode pTrueChild, RdrNode pFalseChild, java.lang.String pCondition, Element pConclusion, Element pCornerStone)
pParent
- - the parent node of this nodepTrueChild
- - the node on this node's true branchpFalseChild
- - the node on this node's false branchpCondition
- - the condition stored in this nodepConclusion
- - the conclusion stored in this nodepCornerStone
- - the cornerstone case data for this nodepublic RdrNode(java.lang.String xml)
xml
- - the xml that describes the new nodepublic RdrNode(XNode node)
node
- - the x-node that describes the new nodepublic RdrNode(RdrNode parent, java.lang.String condition, Element conclusion)
parent
- - the parent node of this nodecondition
- - the condition stored in this nodeconclusion
- - the conclusion stored in this nodepublic RdrNode(java.lang.String condition, Element conclusion, Element cornerstone)
condition
- - the condition stored in this nodeconclusion
- - the conclusion stored in this nodecornerstone
- - the data set that led to the creation of this nodepublic RdrNode(java.lang.String condition, RdrConclusion conclusion, Element cornerstone)
condition
- - the condition stored in this nodeconclusion
- - the conclusion stored in this nodecornerstone
- - the data set that led to the creation of this nodepublic RdrNode clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public long getNodeId()
public java.lang.String getCondition()
public RdrConclusion getConclusion()
public Element getCornerStone()
public RdrNode getFalseChild()
public RdrNode getTrueChild()
public RdrNode getParent()
public java.lang.String getDescription()
public boolean isLeaf()
public void setNodeID(long nodeID)
public void setCondition(java.lang.String newCondition)
public void setConclusion(RdrConclusion newConclusion)
public void setCornerStone(Element newCorner)
public void setFalseChild(RdrNode childNode)
public void setTrueChild(RdrNode childNode)
public void setParent(RdrNode parentNode)
public void setDescription(java.lang.String desc)
public void setAttributes(YAttributeMap map, java.lang.String taskName)
public boolean hasIdenticalContent(RdrNode other)
other
- the other nodepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public RdrPair search(Element caseData, RdrNode lastTrueNode)
caseData
- - a JDOM Element that contains the set of data
attributes and values that are used to evaluate the conditional
expressionslastTrueNode
- - the RdrNode that contains the last satisfied
conditionpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toXML()
public XNode toXNode()
public void fromXML(java.lang.String xml)
protected void fromXNode(XNode xNode)
xNode
- Copyright © 2004-2014 The YAWL Foundation.