ca.uhn.hl7v2.model.primitive
Class FormattedTextEncoder

java.lang.Object
  extended by ca.uhn.hl7v2.model.primitive.FormattedTextEncoder

public class FormattedTextEncoder
extends Object

Provides methods to convert between HL7 Formatted Text encoding (See Chapter 2.7) and other encoding schemes.

Note that this class is not threadsafe! Always use a new instance (from a factory method) for each invocation.

Author:
James Agnew
See Also:
AbstractTextPrimitive

Method Summary
 String encode(String theInput)
          Convert the input string containing FT encoding strings (\.br\, \.sp XX\, etc.) into the appropriate output type for this encoder (currently HTML)
static FormattedTextEncoder getInstanceHtml()
          Returns a newly created instance which uses standard HTML encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public String encode(String theInput)
Convert the input string containing FT encoding strings (\.br\, \.sp XX\, etc.) into the appropriate output type for this encoder (currently HTML)

Parameters:
theInput - The input string
Returns:
An encoded version of the input string

getInstanceHtml

public static FormattedTextEncoder getInstanceHtml()
Returns a newly created instance which uses standard HTML encoding. The returned instance is not threadsafe, so this method should be called to obtain a new instance in any thread that requires a FormattedTextEncoder.

See Also:
for a description of the encoding performed by this type of encoder


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