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 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); }
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); }