001package ca.uhn.hl7v2.model.primitive; 002 003import ca.uhn.hl7v2.model.Message; 004 005/** 006 * HL7 ID type which also stores a namespace string 007 */ 008public class IDWithNamespace extends ID { 009 010 private String myNamespace; 011 private String myHl7Version; 012 013 public IDWithNamespace(Message theMessage, String theHl7Version, String theNamespace, int theTable) { 014 super(theMessage, theTable); 015 myHl7Version = theHl7Version; 016 myNamespace = theNamespace; 017 } 018 019 020 public IDWithNamespace(Message theMessage, String theHl7Version, String theNamespace, Integer theTable) { 021 super(theMessage, theTable); 022 myHl7Version = theHl7Version; 023 myNamespace = theNamespace; 024 } 025 026 /** 027 * {@inheritDoc} 028 */ 029 @Override 030 public String getName() { 031 return "ID"; 032 } 033 034 /** 035 * Returns the HL7 version associated with this type instance 036 */ 037 public String getVersion() { 038 return myHl7Version; 039 } 040 041 /** 042 * @return Returns the namespace associated with the table for this type 043 */ 044 public String getTableNamespace() { 045 return myNamespace; 046 } 047 048}