protected void patchEnvironment(Environment env) { if (atomic) { //nop; } else { // 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 (!input.getPrimary() && input.getPrimarySet()) { // nop; if the port is explicitly marked primary=false, it can't count } else { if (defin == null || input.getPrimary()) { defin = input; } } } } if (count == 1 || foundPrimary) { env.setDefaultReadablePort(defin); } } }
protected void patchEnvironment(Environment env) { if (atomic) { //nop; } else { // 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 (!input.getPrimary() && input.getPrimarySet()) { // nop; if the port is explicitly marked primary=false, it can't count } else { if (defin == null || input.getPrimary()) { defin = input; } } } } if (count == 1 || foundPrimary) { env.setDefaultReadablePort(defin); } } }
private void checkPrimaryInput(boolean checkParameterInput) { int count = 0; int pcount = 0; Port defPrimary = null; Port primary = null; for (Input input : inputs()) { if (!input.getPort().startsWith("|")) { count++; if (input.getParameterInput() == checkParameterInput) { if (input.getPrimary()) { pcount++; if (primary == null) { primary = input; } } if (defPrimary == null && !input.getPrimarySet()) { defPrimary = input; } } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && primary == null && defPrimary != null) { if (defPrimary.getPrimary() || !defPrimary.getPrimarySet()) { defPrimary.setPrimary(true); } } }
private void checkPrimaryInput(boolean checkParameterInput) { int count = 0; int pcount = 0; Port defPrimary = null; Port primary = null; for (Input input : inputs()) { if (!input.getPort().startsWith("|")) { count++; if (input.getParameterInput() == checkParameterInput) { if (input.getPrimary()) { pcount++; if (primary == null) { primary = input; } } if (defPrimary == null && !input.getPrimarySet()) { defPrimary = input; } } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && primary == null && defPrimary != null) { if (defPrimary.getPrimary() || !defPrimary.getPrimarySet()) { defPrimary.setPrimary(true); } } }
input.setPort(portName); input.setParameterInput(dinput.getParameterInput()); if (dinput.getPrimarySet()) { input.setPrimary(dinput.getPrimary());
input.setPort(portName); input.setParameterInput(dinput.getParameterInput()); if (dinput.getPrimarySet()) { input.setPrimary(dinput.getPrimary());
Input input = readInput(step, node); if (input.getPrimarySet() && input.getPrimary()) { if (!allowPrimary) { throw XProcException.staticError(8, node, "The \"primary\" attribute is not allowed in this context."); if (inputCount == 1 && !maybePrimaryInput.getPrimary() && !maybePrimaryInput.getPrimarySet()) { maybePrimaryInput.setPrimary(true); if (inputCount == 1 && !maybePrimaryInput.getPrimary() && !maybePrimaryInput.getPrimarySet()) { maybePrimaryInput.setPrimary(true);
Input input = readInput(step, node); if (input.getPrimarySet() && input.getPrimary()) { if (!allowPrimary) { throw XProcException.staticError(8, node, "The \"primary\" attribute is not allowed in this context."); if (inputCount == 1 && !maybePrimaryInput.getPrimary() && !maybePrimaryInput.getPrimarySet()) { maybePrimaryInput.setPrimary(true); if (inputCount == 1 && !maybePrimaryInput.getPrimary() && !maybePrimaryInput.getPrimarySet()) { maybePrimaryInput.setPrimary(true);
String port = portiter.next(); Input input = decl.getInput(port); if (!input.getParameterInput() && ((inputports.size() == 1 && !input.getPrimarySet()) || input.getPrimary())) { primaryin = port;
String port = portiter.next(); Input input = decl.getInput(port); if (!input.getParameterInput() && ((inputports.size() == 1 && !input.getPrimarySet()) || input.getPrimary())) { primaryin = port;