} else if (criteriaElement.hasMin() && criteriaElement.getMin()>0) { expression = expression + " and " + discriminator + ".exists()"; } else if (criteriaElement.hasMax() && criteriaElement.getMax().equals("0")) { expression = expression + " and " + discriminator + ".exists().not()"; } else {
private boolean onlyInformationIsMapping(ElementDefinition d) { return !d.hasShort() && !d.hasDefinition() && !d.hasRequirements() && !d.getAlias().isEmpty() && !d.hasMinElement() && !d.hasMax() && !d.getType().isEmpty() && !d.hasContentReference() && !d.hasExample() && !d.hasFixed() && !d.hasMaxLengthElement() && !d.getCondition().isEmpty() && !d.getConstraint().isEmpty() && !d.hasMustSupportElement() && !d.hasBinding(); }
if (src.hasMin()) tgt.setMin(src.getMin()); if (src.hasMax()) tgt.setMax(src.getMax()); if (src.hasBase())
if (usage.hasMin()) res.setMin(usage.getMin()); if (usage.hasMax()) res.setMax(usage.getMax());
if ((definition.hasBase() && definition.getBase().getMax().equals("*")) || (definition.hasMax() && definition.getMax().equals("*"))) { if (c.getPieces().size() > 0) c.addPiece(gen.new Piece("br"));
location + "': minimum required = " + Integer.toString(ed.getMin()) + ", but only found " + Integer.toString(count)); if (ed.hasMax() && !ed.getMax().equals("*")) { if (problematicPaths.contains(ed.getPath())) hint(errors, IssueType.NOTSUPPORTED, element.line(), element.col(), stack.getLiteralPath(), count <= Integer.parseInt(ed.getMax()),
if (src.hasMin()) tgt.setMin(src.getMin()); if (src.hasMax()) tgt.setMax(src.getMax()); if (src.hasBase())
private String getCardinality(ElementDefinition ed, List<ElementDefinition> list) { int min = ed.getMin(); int max = !ed.hasMax() || ed.getMax().equals("*") ? Integer.MAX_VALUE : Integer.parseInt(ed.getMax()); while (ed != null && ed.getPath().contains(".")) { ed = findParent(ed, list); if (ed.getMax().equals("0")) max = 0; else if (!ed.getMax().equals("1") && !ed.hasSlicing()) max = Integer.MAX_VALUE; if (ed.getMin() == 0) min = 0; } return Integer.toString(min)+".."+(max == Integer.MAX_VALUE ? "*" : Integer.toString(max)); }
} else if (criteriaElement.hasMin() && criteriaElement.getMin()>0) { expression = expression + " and " + discriminator + ".exists()"; } else if (criteriaElement.hasMax() && criteriaElement.getMax().equals("0")) { expression = expression + " and " + discriminator + ".exists().not()"; } else {
location + "': minimum required = " + Integer.toString(ed.getMin()) + ", but only found " + Integer.toString(count)); if (ed.hasMax() && !ed.getMax().equals("*")) { if (problematicPaths.contains(ed.getPath())) hint(errors, IssueType.NOTSUPPORTED, element.line(), element.col(), stack.getLiteralPath(), count <= Integer.parseInt(ed.getMax()),
boolean doMax = child.hasMax() && !child.getMax().equals("*") && (based == null || (!child.getMax().equals(based.getMax()))); Slicer slicer = slicing == null ? new Slicer(true) : generateSlicer(child, slicing, structure); if (slicer.check) {