public Output getOutput(String portName) { if ("current".equals(portName)) { return getOutput("#current"); } else { return super.getOutput(portName); } }
private ForEach readForEach(Step parent, XdmNode node) { QName name = node.getNodeName(); if (!XProcConstants.p_for_each.equals(name)) { throw new UnsupportedOperationException("Can't parse " + name + " as a pipeline!"); } checkAttributes(node, new String[] { "name" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); ForEach step = new ForEach(runtime, node, stepName); checkExtensionAttributes(node, step); // FIXME: Do I really need parentDecl and parent? step.setParentDecl((DeclareStep) parent); step.parent = parent; Vector<XdmNode> rest = readSignature(step); if (rest == null) { throw XProcException.staticError(15, node, "A p:for-each must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }
public ForEach(XProcRuntime xproc, XdmNode node, String name) { super(xproc, node, name); declaration = this; stepType = XProcConstants.p_for_each; Output current = new Output(xproc, node); current.setPort("#current"); current.setSequence(true); addOutput(current); }
private ForEach readForEach(Step parent, XdmNode node) { QName name = node.getNodeName(); if (!XProcConstants.p_for_each.equals(name)) { throw new UnsupportedOperationException("Can't parse " + name + " as a pipeline!"); } checkAttributes(node, new String[] { "name" }, false); String stepName = checkNCName(node.getAttributeValue(_name)); ForEach step = new ForEach(runtime, node, stepName); checkExtensionAttributes(node, step); // FIXME: Do I really need parentDecl and parent? step.setParentDecl((DeclareStep) parent); step.parent = parent; Vector<XdmNode> rest = readSignature(step); if (rest == null) { throw XProcException.staticError(15, node, "A p:for-each must contain a subpipeline."); } for (XdmNode substepNode : rest) { Step substep = readStep(step, substepNode); step.addStep(substep); } step.checkPrimaryIO(); return step; }
public ForEach(XProcRuntime xproc, XdmNode node, String name) { super(xproc, node, name); declaration = this; stepType = XProcConstants.p_for_each; Output current = new Output(xproc, node); current.setPort("#current"); current.setSequence(true); addOutput(current); }
public void patchEnvironment(Environment env) { env.setDefaultReadablePort(getOutput("#current")); } }
public Output getOutput(String portName) { if ("current".equals(portName)) { return getOutput("#current"); } else { return super.getOutput(portName); } }
public void patchEnvironment(Environment env) { env.setDefaultReadablePort(getOutput("#current")); } }