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  		@Override
27  		public Class<? extends Message> getMessageClass(String theName, String theVersion, boolean theIsExplicit) throws HL7Exception {
28  			throw new UnsupportedOperationException();
29  		}
30  
31  		@Override
32  		public Class<? extends Message> getMessageClassInASpecificPackage(String theName, String theVersion, boolean theIsExplicit, String thePackageName) throws HL7Exception {
33  			throw new UnsupportedOperationException();
34  		}
35  
36  		@Override
37  		public Class<? extends Group> getGroupClass(String theName, String theVersion) throws HL7Exception {
38  			throw new UnsupportedOperationException();
39  		}
40  
41  		@Override
42  		public Class<? extends Segment> getSegmentClass(String theName, String theVersion) throws HL7Exception {
43  			throw new UnsupportedOperationException();
44  		}
45  
46  		@Override
47  		public Class<? extends Type> getTypeClass(String theName, String theVersion) throws HL7Exception {
48  			throw new UnsupportedOperationException();
49  		}
50  
51  	}
52  
53  }