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