diff options
Diffstat (limited to 'source/com/c2kernel/lifecycle/LoopDef.java')
| -rw-r--r-- | source/com/c2kernel/lifecycle/LoopDef.java | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/source/com/c2kernel/lifecycle/LoopDef.java b/source/com/c2kernel/lifecycle/LoopDef.java deleted file mode 100644 index 36108ad..0000000 --- a/source/com/c2kernel/lifecycle/LoopDef.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.c2kernel.lifecycle;
-
-import com.c2kernel.graph.model.Vertex;
-import com.c2kernel.graph.traversal.GraphTraversal;
-import com.c2kernel.lifecycle.instance.Loop;
-import com.c2kernel.lifecycle.instance.WfVertex;
-
-/**
- * @version $Revision: 1.19 $ $Date: 2005/09/29 10:18:31 $
- * @author $Author: abranson $
- */
-
-public class LoopDef extends XOrSplitDef
-{
- public boolean hasLoop = false;
- public int isNext = 0;
-
- /**
- * @see java.lang.Object#Object()
- */
- public LoopDef()
- {
- super();
- }
-
- /**
- * @see com.c2kernel.lifecycle.WfVertexDef#loop()
- */
- @Override
- public boolean loop()
- {
- return true;
- }
-
- /**
- * @see com.c2kernel.lifecycle.WfVertexDef#verify()
- */
- @Override
- public boolean verify()
- {
- if (!super.verify()) return false;
- Vertex[] nexts = getOutGraphables();
- Vertex[] anteVertices =
- GraphTraversal.getTraversal(this.getParent().getChildrenGraphModel(), this, GraphTraversal.kUp, false);
- int k = 0;
- int l = 0;
- Vertex[] brothers = getParent().getChildren();
- for (Vertex brother : brothers)
- if (brother instanceof LoopDef) l++;
- for (Vertex next : nexts)
- for (Vertex anteVertice : anteVertices)
- if (next.equals(anteVertice))
- k++;
- if (k != 1 && !(l>1))
- {
- mErrors.add("bad number of pointing back nexts");
- return false;
- }
-// if (nexts.length>2) {
-// mErrors.add("you must only have 2 nexts");
-// return false;
-// }
- return true;
- }
-
- @Override
- public boolean isLoop() {
- return true;
- }
-
- @Override
- public WfVertex instantiate() {
- Loop newLoop = new Loop();
- configureInstance(newLoop);
- return newLoop;
- }
-
-}
|
