public String getInheritedExtensionAttribute(QName name) { if (getExtensionAttribute(name) != null) { return getExtensionAttribute(name); } if (parent != null) { return parent.getInheritedExtensionAttribute(name); } return null; }
public RuntimeValue getParameter(QName name) { Set<String> ports = getParameterPorts(); int pportCount = 0; String pport = null; for (String port : ports) { pport = port; pportCount++; } if (pportCount != 1) { return null; } return getParameter(pport, name); }
public void setParameter(QName name, RuntimeValue value) { Set<String> ports = getParameterPorts(); int pportCount = 0; String pport = null; String ppport = null; for (String port : ports) { pport = port; pportCount++; Input pin = getStep().getInput(port); if (pin.getPrimary()) { ppport = port; } } if (pportCount == 0) { throw new XProcException(step.getNode(), "Attempt to set parameter but there's no parameter port."); } if (ppport != null) { pport = ppport; } else { if (pportCount > 1) { throw new XProcException(step.getNode(), "Attempt to set parameter w/o specifying a port (and there's more than one)"); } } setParameter(pport, name, value); }
} catch (XPathException e) { throw new XProcException(step.getNode(), "Invalid step name. " + e.getMessage() + "XTDE1390"); step = step.getParent(); DeclareStep decl = step.getDeclareStep();
public ReadablePipe getBinding(String stepName, String portName) { if (name.equals(stepName)) { XInput input = getInput(portName); return input.getReader(); } for (XStep step : subpipeline) { if (stepName.equals(step.getName())) { XOutput output = step.getOutput(portName); if (output == null) { return new ReadableEmpty(); } else { ReadablePipe rpipe = output.getReader(); return rpipe; } } } return parent.getBinding(stepName, portName); }
public void setParameter(String port, QName name, RuntimeValue value) { Hashtable<QName,RuntimeValue> pparams; if (parameters.containsKey(port)) { pparams = parameters.get(port); } else { XInput xinput = getInput(port); // Make sure there is one Input input = getDeclareStep().getInput(port); if (!input.getParameterInput()) { throw new XProcException(step.getNode(), "Attempt to write parameters to non-parameter input port: " + port); } pparams = new Hashtable<QName,RuntimeValue> (); parameters.put(port, pparams); } if (pparams.containsKey(name)) { throw new XProcException(step.getNode(), "Duplicate parameter: " + name); } if (XProcConstants.NS_XPROC.equals(name.getNamespaceURI())) { throw XProcException.dynamicError(31); } pparams.put(name, value); }
severity = null; } else { severity = step.getExtensionAttribute(px_message_severity); listener.openStep(step, step.getNode(), msg, severity, portion);
public Set<QName> getParameters() { return getParameters("*"); }
public void setParameter(QName name, RuntimeValue value) { Set<String> ports = getParameterPorts(); int pportCount = 0; String pport = null; String ppport = null; for (String port : ports) { pport = port; pportCount++; Input pin = getStep().getInput(port); if (pin.getPrimary()) { ppport = port; } } if (pportCount == 0) { throw new XProcException(step.getNode(), "Attempt to set parameter but there's no parameter port."); } if (ppport != null) { pport = ppport; } else { if (pportCount > 1) { throw new XProcException(step.getNode(), "Attempt to set parameter w/o specifying a port (and there's more than one)"); } } setParameter(pport, name, value); }
} catch (XPathException e) { throw new XProcException(step.getNode(), "Invalid step name. " + e.getMessage() + "XTDE1390"); step = step.getParent(); DeclareStep decl = step.getDeclareStep();
public ReadablePipe getBinding(String stepName, String portName) { if (name.equals(stepName)) { XInput input = getInput(portName); return input.getReader(); } for (XStep step : subpipeline) { if (stepName.equals(step.getName())) { XOutput output = step.getOutput(portName); if (output == null) { return new ReadableEmpty(); } else { ReadablePipe rpipe = output.getReader(); return rpipe; } } } return parent.getBinding(stepName, portName); }
public void setParameter(String port, QName name, RuntimeValue value) { Hashtable<QName,RuntimeValue> pparams; if (parameters.containsKey(port)) { pparams = parameters.get(port); } else { XInput xinput = getInput(port); // Make sure there is one Input input = getDeclareStep().getInput(port); if (!input.getParameterInput()) { throw new XProcException(step.getNode(), "Attempt to write parameters to non-parameter input port: " + port); } pparams = new Hashtable<QName,RuntimeValue> (); parameters.put(port, pparams); } if (pparams.containsKey(name)) { throw new XProcException(step.getNode(), "Duplicate parameter: " + name); } if (XProcConstants.NS_XPROC.equals(name.getNamespaceURI())) { throw XProcException.dynamicError(31); } pparams.put(name, value); }
public Set<QName> getParameters() { return getParameters("*"); }
public RuntimeValue getParameter(QName name) { Set<String> ports = getParameterPorts(); int pportCount = 0; String pport = null; for (String port : ports) { pport = port; pportCount++; } if (pportCount != 1) { return null; } return getParameter(pport, name); }