org.vmdb.hl7
Class TSElement

java.lang.Object
  |
  +--org.vmdb.hl7.HL7Object
        |
        +--org.vmdb.hl7.HL7Element
              |
              +--org.vmdb.hl7.TSElement

public class TSElement
extends HL7Element

Time Stamp (TS) Element.

Description: HL7 Network Connectivity For VMDB.

Copyright: Copyright (c) 2002-2003.

Company: Veterinary Medical Database (VMDB).


Constructor Summary
TSElement()
          Construct a Date/Time Element using the default name and type constants at the default level FIELD.
TSElement(int iLevel)
          Construct a Date/Time Element using the default name and type constants.
 
Method Summary
 java.lang.String getDateTime()
          Get the actual ISO formatted datetime string.
 java.lang.String getPrecision()
          Get precision.
 void setDateTime(java.lang.String sDateTime)
          Set the actual ISO formatted datetime string.
 void setPrecision(java.lang.String sPrecision)
          Set precision.
 
Methods inherited from class org.vmdb.hl7.HL7Element
clear, empty, getComponent, getLevel, getType, getValue, initialize, iterator, makeElement, setComponent, setLevel, setType, setValue, size, toHL7String, toString, toXML
 
Methods inherited from class org.vmdb.hl7.HL7Object
getRule
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TSElement

public TSElement(int iLevel)
Construct a Date/Time Element using the default name and type constants.

Parameters:
iLevel - One of the constants for specifying level as FIELD, COMPONENT, or SUBCOMPONENT. Default FIELD.

TSElement

public TSElement()
Construct a Date/Time Element using the default name and type constants at the default level FIELD.

Method Detail

setDateTime

public void setDateTime(java.lang.String sDateTime)
Set the actual ISO formatted datetime string.

TODO: Add a convenience method to set this from normal strings or date variables

Parameters:
sDateTime - String is ISO format.

getDateTime

public java.lang.String getDateTime()
Get the actual ISO formatted datetime string.

Returns:
String date/time in ISO format.

setPrecision

public void setPrecision(java.lang.String sPrecision)
Set precision.

Note: From the HL7 documentation, "In prior versions of HL7, an optional second component indicates the degree of precision of the time stamp (Y = year, L = month, D = day, H = hour, M = minute, S = second). This optional second component is retained only for purposes of backward compatibility."

Parameters:
sPrecision - String with the precision of the date/time

getPrecision

public java.lang.String getPrecision()
Get precision.

Note: From the HL7 documentation, "In prior versions of HL7, an optional second component indicates the degree of precision of the time stamp (Y = year, L = month, D = day, H = hour, M = minute, S = second). This optional second component is retained only for purposes of backward compatibility."

Returns:
String with the precision of the date/time

SourceForge.net Logo