View Javadoc
1   package ca.uhn.hl7v2.testpanel.util;
2   
3   import java.util.Map;
4   
5   import ca.uhn.hl7v2.HL7Exception;
6   import ca.uhn.hl7v2.Version;
7   import ca.uhn.hl7v2.model.Group;
8   import ca.uhn.hl7v2.model.Message;
9   import ca.uhn.hl7v2.model.Segment;
10  import ca.uhn.hl7v2.model.Type;
11  import ca.uhn.hl7v2.parser.AbstractModelClassFactory;
12  
13  public class EventMapUtil {
14  
15  	private static MyMCF ourMcf;
16  
17  	public static Map<String, String> getEventMap(String theVersion) throws HL7Exception {
18  		if (ourMcf == null) {
19  			ourMcf = new MyMCF();
20  		}
21  		return ourMcf.getEventMapForVersion(Version.versionOf(theVersion));
22  	}
23  
24  	private static class MyMCF extends AbstractModelClassFactory {
25  
26  		public Class<? extends Message> getMessageClass(String theName, String theVersion, boolean theIsExplicit) throws HL7Exception {
27  			throw new UnsupportedOperationException();
28  		}
29  
30  		public Class<? extends Message> getMessageClassInASpecificPackage(String theName, String theVersion, boolean theIsExplicit, String thePackageName) throws HL7Exception {
31  			throw new UnsupportedOperationException();
32  		}
33  
34  		public Class<? extends Group> getGroupClass(String theName, String theVersion) throws HL7Exception {
35  			throw new UnsupportedOperationException();
36  		}
37  
38  		public Class<? extends Segment> getSegmentClass(String theName, String theVersion) throws HL7Exception {
39  			throw new UnsupportedOperationException();
40  		}
41  
42  		public Class<? extends Type> getTypeClass(String theName, String theVersion) throws HL7Exception {
43  			throw new UnsupportedOperationException();
44  		}
45  
46  	}
47  
48  }