001    package ca.uhn.hl7v2.model;
002    
003    /**
004     * An unspecified Primitive datatype that imposes no constraints on its string 
005     * value.  This is used to store Varies data, when the data type is unknown.  It is also 
006     * used to store unrecognized message constituents.  
007     * @author Bryan Tripp
008     */
009    @SuppressWarnings("serial")
010    public class GenericPrimitive extends AbstractPrimitive implements Primitive {
011        
012    //    String value = null;
013        
014        /** 
015         * Creates a new instance of GenericPrimitive 
016         */
017        public GenericPrimitive(Message message) {
018            super(message);
019        }
020        
021    //    /** 
022    //     * Returns a String representation of the value of this field.
023    //     */
024    //    public String getValue() {
025    //        return this.value;
026    //    }
027        
028    //    /** 
029    //     * Sets the value of this field if the given value is legal in the context of the
030    //     * implementing class.
031    //     * @throws DataTypeException if the given value is not valid in this context.
032    //     */
033    //    public void setValue(String value) throws DataTypeException {
034    //        this.value = value;
035    //    }
036        
037        /** Returns the name of the type (used in XML encoding and profile checking)  */
038        public String getName() {
039            return "UNKNOWN";
040        }
041        
042        /**
043         * @see ca.uhn.hl7v2.model.Primitive#getVersion()
044         */
045        public String getVersion() {
046            return null;
047        }
048        
049        
050    }