summaryrefslogtreecommitdiff
path: root/source/com/c2kernel/lifecycle/LoopDef.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2012-05-30 08:37:45 +0200
committerAndrew Branson <andrew.branson@cern.ch>2012-05-30 08:37:45 +0200
commitb086f57f56bf0eb9dab9cf321a0f69aaaae84347 (patch)
tree8e6e26e8b7eed6abad7a17b093bdbb55c5e6b1ba /source/com/c2kernel/lifecycle/LoopDef.java
parent22088ae8d2d5ff390518dbe1c4372325ffb3a647 (diff)
Initial Maven Conversion
Diffstat (limited to 'source/com/c2kernel/lifecycle/LoopDef.java')
-rw-r--r--source/com/c2kernel/lifecycle/LoopDef.java78
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;
- }
-
-}