private static boolean isRepeating(final Segment segment) throws HL7Exception { if (isEmpty(segment)) { return false; } final Group parent = segment.getParent(); final Group grandparent = parent.getParent(); if (parent == grandparent) { return false; } return grandparent.isRepeating(parent.getName()); }
public boolean isRepeating(String name) throws HL7Exception { return getDelegate().isRepeating(name); }
public boolean isRepeating(String name) throws HL7Exception { return getDelegate().isRepeating(name); }
log.trace("# of elements matching {}: {}", groupName, reps.size()); if (groupObject.isRepeating(childIndexName)) { for (int i = 0; i < reps.size(); i++) { parseRep(reps.get(i), groupObject.get(childIndexName, i));
/** * Returns true if another object exists in the iteration sequence. */ public boolean hasNext() { boolean has = true; if (next == null) { if (Group.class.isAssignableFrom(currentStructure.getClass())) { groupNext((Group) currentStructure); } else { Group parent = currentStructure.getParent(); Index i = getIndex(parent, currentStructure); Position currentPosition = new Position(parent, i); try { if (parent.isRepeating(i.name) && currentStructure.getName().equals(direction)) { nextRep(currentPosition); } else { has = nextPosition(currentPosition, this.direction, this.handleUnexpectedSegments); } } catch (HL7Exception e) { throw new Error("HL7Exception arising from bad index: " + e.getMessage()); } } } log.debug("MessageIterator.hasNext() in direction {}? {}", direction, has); return has; }
log.trace("# of elements matching {}: {}", groupName, reps.size()); if (groupObject.isRepeating(childIndexName)) { for (int i = 0; i < reps.size(); i++) { parseRep(reps.get(i), groupObject.get(childIndexName, i));
/** * Returns true if another object exists in the iteration sequence. */ public boolean hasNext() { boolean has = true; if (next == null) { if (Group.class.isAssignableFrom(currentStructure.getClass())) { groupNext((Group) currentStructure); } else { Group parent = currentStructure.getParent(); Index i = getIndex(parent, currentStructure); Position currentPosition = new Position(parent, i); try { if (parent.isRepeating(i.name) && currentStructure.getName().equals(direction)) { nextRep(currentPosition); } else { has = nextPosition(currentPosition, this.direction, this.handleUnexpectedSegments); } } catch (HL7Exception e) { throw new Error("HL7Exception arising from bad index: " + e.getMessage()); } } } log.debug("MessageIterator.hasNext() in direction {}? {}", direction, has); return has; }
if (pos.parent.isRepeating(pos.index.name)) { Structure s = pos.parent.get(pos.index.name, pos.index.rep); matchExists = contains(s, name, firstDescendentsOnly, upToFirstRequired);
if (pos.parent.isRepeating(pos.index.name)) { Structure s = pos.parent.get(pos.index.name, pos.index.rep); matchExists = contains(s, name, firstDescendentsOnly, upToFirstRequired);
boolean parentRepeats = parentPos.parent.isRepeating(parentPos.index.name); if (parentRepeats && contains(parentPos.parent.get(parentPos.index.name, 0), direction, false, true)) { nextRep(parentPos);
boolean parentRepeats = parentPos.parent.isRepeating(parentPos.index.name); if (parentRepeats && contains(parentPos.parent.get(parentPos.index.name, 0), direction, false, true)) { nextRep(parentPos);
StructureDefinition structureDefinition = createStructureDefinition(nextChild, thePreviousLeaf, theStructureName); structureDefinition.setNameAsItAppearsInParent(nextName); structureDefinition.setRepeating(group.isRepeating(nextName)); structureDefinition.setRequired(group.isRequired(nextName)); structureDefinition.setChoiceElement(group.isChoiceElement(nextName));
StructureDefinition structureDefinition = createStructureDefinition(nextChild, thePreviousLeaf, theStructureName); structureDefinition.setNameAsItAppearsInParent(nextName); structureDefinition.setRepeating(group.isRepeating(nextName)); structureDefinition.setRequired(group.isRequired(nextName)); structureDefinition.setChoiceElement(group.isChoiceElement(nextName));