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> (); }
public void addInput(Input input) { input.setStep(this); for (Input current : inputs) { if (current.getPort().equals(input.getPort())) { throw XProcException.staticError(11, input.getNode(), "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())) { throw XProcException.staticError(11, input.getNode(), "Input port name '" + input.getPort() + "' appears more than once."); } } inputs.add(input); }
protected void instantiateReaders(Step step) { for (Input input : step.inputs()) { String port = input.getPort(); if (!port.startsWith("|")) { Vector<ReadablePipe> readers = null; if (inputs.containsKey(port)) { readers = inputs.get(port); } else { readers = new Vector<ReadablePipe> (); inputs.put(port, readers); } for (Binding binding : input.getBinding()) { ReadablePipe pipe = getPipeFromBinding(binding); pipe.canReadSequence(input.getSequence()); if (input.getSelect() != null) { logger.trace(MessageFormatter.nodeMessage(step.getNode(), step.getName() + " selects from " + pipe + " for " + port)); pipe = new XSelect(runtime, this, pipe, input.getSelect(), input.getNode()); } readers.add(pipe); logger.trace(MessageFormatter.nodeMessage(step.getNode(), step.getName() + " reads from " + pipe + " for " + port)); } XInput xinput = new XInput(runtime, input); addInput(xinput); } } }
protected void instantiateReaders(Step step) { for (Input input : step.inputs()) { String port = input.getPort(); if (!port.startsWith("|")) { Vector<ReadablePipe> readers = null; if (inputs.containsKey(port)) { readers = inputs.get(port); } else { readers = new Vector<ReadablePipe> (); inputs.put(port, readers); } for (Binding binding : input.getBinding()) { ReadablePipe pipe = getPipeFromBinding(binding); pipe.canReadSequence(input.getSequence()); if (input.getSelect() != null) { logger.trace(MessageFormatter.nodeMessage(step.getNode(), step.getName() + " selects from " + pipe + " for " + port)); pipe = new XSelect(runtime, this, pipe, input.getSelect(), input.getNode()); } readers.add(pipe); logger.trace(MessageFormatter.nodeMessage(step.getNode(), step.getName() + " reads from " + pipe + " for " + port)); } XInput xinput = new XInput(runtime, input); addInput(xinput); } } }
Output output = new Output(runtime, input.getNode()); output.setPort(input.getPort() + "|"); output.setSequence(true); // the other half will check
Output output = new Output(runtime, input.getNode()); output.setPort(input.getPort() + "|"); output.setSequence(true); // the other half will check
throw XProcException.staticError(35, input.getNode(), "You must not specify bindings in this context.");
throw XProcException.staticError(35, input.getNode(), "You must not specify bindings in this context.");
if (step.isAtomic()) { if (input.getBinding().size() != 0) { runtime.error(null,input.getNode(),"Input bindings are not allowed on an atomic step",XProcConstants.staticError(42)); for (Binding binding : input.getBinding()) { if (binding.getBindingType() == Binding.PIPE_NAME_BINDING) { runtime.error(null,input.getNode(),"Default input bindings cannot use p:pipe",XProcConstants.staticError(44));
if (step.isAtomic()) { if (input.getBinding().size() != 0) { runtime.error(null,input.getNode(),"Input bindings are not allowed on an atomic step",XProcConstants.staticError(42)); for (Binding binding : input.getBinding()) { if (binding.getBindingType() == Binding.PIPE_NAME_BINDING) { runtime.error(null,input.getNode(),"Default input bindings cannot use p:pipe",XProcConstants.staticError(44));