ca.uhn.hl7v2.model.primitive
Class AbstractTextPrimitive

java.lang.Object
  extended by ca.uhn.hl7v2.model.AbstractType
      extended by ca.uhn.hl7v2.model.AbstractPrimitive
          extended by ca.uhn.hl7v2.model.primitive.AbstractTextPrimitive
All Implemented Interfaces:
Primitive, Type, Serializable

public abstract class AbstractTextPrimitive
extends AbstractPrimitive

Base class for a textual datatype such as FT, TX, ST.

Author:
James Agnew
See Also:
Serialized Form

Constructor Summary
AbstractTextPrimitive(Message theMessage)
          Constructor
 
Method Summary
 String getValueAsHtml()
           Returns the value of this type with HL7 defined formatting codes replaced by their HTML equivalent.
 
Methods inherited from class ca.uhn.hl7v2.model.AbstractPrimitive
clear, encode, getValue, parse, setValue, toString
 
Methods inherited from class ca.uhn.hl7v2.model.AbstractType
getExtraComponents, getMessage, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ca.uhn.hl7v2.model.Type
getExtraComponents, getMessage, getName
 

Constructor Detail

AbstractTextPrimitive

public AbstractTextPrimitive(Message theMessage)
Constructor

Method Detail

getValueAsHtml

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\
 

This would be returned as:
 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.



Copyright © 2001-2012 University Health Network. All Rights Reserved.