View Javadoc
1   package ca.uhn.hl7v2.model;
2   
3   /**
4    * An unspecified Primitive datatype that imposes no constraints on its string 
5    * value.  This is used to store Varies data, when the data type is unknown.  It is also 
6    * used to store unrecognized message constituents.  
7    * @author Bryan Tripp
8    */
9   @SuppressWarnings("serial")
10  public class GenericPrimitive extends AbstractPrimitive implements Primitive {
11  
12      /**
13       * Create a generic primitive
14       * @param message message to which the primitive is linked to
15       */
16      public GenericPrimitive(Message message) {
17          super(message);
18      }
19  
20      public String getName() {
21          return "UNKNOWN";
22      }
23  
24      /**
25       * As this is a generic primitive, this method returns <code>null</code> to
26       * inidicate that it is not associated with a dedicated HL7 version
27       * @return null
28       */
29      public String getVersion() {
30          return null;
31      }
32      
33      
34  }