|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ix.ip2.ProcessModel
A ProcessModel contains a model of a process and handles the propagation of state changes. There are a number of interior classes so that the whole thing can be contained in one file and can avoid name conflicts with other parts of ACP3 (e.g. for class names such as "Node").
A ProcessModel receives information from a Watcher and is therefore an implementation of WatcherListener. It sends information to an implementation of ProcessViewer.
Before you can do anything very interesting, you have to install a viewer and read in a process definition. For example:
ProcessModel model = new ProcessModel(); model.setViewer(someViewer); model.initFromFile("ProcessModels/acp3-process.lsp");
WatcherListener
,
ProcessViewer
Inner Class Summary | |
(package private) class |
ProcessModel.Node
Nodes represent actions in the process. |
(package private) static class |
ProcessModel.NodeTable
Nodes are stored in a NodeTable, indexed by pattern. |
(package private) class |
ProcessModel.OverallCell
Overall column cells, a member class of ProcessModel. |
(package private) class |
ProcessModel.OverallCollectionCell
A subclass of OverallCell that reports the collective status of some earlier row. |
(package private) static class |
ProcessModel.Schema
A Schema describes a possible action in the process being modelled. |
(package private) static interface |
ProcessModel.SchemaSymbols
SchemaSymbols defines constants that are useful when processing either schema definitions as they appear in files or the resulting schemas themselves. |
(package private) static class |
ProcessModel.SchemaTable
A SchemaTable contains Schemas that describe the possible actions in a process. |
Field Summary | |
(package private) java.util.Vector |
allNodes
|
(package private) HashedSet |
changedNodes
|
(package private) ProcessModel.NodeTable |
nodeTable
|
(package private) int |
numberOfCoas
|
(package private) java.util.Hashtable |
overallColumn
|
(package private) java.util.Hashtable |
rowTable
|
(package private) ProcessModel.SchemaTable |
schemaTable
|
(package private) ProcessViewer |
viewer
|
Constructor Summary | |
ProcessModel()
Create an empty ProcessModel. |
Method Summary | |
void |
addCoa(int coaNumber)
Add the actions for a new COA to the model. |
(package private) void |
addRowElement(ProcessModel.Node node)
|
void |
checkConnectivity()
Checks that we can reach all of the nodes in various ways. |
LList |
depthFirstFinishOrder(LList roots,
Function1 successors)
|
private void |
dffoWalk_(java.lang.Object at,
Function1 sf,
java.util.Hashtable marks,
ListCollector result)
|
(package private) ProcessModel.OverallCell |
ensureOverallCell(java.lang.String action)
|
LList |
finalNodes()
|
LList |
finalNodes(java.util.Enumeration ne,
int level)
|
ProcessModel.Node |
findActionNode(java.lang.String action)
|
ProcessModel.Node |
findActionNode(java.lang.String action,
int coa)
|
protected ProcessModel.Node |
findNode(LList pattern)
|
(package private) ProcessModel.OverallCell |
findOverallCell(java.lang.String action)
|
void |
finishAction(java.lang.String action)
Called by a watcher when it detects that an action has finished. |
void |
finishAction(java.lang.String action,
int coa)
Called by a watcher when it detects that an action has finished. |
void |
finishAction(java.lang.String action,
int coa,
int level)
Called by a watcher when it detects that an action has finished. |
protected java.util.Vector |
fullStateDescription()
|
void |
initFromFile(java.lang.String filename)
Read action definitions from a file. |
LList |
initialNodes()
|
LList |
initialNodes(java.util.Enumeration ne,
int level)
|
protected int[] |
issueCounts()
|
(package private) ProcessModel.OverallCell |
newOverallCellInstance(java.lang.String action)
Create an instance of an appropriate OverallCell class. |
LList |
nodesAfter(ProcessModel.Node before)
|
LList |
nodesBefore(ProcessModel.Node after)
|
LList |
nodesBetween(ProcessModel.Node before,
ProcessModel.Node after)
|
LList |
nodesInDepthFirstFinishOrder()
|
(package private) void |
registerNode(ProcessModel.Node node)
|
void |
reset()
Remove all COAs, their associated actions, and all current state information. |
protected void |
resetChangeRecord()
|
protected void |
seeIfNewCoa(int coa)
|
void |
sendFullStateDescription()
Send the viewer a complete state description, rather than a delta. |
void |
setViewer(ProcessViewer viewer)
Install a viewer that will be sent status information when changes occur. |
void |
startAction(java.lang.String action)
Called by a watcher when it detects that an action has started. |
void |
startAction(java.lang.String action,
int coa)
Called by a watcher when it detects that an action has started. |
void |
startAction(java.lang.String action,
int coa,
int level)
Called by a watcher when it detects that an action has started. |
protected void |
startRecordingChanges()
|
LList |
staticExpansionTree()
Returns a tree that shows the action nesting present process, to the extent that this can be determined directly from the schema definitions. |
protected java.util.Vector |
statusChanges()
|
protected void |
tellViewer()
|
LList |
topLevelNodes()
|
Methods inherited from class java.lang.Object |
|
Field Detail |
ProcessViewer viewer
ProcessModel.SchemaTable schemaTable
ProcessModel.NodeTable nodeTable
java.util.Vector allNodes
java.util.Hashtable rowTable
java.util.Hashtable overallColumn
int numberOfCoas
HashedSet changedNodes
Constructor Detail |
public ProcessModel()
Method Detail |
public void setViewer(ProcessViewer viewer)
public void initFromFile(java.lang.String filename)
public LList staticExpansionTree()
public void reset()
public void addCoa(int coaNumber)
public void sendFullStateDescription()
protected java.util.Vector fullStateDescription()
public void startAction(java.lang.String action)
public void startAction(java.lang.String action, int coa)
public void startAction(java.lang.String action, int coa, int level)
public void finishAction(java.lang.String action)
public void finishAction(java.lang.String action, int coa)
public void finishAction(java.lang.String action, int coa, int level)
protected void seeIfNewCoa(int coa)
protected void startRecordingChanges()
protected void resetChangeRecord()
protected void tellViewer()
protected java.util.Vector statusChanges()
protected int[] issueCounts()
void registerNode(ProcessModel.Node node)
protected ProcessModel.Node findNode(LList pattern)
public ProcessModel.Node findActionNode(java.lang.String action)
public ProcessModel.Node findActionNode(java.lang.String action, int coa)
void addRowElement(ProcessModel.Node node)
ProcessModel.OverallCell ensureOverallCell(java.lang.String action)
ProcessModel.OverallCell findOverallCell(java.lang.String action)
public LList topLevelNodes()
public LList initialNodes()
public LList initialNodes(java.util.Enumeration ne, int level)
public LList finalNodes()
public LList finalNodes(java.util.Enumeration ne, int level)
public LList nodesBefore(ProcessModel.Node after)
public LList nodesAfter(ProcessModel.Node before)
public LList nodesBetween(ProcessModel.Node before, ProcessModel.Node after)
public LList nodesInDepthFirstFinishOrder()
public LList depthFirstFinishOrder(LList roots, Function1 successors)
private void dffoWalk_(java.lang.Object at, Function1 sf, java.util.Hashtable marks, ListCollector result)
public void checkConnectivity()
ProcessModel.OverallCell newOverallCellInstance(java.lang.String action)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |