public Output getDefaultOutput() { // See if there's exactly one "ordinary" output int count = 0; Output defout = null; for (Output output : outputs) { if (!output.getPort().startsWith("#")) { if (output.getPrimary()) { return output; } if (!output.getPort().endsWith("|")) { count++; defout = output; } } } if (count == 1 && (defout.getPrimary() || !defout.getPrimarySet())) { return defout; } return null; }
public Output getPrimaryOutput() { int count = 0; Output defPrimary = null; for (Output output : outputs) { if ("#current".equals(output.getPort())) { // nop; this one never counts } else { if (output.getPrimary() || !output.getPrimarySet()) { defPrimary = output; } count++; if (output.getPrimary()) { return output; } } } if (count == 1) { return defPrimary; } else { return null; } }
public Output getPrimaryOutput() { int count = 0; Output defPrimary = null; for (Output output : outputs) { if ("#current".equals(output.getPort())) { // nop; this one never counts } else { if (output.getPrimary() || !output.getPrimarySet()) { defPrimary = output; } count++; if (output.getPrimary()) { return output; } } } if (count == 1) { return defPrimary; } else { return null; } }
public Output getDefaultOutput() { // See if there's exactly one "ordinary" output int count = 0; Output defout = null; for (Output output : outputs) { if (!output.getPort().startsWith("#")) { if (output.getPrimary()) { return output; } if (!output.getPort().endsWith("|")) { count++; defout = output; } } } if (count == 1 && (defout.getPrimary() || !defout.getPrimarySet())) { return defout; } return null; }
private void checkPrimaryOutput() { int count = 0; int pcount = 0; Port defPrimary = null; Port primary = null; for (Output output : outputs()) { if (!output.getPort().endsWith("|")) { count++; if (output.getPrimary()) { pcount++; if (primary == null) { primary = output; } } if (defPrimary == null && !output.getPrimarySet()) { defPrimary = output; } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && primary == null && defPrimary != null) { if (defPrimary.getPrimary() || !defPrimary.getPrimarySet()) { defPrimary.setPrimary(true); } } }
private void checkPrimaryOutput() { int count = 0; int pcount = 0; Port defPrimary = null; Port primary = null; for (Output output : outputs()) { if (!output.getPort().endsWith("|")) { count++; if (output.getPrimary()) { pcount++; if (primary == null) { primary = output; } } if (defPrimary == null && !output.getPrimarySet()) { defPrimary = output; } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && primary == null && defPrimary != null) { if (defPrimary.getPrimary() || !defPrimary.getPrimarySet()) { defPrimary.setPrimary(true); } } }
output.setPort(portName); output.setSequence(doutput.getSequence()); if (doutput.getPrimarySet()) { output.setPrimary(doutput.getPrimary());
output.setPort(portName); output.setSequence(doutput.getSequence()); if (doutput.getPrimarySet()) { output.setPrimary(doutput.getPrimary());
Output output = readOutput(step, node); if (output.getPrimarySet() && output.getPrimary()) { if (!allowPrimary) { throw XProcException.staticError(8, node, "The \"primary\" attribute is not allowed in this context."); if (outputCount == 1 && !maybePrimaryOutput.getPrimary() && !maybePrimaryOutput.getPrimarySet()) { maybePrimaryOutput.setPrimary(true);
Output output = readOutput(step, node); if (output.getPrimarySet() && output.getPrimary()) { if (!allowPrimary) { throw XProcException.staticError(8, node, "The \"primary\" attribute is not allowed in this context."); if (outputCount == 1 && !maybePrimaryOutput.getPrimary() && !maybePrimaryOutput.getPrimarySet()) { maybePrimaryOutput.setPrimary(true);