/** * @see ca.uhn.hl7v2.parser.ModelClassFactory#getMessageStructureForEvent(java.lang.String, * ca.uhn.hl7v2.Version) */ public String getMessageStructureForEvent(String name, Version version) throws HL7Exception { Map<String, String> p = getEventMapForVersion(version); if (p == null) { // Instead of throwing an Exception, Allow to parse as generic message if the structure library // (and the contained event map) are not on the classpath. LOG.debug("No event map found for version " + version); return name; // before: // throw new HL7Exception("No map found for version " + version // + ". Only the following are available: " + getEventMap().keySet()); } else { return p.get(name); } }
/** * @see ca.uhn.hl7v2.parser.ModelClassFactory#getMessageStructureForEvent(java.lang.String, * ca.uhn.hl7v2.Version) */ public String getMessageStructureForEvent(String name, Version version) throws HL7Exception { Map<String, String> p = getEventMapForVersion(version); if (p == null) { // Instead of throwing an Exception, Allow to parse as generic message if the structure library // (and the contained event map) are not on the classpath. LOG.debug("No event map found for version " + version); return name; // before: // throw new HL7Exception("No map found for version " + version // + ". Only the following are available: " + getEventMap().keySet()); } else { return p.get(name); } }