ca.uhn.hl7v2.model
Class GenericPrimitive

java.lang.Object
  extended by ca.uhn.hl7v2.model.AbstractType
      extended by ca.uhn.hl7v2.model.AbstractPrimitive
          extended by ca.uhn.hl7v2.model.GenericPrimitive
All Implemented Interfaces:
Primitive, Type, java.io.Serializable

public class GenericPrimitive
extends AbstractPrimitive
implements Primitive

An unspecified Primitive datatype that imposes no constraints on its string value. This is used to store Varies data, when the data type is unknown. It is also used to store unrecognized message constituents.

Author:
Bryan Tripp
See Also:
Serialized Form

Constructor Summary
GenericPrimitive(Message message)
          Creates a new instance of GenericPrimitive
 
Method Summary
 java.lang.String getName()
          Returns the name of the type (used in XML encoding and profile checking)
 java.lang.String getValue()
          Returns a String representation of the value of this field.
 java.lang.String getVersion()
           
 void setValue(java.lang.String value)
          Sets the value of this field if the given value is legal in the context of the implementing class.
 
Methods inherited from class ca.uhn.hl7v2.model.AbstractPrimitive
clear, encode, parse, toString
 
Methods inherited from class ca.uhn.hl7v2.model.AbstractType
getExtraComponents, getMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ca.uhn.hl7v2.model.Type
clear, encode, getExtraComponents, getMessage, parse
 

Constructor Detail

GenericPrimitive

public GenericPrimitive(Message message)
Creates a new instance of GenericPrimitive

Method Detail

getValue

public java.lang.String getValue()
Returns a String representation of the value of this field.

Specified by:
getValue in interface Primitive
Overrides:
getValue in class AbstractPrimitive
See Also:
Primitive.getValue()

setValue

public void setValue(java.lang.String value)
              throws DataTypeException
Sets the value of this field if the given value is legal in the context of the implementing class.

Specified by:
setValue in interface Primitive
Overrides:
setValue in class AbstractPrimitive
Throws:
DataTypeException - if the given value is not valid in this context.
See Also:
Primitive.setValue(String)

getName

public java.lang.String getName()
Returns the name of the type (used in XML encoding and profile checking)

Specified by:
getName in interface Type
Overrides:
getName in class AbstractType

getVersion

public java.lang.String getVersion()
See Also:
ca.uhn.hl7v2.model.Primitive#getVersion()


Copyright © 2001-2011 University Health Network. All Rights Reserved.