public abstract class AbstractTextPrimitive extends AbstractPrimitive
| Constructor and Description |
|---|
AbstractTextPrimitive(Message theMessage)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getValueAsHtml()
Returns the value of this type with HL7 defined formatting codes replaced
by their HTML equivalent.
|
String |
getValueOrEmpty()
Returns the value of the datatype as returned by
AbstractPrimitive.getValue() but
returns an empty string ("") if the value is null. |
accept, clear, encode, getValue, isEmpty, parse, setValue, toStringgetExtraComponents, getMessage, getName, provideLocationclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetExtraComponents, getMessage, getNameprovideLocationpublic AbstractTextPrimitive(Message theMessage)
public String getValueAsHtml()
Returns the value of this type with HL7 defined formatting codes replaced by their HTML equivalent.
For example, if this type contained the string:
ABC \.ce\MIDDLE\.br\
ABC <center>MIDDLE<center><br>
The following codes are handled (note that contrary to the HL7 specification, codes are interpreted in a case-insensitive manner):
Note that the returned value from this method is an HTML snippet, not a complete HTML document.
FormattedTextEncoderpublic String getValueOrEmpty()
AbstractPrimitive.getValue() but
returns an empty string ("") if the value is null. This
method is mostly provided as a convenience in code which maps from one
format to another, since it avoids the need for some null checks.Copyright © 2001–2017 University Health Network. All rights reserved.