|
|||||||||
| Home >> All >> org >> vmdb >> [ hl7 overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.vmdb.hl7
Class SimpleElement

java.lang.Objectorg.vmdb.hl7.HL7Object
org.vmdb.hl7.HL7Element
org.vmdb.hl7.SimpleElement
- public class SimpleElement
- extends HL7Element
Description: HL7 Network Connectivity For VMDB.
Copyright: Copyright (c) 2002-2003.
Company: M&M Informatics.
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.
- Version:
- 1.0
| Field Summary | |
private java.lang.String |
sNm
|
private java.lang.String |
sRl
|
protected java.lang.String |
sValue
|
| Fields inherited from class org.vmdb.hl7.HL7Element |
COMPONENT, FIELD, iCompNo, iLevel, iMaxComps, slComps, sNextComp, sType, SUBCOMPONENT, vComponents |
| Fields inherited from class org.vmdb.hl7.HL7Object |
COMP_SEP, ESC_SEP, FIELD_SEP, REP_SEP, sName, sRule, sSeparators, SUB_SEP |
| 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 | |
private java.lang.String |
deEscape(java.lang.String sIn)
|
boolean |
empty()
Test to see if a value has been set for this simple element. This is the simplest case of the more complex empty() method inherited from HL7Element. |
private java.lang.String |
escape(java.lang.String sIn)
|
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. |
(package private) boolean |
readString(java.lang.String sElement)
|
void |
setValue(java.lang.String sValue)
Set the value of this element. |
int |
size()
Return the number of components in this element. Because this is defined as a single string, the values returned are limite to zero if no value has been set or one if it has a value. |
java.lang.String |
toHL7String()
Output the value of this element as a string with HL7 escape sequences. This is the simplest case of the more general toString() inherited from HL7Object. |
java.lang.String |
toString()
Output the value of this element as a string. This is the simplest case of the more general toString() inherited from HL7Object. |
java.lang.String |
toXML(int iDepth)
Output the element as XML. Outputs the DOM element. |
| Methods inherited from class org.vmdb.hl7.HL7Element |
addComponent, addComponent, addEmptyComponents, clear, elementComplete, getLevel, getType, initialize, iterator, makeElement, processElement, setComponent, setLevel, setType |
| Methods inherited from class org.vmdb.hl7.HL7Object |
getName, getRule, getSeparator, getSeparators, setName, setRule, setSeparators |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
sValue
protected java.lang.String sValue
sNm
private java.lang.String sNm
sRl
private java.lang.String sRl
| Constructor Detail |
SimpleElement
public SimpleElement(int iLevel)
- Construct an Element using the name and type specified in its sNm and sRl
constants.
SimpleElement
public SimpleElement()
- Construct an Element using the name and type specified in its sNm and sRl
constants. And at the level of a Field.
SimpleElement
public SimpleElement(java.lang.String sName, java.lang.String sType)
- Construct an Element of given name and type.
| Method Detail |
setValue
public void setValue(java.lang.String sValue)
- Set the value of this element.
- Overrides:
setValuein classHL7Element
getValue
public java.lang.String getValue()
- Get the value stored in this element as a simple string.
- Overrides:
getValuein classHL7Element
getComponent
public HL7Element getComponent(int iLoc)
- Get component based on one based index position.
- Overrides:
getComponentin classHL7Element
empty
public boolean empty()
- Test to see if a value has been set for this simple element.
This is the simplest case of the more complex empty() method inherited from HL7Element.- Overrides:
emptyin classHL7Element
size
public int size()
- Return the number of components in this element.
Because this is defined as a single string, the values returned are limite to zero if no value has been set or one if it has a value. This is a simple case of the size() method inherited from HL7Element.- Overrides:
sizein classHL7Element
readString
boolean readString(java.lang.String sElement)
- Overrides:
readStringin classHL7Element
toString
public java.lang.String toString()
- Output the value of this element as a string.
This is the simplest case of the more general toString() inherited from HL7Object. Ultimately all data end up expressed as SimpleElements and output here. The layers around just organize them via delimiters, XML tags, etc..
TODO: Check value for anything that needs to be converted to escape sequences.- Overrides:
toStringin classHL7Element
toHL7String
public java.lang.String toHL7String()
- Output the value of this element as a string with HL7 escape
sequences.
This is the simplest case of the more general toString() inherited from HL7Object. Ultimately all data end up expressed as SimpleElements and output here.- Overrides:
toHL7Stringin classHL7Element
escape
private java.lang.String escape(java.lang.String sIn)
deEscape
private java.lang.String deEscape(java.lang.String sIn)
toXML
public java.lang.String toXML(int iDepth)
- Output the element as XML.
Outputs the DOM element.- Overrides:
toXMLin classHL7Element
|
|||||||||
| Home >> All >> org >> vmdb >> [ hl7 overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC