ca.uhn.hl7v2.model.primitive
Class TM

java.lang.Object
  extended by ca.uhn.hl7v2.model.AbstractType
      extended by ca.uhn.hl7v2.model.AbstractPrimitive
          extended by ca.uhn.hl7v2.model.primitive.TM
All Implemented Interfaces:
Primitive, Type, java.io.Serializable
Direct Known Subclasses:
TM, TM, TM, TM, TM, TM, TM, TM

public abstract class TM
extends AbstractPrimitive

Represents an HL7 TM (time) datatype.

Version:
$Revision: 1.1 $ updated on $Date: 2007/02/19 02:24:51 $ by $Author: jamesagnew $
Author:
Neal Acharya, Bryan Tripp
See Also:
Serialized Form

Constructor Summary
TM(Message theMessage)
           
 
Method Summary
 float getFractSecond()
          Returns the fractional second value as a float.
 int getGMTOffset()
          Returns the GMT offset value as an integer.
 int getHour()
          Returns the hour as an integer.
 int getMinute()
          Returns the minute as an integer.
 int getSecond()
          Returns the second as an integer.
 java.lang.String getValue()
          Returns a String representation of the value of this field.
 void setHourMinSecondPrecision(int hr, int min, float sec)
           
 void setHourMinutePrecision(int hr, int min)
           
 void setHourPrecision(int hr)
           
 void setOffset(int signedOffset)
           
 void setValue(java.lang.String theValue)
          Sets the value of this Primitive, first performing validation as specified by getMessage().getValidationContext().
 
Methods inherited from class ca.uhn.hl7v2.model.AbstractPrimitive
clear, encode, parse, toString
 
Methods inherited from class ca.uhn.hl7v2.model.AbstractType
getExtraComponents, getMessage, getName
 
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
getExtraComponents, getMessage, getName
 

Constructor Detail

TM

public TM(Message theMessage)
Parameters:
theMessage - message to which this Type belongs
Method Detail

setValue

public void setValue(java.lang.String theValue)
              throws DataTypeException
Description copied from class: AbstractPrimitive
Sets the value of this Primitive, first performing validation as specified by getMessage().getValidationContext(). No validation is performed if getMessage() returns null.

Specified by:
setValue in interface Primitive
Overrides:
setValue in class AbstractPrimitive
Throws:
DataTypeException - if the value is incorrectly formatted and either validation is enabled for this primitive or detail setters / getters have been called, forcing further parsing.
See Also:
AbstractPrimitive.setValue(java.lang.String)

getValue

public java.lang.String getValue()
Description copied from interface: Primitive
Returns a String representation of the value of this field.

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

setHourPrecision

public void setHourPrecision(int hr)
                      throws DataTypeException
Throws:
DataTypeException - if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.
See Also:
CommonTM.setHourPrecision(int)

setHourMinutePrecision

public void setHourMinutePrecision(int hr,
                                   int min)
                            throws DataTypeException
Throws:
DataTypeException - if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.
See Also:
CommonTM.setHourMinutePrecision(int, int)

setHourMinSecondPrecision

public void setHourMinSecondPrecision(int hr,
                                      int min,
                                      float sec)
                               throws DataTypeException
Throws:
DataTypeException - if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.
See Also:
CommonTM.setHourMinSecondPrecision(int, int, float)

setOffset

public void setOffset(int signedOffset)
               throws DataTypeException
Throws:
DataTypeException - if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.
See Also:
CommonTM.setOffset(int)

getHour

public int getHour()
            throws DataTypeException
Returns the hour as an integer.

Throws:
DataTypeException - if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.

getMinute

public int getMinute()
              throws DataTypeException
Returns the minute as an integer.

Throws:
DataTypeException - if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.

getSecond

public int getSecond()
              throws DataTypeException
Returns the second as an integer.

Throws:
DataTypeException - if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.

getFractSecond

public float getFractSecond()
                     throws DataTypeException
Returns the fractional second value as a float.

Throws:
DataTypeException - if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.

getGMTOffset

public int getGMTOffset()
                 throws DataTypeException
Returns the GMT offset value as an integer.

Throws:
DataTypeException - if the value is incorrectly formatted. If validation is enabled, this exception should be thrown at setValue(), but if not, detailed parsing may be deferred until this method is called.


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