public IterationStrategyStack makeIterationStrategyStack( InputProcessorPort... inputs) { IterationStrategyStack stack = new IterationStrategyStack(); CrossProduct crossProduct = new CrossProduct(); crossProduct.setParent(stack); for (InputProcessorPort inp : inputs) { PortNode n = new PortNode(crossProduct, inp); n.setDesiredDepth(0); } return stack; }
protected void parseCrossProduct(CrossProduct original) throws ReaderException { org.apache.taverna.scufl2.api.iterationstrategy.CrossProduct cross = new org.apache.taverna.scufl2.api.iterationstrategy.CrossProduct(); mapBean(getParserState().getCurrentBase().resolve(original.getAbout()), cross); cross.setParent(getParserState().getCurrent( IterationStrategyParent.class)); getParserState().push(cross); try { parseProductOf(original.getProductOf()); } finally { getParserState().pop(); } }
CrossProduct cp = new CrossProduct(); iss.add(cp); cp.setParent(iss); PortNode pn = new PortNode(); pn.setInputProcessorPort(ipp);
@Test public void testInScopeInputProcessorPort() { Processor p = new Processor(); InputProcessorPort ipp = new InputProcessorPort(); ipp.setParent(p); IterationStrategyStack iss = new IterationStrategyStack(); p.setIterationStrategyStack(iss); CrossProduct cp = new CrossProduct(); iss.add(cp); cp.setParent(iss); PortNode pn = new PortNode(); pn.setInputProcessorPort(ipp); cp.add(pn); pn.setParent(cp); CorrectnessValidator cv = new CorrectnessValidator(); ReportCorrectnessValidationListener rcvl = new ReportCorrectnessValidationListener(); cv.checkCorrectness(pn, false, rcvl); Set<OutOfScopeValueProblem> outOfScopeValueProblems = rcvl.getOutOfScopeValueProblems(); assertEquals(Collections.EMPTY_SET, outOfScopeValueProblems); }