Group rootGroup = structure.getMessage();
public Message getMessage() { return getDelegate().getMessage(); }
public Message getMessage() { return getDelegate().getMessage(); }
/** * Inserts a repetition of a given Structure into repetitions of that structure by name. For * example, if the Group contains 10 repetitions an OBX segment and an OBX is supplied with an * index of 2, then this call would insert the new repetition at index 2. (Note that in this * example, the Set ID field in the OBX segments would also need to be renumbered manually). * * @throws HL7Exception if the named Structure is not part of this Group. */ protected void insertRepetition(String name, Structure structure, int index) throws HL7Exception { if (structure == null) { throw new NullPointerException("Structure may not be null"); } if (structure.getMessage() != this.getMessage()) { throw new HL7Exception("Structure does not belong to this message"); } List<Structure> list = structures.get(name); if (list == null) { throw new HL7Exception("The structure " + name + " does not exist in the group " + this.getClass().getName()); } if (list.size() < index) { throw new HL7Exception("Invalid index: " + index + ", structure " + name + " must be between 0 and " + (list.size())); } list.add(index, structure); }
/** * Inserts a repetition of a given Structure into repetitions of that structure by name. For * example, if the Group contains 10 repetitions an OBX segment and an OBX is supplied with an * index of 2, then this call would insert the new repetition at index 2. (Note that in this * example, the Set ID field in the OBX segments would also need to be renumbered manually). * * @throws HL7Exception if the named Structure is not part of this Group. */ protected void insertRepetition(String name, Structure structure, int index) throws HL7Exception { if (structure == null) { throw new NullPointerException("Structure may not be null"); } if (structure.getMessage() != this.getMessage()) { throw new HL7Exception("Structure does not belong to this message"); } List<Structure> list = structures.get(name); if (list == null) { throw new HL7Exception("The structure " + name + " does not exist in the group " + this.getClass().getName()); } if (list.size() < index) { throw new HL7Exception("Invalid index: " + index + ", structure " + name + " must be between 0 and " + (list.size())); } list.add(index, structure); }
Map<String, String> evtMap = new DefaultModelClassFactory().getEventMapForVersion(Version.versionOf(theStructure.getMessage().getVersion())); if (evtMap.containsKey(struct)) { struct = evtMap.get(struct);
Map<String, String> evtMap = new DefaultModelClassFactory().getEventMapForVersion(Version.versionOf(theStructure.getMessage().getVersion())); if (evtMap.containsKey(struct)) { struct = evtMap.get(struct);