|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.uhn.hl7v2.model.AbstractType
public abstract class AbstractType
An abstract Type that provides a default implementation of getName().
| Constructor Summary | |
|---|---|
AbstractType(Message message)
Creates a new instance of AbstractType |
|
| Method Summary | |
|---|---|
void |
clear()
Clears all data from this type |
String |
encode()
Encodes this type using HL7 encoding. |
ExtraComponents |
getExtraComponents()
Returns an object containing any extra (non-standard) components that have been added to this type at run-time. |
Message |
getMessage()
|
String |
getName()
Returns the name of the type (used in XML encoding and profile checking) |
void |
parse(String string)
Parses the string into this type and replaces the current contents with the parsed value. |
String |
toString()
Returns the datatype and attempts to pipe-encode it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractType(Message message)
message - message to which this type belongs| Method Detail |
|---|
public String getName()
getName in interface Typepublic ExtraComponents getExtraComponents()
Type
getExtraComponents in interface TypeType.getExtraComponents()public Message getMessage()
getMessage in interface Type
public void parse(String string)
throws HL7Exception
Parses the string into this type and replaces the current contents with the parsed value. This method accepts HL7 encoded text and treats its input as such.
Note that this method is subtly different from calling Primitive.setValue(String), but
can be quite powerful. For example, using the argument of "milk&cookies" on an ST datatype:
Primitive.setValue(String), the ampersand is treated as an actual ampersand
in the text, and the field will be treated as a single field which is encoded as "milk\T\cookies" (\T\ is the
escape sequence for the subcomponent delimiter).
This method makes use of the parser which is stored within the enclosing Message.
At this time, only PipeParsers are supported.
parse in interface TypeHL7Exception
public String encode()
throws HL7Exception
encode in interface TypeHL7Exceptionpublic void clear()
clear in interface Typepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||