Class TM

All Implemented Interfaces:
Primitive, Type, Visitable, Serializable
Direct Known Subclasses:
TM, TM, TM, TM, 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:
  • Constructor Details

    • TM

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

    • setValue

      public void setValue(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.

      Note: as of the next HAPI release, the ValidationContext will be retrieved from getParser().getValidationContext(), which ultimately is the ValidationContext of the active HapiContext.

      Specified by:
      setValue in interface Primitive
      Overrides:
      setValue in class AbstractPrimitive
      Parameters:
      theValue - the value to be set
      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:
    • getValue

      public 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
      Returns:
      a String representation of the value of this field
      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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.