public Input getInput(String portName) { for (Input input : inputs) { if (portName.equals(input.getPort())) { return input; } } return null; }
public Input getInput(String portName) { for (Input input : inputs) { if (portName.equals(input.getPort())) { return input; } } return null; }
public void addInput(Input input) { input.setStep(this); for (Input current : inputs) { if (current.getPort().equals(input.getPort())) { if ("#xpath-context".equals(input.getPort())) { return; // It's ok for the xpath-context port to be specified in both places. } else { throw XProcException.staticError(11, "Input port name '" + input.getPort() + "' appears more than once."); } } } inputs.add(input); }
public void addInput(Input input) { input.setStep(this); for (Input current : inputs) { if (current.getPort().equals(input.getPort())) { if ("#xpath-context".equals(input.getPort())) { return; // It's ok for the xpath-context port to be specified in both places. } else { throw XProcException.staticError(11, "Input port name '" + input.getPort() + "' appears more than once."); } } } inputs.add(input); }
public Set<String> getParameterPorts() { HashSet<String> ports = new HashSet<String> (); for (Input input : step.inputs()) { if (input.getParameterInput()) { ports.add(input.getPort()); } } return ports; }
public Set<String> getParameterPorts() { HashSet<String> ports = new HashSet<String> (); for (Input input : step.inputs()) { if (input.getParameterInput()) { ports.add(input.getPort()); } } return ports; }
protected void dump(int depth) { String indent = ""; for (int count = 0; count < depth; count++) { indent += " "; } logger.trace(indent + "input " + getPort()); for (Binding binding : getBinding()) { binding.dump(depth+2); } }
protected void dump(int depth) { String indent = ""; for (int count = 0; count < depth; count++) { indent += " "; } logger.trace(indent + "input " + getPort()); for (Binding binding : getBinding()) { binding.dump(depth+2); } }
public Output getOutput(String portName) { Output output = super.getOutput(portName); if (output != null) { return output; } // On compound steps, inputs are also readable by the contained steps. // Except that you can't really read from an input so we go looking for the corresponding // output. for (Input input : inputs) { if (portName.equals(input.getPort())) { return super.getOutput(portName + "|"); } } return null; }
private void xmlReport(Input input) { if (!input.getPort().startsWith("|")) { pr.print(" <input port='" + input.getPort() + "'"); if (input.getParameterInput()) { pr.print(" kind='parameter'"); } if (input.getSelect() != null) { pr.print(" select='" + input.getSelect() + "'"); } pr.println(">"); for (Binding binding : input.getBinding()) { xmlReport(binding); } pr.println(" </input>"); } }
public Output getOutput(String portName) { Output output = super.getOutput(portName); if (output != null) { return output; } // On compound steps, inputs are also readable by the contained steps. // Except that you can't really read from an input so we go looking for the corresponding // output. for (Input input : inputs) { if (portName.equals(input.getPort())) { return super.getOutput(portName + "|"); } } return null; }
private void xmlReport(Input input) { if (!input.getPort().startsWith("|")) { pr.print(" <input port='" + input.getPort() + "'"); if (input.getParameterInput()) { pr.print(" kind='parameter'"); } if (input.getSelect() != null) { pr.print(" select='" + input.getSelect() + "'"); } pr.println(">"); for (Binding binding : input.getBinding()) { xmlReport(binding); } pr.println(" </input>"); } }
public XInput(XProcRuntime runtime, Input input) { this.runtime = runtime; node = input.getNode(); port = input.getPort(); sequenceOk = input.getSequence(); isParameters = input.getParameterInput(); readers = new Vector<ReadablePipe> (); }
public XInput(XProcRuntime runtime, Input input) { this.runtime = runtime; node = input.getNode(); port = input.getPort(); sequenceOk = input.getSequence(); isParameters = input.getParameterInput(); readers = new Vector<ReadablePipe> (); }
protected void patchEnvironment(Environment env) { // See if there's exactly one "ordinary" input int count = 0; Input defin = null; boolean foundPrimary = false; for (Input input : inputs) { if (!input.getPort().startsWith("|") && !input.getParameterInput()) { count++; foundPrimary |= input.getPrimary(); if (defin == null || input.getPrimary()) { defin = input; } } } if (count == 1 || foundPrimary) { env.setDefaultReadablePort(defin); } } }
protected void patchEnvironment(Environment env) { // See if there's exactly one "ordinary" input int count = 0; Input defin = null; boolean foundPrimary = false; for (Input input : inputs) { if (!input.getPort().startsWith("|") && !input.getParameterInput()) { count++; foundPrimary |= input.getPrimary(); if (defin == null || input.getPrimary()) { defin = input; } } } if (count == 1 || foundPrimary) { env.setDefaultReadablePort(defin); } } }