protected FlowNodeGraph createFlowNodeGraph( FlowStepFactory flowStepFactory, FlowElementGraph flowElementGraph, Map<ElementGraph, List<? extends ElementGraph>> pipelineSubGraphsMap, List<? extends ElementGraph> nodeSubGraphs ) { return new FlowNodeGraph( flowStepFactory.getFlowNodeFactory(), flowElementGraph, nodeSubGraphs, pipelineSubGraphsMap ); } }
public FlowStepGraph( FlowStepFactory flowStepFactory, FlowElementGraph flowElementGraph, Map<ElementGraph, List<? extends ElementGraph>> nodeSubGraphsMap, Map<ElementGraph, List<? extends ElementGraph>> pipelineSubGraphsMap ) { buildGraph( flowStepFactory, flowElementGraph, nodeSubGraphsMap, pipelineSubGraphsMap ); Iterator<FlowStep> iterator = getTopologicalIterator(); int ordinal = 0; int size = vertexSet().size(); while( iterator.hasNext() ) { BaseFlowStep flowStep = (BaseFlowStep) iterator.next(); flowStep.setOrdinal( ordinal++ ); flowStep.setName( flowStepFactory.makeFlowStepName( flowStep, size, flowStep.getOrdinal() ) ); } }
protected void buildGraph( FlowStepFactory flowStepFactory, FlowElementGraph flowElementGraph, Map<ElementGraph, List<? extends ElementGraph>> nodeSubGraphsMap, Map<ElementGraph, List<? extends ElementGraph>> pipelineSubGraphsMap ) { for( ElementGraph stepSubGraph : nodeSubGraphsMap.keySet() ) { List<? extends ElementGraph> nodeSubGraphs = nodeSubGraphsMap.get( stepSubGraph ); FlowNodeGraph flowNodeGraph = createFlowNodeGraph( flowStepFactory, flowElementGraph, pipelineSubGraphsMap, nodeSubGraphs ); EnumMultiMap<FlowElement> annotations = flowNodeGraph.getAnnotations(); // pull up annotations if( !annotations.isEmpty() ) stepSubGraph = new AnnotatedDecoratedElementGraph( stepSubGraph, annotations ); FlowStep flowStep = flowStepFactory.createFlowStep( stepSubGraph, flowNodeGraph ); addVertex( flowStep ); } bindEdges(); }