View Javadoc

1   package ca.uhn.hl7v2.model.primitive;
2   
3   import ca.uhn.hl7v2.model.Message;
4   
5   /**
6    * HL7 ID type which also stores a namespace string
7    */
8   @SuppressWarnings("serial")
9   public class IDWithNamespace extends ID {
10  
11  	private String myNamespace;
12  	private String myHl7Version;
13  
14  	public IDWithNamespace(Message theMessage, String theHl7Version, String theNamespace, int theTable) {
15  		super(theMessage, theTable);
16  		myHl7Version = theHl7Version;
17  		myNamespace = theNamespace;
18  	}
19  
20  
21  	public IDWithNamespace(Message theMessage, String theHl7Version, String theNamespace, Integer theTable) {
22  		super(theMessage, theTable);
23  		myHl7Version = theHl7Version;
24  		myNamespace = theNamespace;
25  	}
26  	
27  	/**
28  	 * {@inheritDoc}
29  	 */
30  	@Override
31  	public String getName() {
32  		return "ID";
33  	}
34  
35  	/**
36  	 * Returns the HL7 version associated with this type instance
37  	 */
38  	public String getVersion() {
39  		return myHl7Version;
40  	}
41  
42  	/**
43  	 * @return Returns the namespace associated with the table for this type
44  	 */
45  	public String getTableNamespace() {
46  		return myNamespace;
47  	}
48  	
49  }