|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.vmdb.hl7.HL7Object | +--org.vmdb.hl7.HL7Element | +--org.vmdb.hl7.SimpleElement
Description: HL7 Network Connectivity For VMDB.
Copyright: Copyright (c) 2002-2003.
Company: Veterinary Medical Database (VMDB).
This one class handles all the data types that consist of a single string. The actual type is set by the calling program with the constructor or setType() method. Validity checking is left to the calling routine.
Constructor Summary | |
SimpleElement()
Construct an Element using the name and type specified in its sNm and sRl constants. |
|
SimpleElement(int iLevel)
Construct an Element using the name and type specified in its sNm and sRl constants. |
|
SimpleElement(java.lang.String sName,
java.lang.String sType)
Construct an Element of given name and type. |
Method Summary | |
boolean |
empty()
Test to see if a value has been set for this simple element. |
HL7Element |
getComponent(int iLoc)
Get component based on one based index position. |
java.lang.String |
getValue()
Get the value stored in this element as a simple string. |
void |
setValue(java.lang.String sValue)
Set the value of this element. |
int |
size()
Return the number of components in this element. |
java.lang.String |
toHL7String()
Output the value of this element as a string with HL7 escape sequences. |
java.lang.String |
toString()
Output the value of this element as a string. |
java.lang.String |
toXML(int iDepth)
Output the element as XML. |
Methods inherited from class org.vmdb.hl7.HL7Element |
clear, getLevel, getType, initialize, iterator, makeElement, setComponent, setLevel, setType |
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 |
public SimpleElement(int iLevel)
iLevel
- One of the constants for specifying level as FIELD, COMPONENT, or
SUBCOMPONENT. Default FIELD.public SimpleElement()
public SimpleElement(java.lang.String sName, java.lang.String sType)
sName
- The name of this element relative to its container. Example:
"PID.1" for the segquenceID in the pid segment.sType
- The HL7 data type abbreviation. Example "ST" for string or
"NM" for numeric. Note: Both of these would be instatiated as SimpleElement
objects in this library.Method Detail |
public void setValue(java.lang.String sValue)
setValue
in class HL7Element
sValue
- String representing the value. For numeric and coded
types, validation is left to the calling routine.public java.lang.String getValue()
getValue
in class HL7Element
public HL7Element getComponent(int iLoc)
getComponent
in class HL7Element
iLoc
- location in element to get (one based index).
java.lang.ArrayIndexOutOfBoundsException
- if iLoc points to a field
less than one or greater than the number of components allowed
in the message rule.public boolean empty()
empty
in class HL7Element
public int size()
size
in class HL7Element
public java.lang.String toString()
toString
in class HL7Element
public java.lang.String toHL7String()
toHL7String
in class HL7Element
public java.lang.String toXML(int iDepth)
toXML
in class HL7Element
iDepth
- int value for the number of spaces to indent this object. Used just
to make the XML easier to read as unformatted text.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |