001package 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")
010public class GenericPrimitive extends AbstractPrimitive implements Primitive {
011
012    /**
013     * Create a generic primitive
014     * @param message message to which the primitive is linked to
015     */
016    public GenericPrimitive(Message message) {
017        super(message);
018    }
019
020    public String getName() {
021        return "UNKNOWN";
022    }
023
024    /**
025     * As this is a generic primitive, this method returns <code>null</code> to
026     * inidicate that it is not associated with a dedicated HL7 version
027     * @return null
028     */
029    public String getVersion() {
030        return null;
031    }
032    
033    
034}