ix.icore.process
Class PNode
java.lang.Object
ix.icore.process.TimePoint
ix.icore.process.PNode
- All Implemented Interfaces:
- HasStatus
- Direct Known Subclasses:
- AgendaItem
public abstract class PNode
- extends TimePoint
- implements HasStatus
A node that represents an action in a process. This class
supports expansion into subactions and the propagation of status
changes, thus acting as a simple process model / simulator and
expansion planner.
Methods inherited from class ix.icore.process.TimePoint |
addPostConstraint, addPreConstraint, getMaxTime, getMinTime, getPostConstraints, getPreConstraints, hasUnboundedMax, removePostConstraint, removePreConstraint, setMaxTime, setMinTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
computeStatus
public static boolean computeStatus
modelManager
public ProcessModelManager modelManager
level
protected int level
parent
protected PNode parent
beginEnd
protected PNodeEnd beginEnd
endEnd
protected PNodeEnd endEnd
PNode
public PNode(PNode parent)
getPattern
public abstract LList getPattern()
getLevel
public int getLevel()
getBegin
public PNodeEnd getBegin()
getEnd
public PNodeEnd getEnd()
getParentPNode
public PNode getParentPNode()
getChildren
public java.util.List getChildren()
setChildren
public void setChildren(java.util.List l)
getModelManager
public ProcessModelManager getModelManager()
getVarTable
public java.util.Map getVarTable()
setVarTable
public void setVarTable(java.util.Map vt)
getRefinement
public Refinement getRefinement()
setRefinement
public void setRefinement(Refinement r)
getStatus
public abstract Status getStatus()
- Specified by:
getStatus
in interface HasStatus
isSiblingOf
public boolean isSiblingOf(PNode n)
isAncestorOf
public boolean isAncestorOf(PNode n)
isDescendentOf
public boolean isDescendentOf(PNode n)
isExpanded
public boolean isExpanded()
unlink
public void unlink()
addChild
public void addChild(PNode child,
PNode after)
expandOneLevel
public java.util.Map expandOneLevel(Refinement sourceRefinement,
MatchEnv env)
- Creates child nodes as specified by a refinement and installs
ordering links. The subnodes are constructed by a factory method
so that they can be instances of a subclass of Node and to
allow other, related objects to be constructed at the same time.
- Returns:
- a map from the ids of child nodes to those children.
The ids are taken from the node-specs in the refinement.
makePNode
protected abstract PNode makePNode(PNode parent,
LList pattern)
processOrderings
public void processOrderings(java.util.List orderings,
java.util.Map nameToChildMap)
ensureChildrenLinkedToParent
public void ensureChildrenLinkedToParent()
computeStatus
public void computeStatus()
- computeStatus() is used to change the status of related nodes
when a node changes its status.
- Specified by:
computeStatus
in interface HasStatus
setStatus
public void setStatus(Status status)
- Changes the node's status and then that of related nodes.
- Specified by:
setStatus
in interface HasStatus
assignStatus
public void assignStatus(Status status)
statusFromNodeEnds
public Status statusFromNodeEnds()
allHaveStatus
public static boolean allHaveStatus(java.util.List l,
Status status)
allComputeStatus
public static void allComputeStatus(java.util.List l)