use of org.cristalise.kernel.lifecycle.instance.Next in project kernel by cristal-ise.
the class WfDirectedEdgeRenderer method draw.
@Override
public void draw(Graphics2D g2d, DirectedEdge directedEdge) {
Next next = (Next) directedEdge;
boolean hasError = !next.verify();
String label = (String) next.getBuiltInProperty(ALIAS);
String type = (String) next.getBuiltInProperty(TYPE);
draw(g2d, directedEdge, label, type, hasError);
}
use of org.cristalise.kernel.lifecycle.instance.Next in project kernel by cristal-ise.
the class CastorXMLTest method testGraphMultiPointEdge.
@Test
public void testGraphMultiPointEdge() throws Exception {
CastorXMLUtility marshaller = Gateway.getMarshaller();
GraphableEdge edge = new Next();
edge.getMultiPoints().put(1, new GraphPoint(0, 0));
edge.getMultiPoints().put(2, new GraphPoint(100, 100));
edge.getMultiPoints().put(3, new GraphPoint(200, 100));
GraphableEdge edgePrime = (GraphableEdge) marshaller.unmarshall(marshaller.marshall(edge));
assertThat(edge).isEqualToComparingFieldByField(edgePrime);
Logger.msg(marshaller.marshall(edge));
Logger.msg(marshaller.marshall(edgePrime));
}
use of org.cristalise.kernel.lifecycle.instance.Next in project kernel by cristal-ise.
the class CompositeActivityDef method instantiateEdges.
/**
* Loops through the edges of children graph model and calls their instantiate method
*
* @param ca the parent CompositeActivity instance which will be set as a Parent
* @return the instantiated array of edge instances called Next
*/
public Next[] instantiateEdges(CompositeActivity ca) {
Next[] nexts = new Next[getChildrenGraphModel().getEdges().length];
for (int i = 0; i < getChildrenGraphModel().getEdges().length; i++) {
NextDef nextDef = (NextDef) getChildrenGraphModel().getEdges()[i];
nexts[i] = nextDef.instantiate();
nexts[i].setParent(ca);
}
return nexts;
}
use of org.cristalise.kernel.lifecycle.instance.Next in project kernel by cristal-ise.
the class NextDef method instantiate.
public Next instantiate() {
Next next = new Next();
next.setID(getID());
next.setOriginVertexId(getOriginVertexId());
next.setTerminusVertexId(getTerminusVertexId());
next.setProperties(getProperties());
next.setOriginPoint(getOriginPoint());
next.setTerminusPoint(getTerminusPoint());
return next;
}
Aggregations