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 */
008@SuppressWarnings("serial")
009public class ISWithNamespace extends IS {
010
011        private String myNamespace;
012        private String myHl7Version;
013
014        /**
015         * Constructor
016         */
017        public ISWithNamespace(Message theMessage, String theHl7Version, String theNamespace, int theTable) {
018                super(theMessage, theTable);
019                myHl7Version = theHl7Version;
020                myNamespace = theNamespace;
021        }
022
023
024        /**
025         * Constructor
026         */
027        public ISWithNamespace(Message theMessage, String theHl7Version, String theNamespace, Integer theTable) {
028                super(theMessage, theTable);
029                myHl7Version = theHl7Version;
030                myNamespace = theNamespace;
031        }
032
033
034        /**
035         * {@inheritDoc}
036         */
037        @Override
038        public String getName() {
039                return "IS";
040        }
041
042
043        /**
044         * Returns the HL7 version associated with this type instance
045         */
046        public String getVersion() {
047                return myHl7Version;
048        }
049
050        /**
051         * @return Returns the namespace associated with the table for this type
052         */
053        public String getTableNamespace() {
054                return myNamespace;
055        }
056        
057}