ix.icore.process
Class PNode

java.lang.Object
  |
  +--ix.icore.process.PNode
Direct Known Subclasses:
AgendaItem

public abstract class PNode
extends java.lang.Object

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.


Inner Class Summary
 class PNode.MakeVarIfUnbound
           
 
Field Summary
 LList children
           
 int level
           
 ProcessModelManager modelManager
           
 java.util.Map nameToChildMap
           
 PNode parent
           
 java.util.List postNodes
           
 java.util.List preNodes
           
 Refinement refinement
           
 java.util.Map varTable
           
 
Constructor Summary
PNode(PNode parent)
           
 
Method Summary
static void allComputeStatus(java.util.List l)
           
static boolean allHaveStatus(java.util.List l, Status status)
           
 void computeStatus()
          computeStatus() is used to change the status of related nodes when a node changes its status.
 void expandOneLevel(Refinement sourceRefinement, MatchEnv env, PNodeMaker nodeMaker)
          Creates child nodes as specified by a refinement and installs ordering links.
protected  PNode getChild(Name name)
           
abstract  Status getStatus()
           
 boolean isAncestorOf(PNode n)
           
 boolean isDescendentOf(PNode n)
           
protected  void linkBefore(PNode after)
           
protected  void processOrderings(java.util.List orderings)
           
 void setStatus(Status status)
          Changes the node's status and then that of related nodes.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelManager

public ProcessModelManager modelManager

level

public int level

parent

public PNode parent

children

public LList children

nameToChildMap

public java.util.Map nameToChildMap

varTable

public java.util.Map varTable

preNodes

public java.util.List preNodes

postNodes

public java.util.List postNodes

refinement

public Refinement refinement
Constructor Detail

PNode

public PNode(PNode parent)
Method Detail

getStatus

public abstract Status getStatus()

isAncestorOf

public boolean isAncestorOf(PNode n)

isDescendentOf

public boolean isDescendentOf(PNode n)

expandOneLevel

public void expandOneLevel(Refinement sourceRefinement,
                           MatchEnv env,
                           PNodeMaker nodeMaker)
Creates child nodes as specified by a refinement and installs ordering links. The subnodes are constructed by a NodeMaker so that they can be instances of a subclass of Node and to allow other, related objects to be constructed at the same time.

processOrderings

protected void processOrderings(java.util.List orderings)

getChild

protected PNode getChild(Name name)

linkBefore

protected void linkBefore(PNode after)

computeStatus

public void computeStatus()
computeStatus() is used to change the status of related nodes when a node changes its status.

setStatus

public void setStatus(Status status)
Changes the node's status and then that of related nodes.

allHaveStatus

public static boolean allHaveStatus(java.util.List l,
                                    Status status)

allComputeStatus

public static void allComputeStatus(java.util.List l)