public class Hl7v2MarshalUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
convertBodyToString(org.apache.camel.Message message,
String charset,
boolean defragmentSegments)
Converts message contents to a
String using the given character set
and replaces all '\n''s with '\r''s. |
static ca.uhn.hl7v2.model.Message |
extractHapiMessage(org.apache.camel.Message message,
String charset,
ca.uhn.hl7v2.parser.Parser parser)
Converts the contents of the given Camel message to a
Message . |
static String |
marshalStandardTypes(org.apache.camel.Message message,
String charset,
ca.uhn.hl7v2.parser.Parser parser)
Converts a set of some standard data types to String.
|
static boolean |
typeSupported(Object body)
Determines whether the given object belongs to the predefined
set of supported data types.
|
public static String marshalStandardTypes(org.apache.camel.Message message, String charset, ca.uhn.hl7v2.parser.Parser parser) throws Exception
message
- Camel message containing the data to be converted.charset
- character set.parser
- HL7 parser.Exception
- on parsing and marshaling errors.public static boolean typeSupported(Object body)
body
- The object to check.true
when the type of the object is supported
by the HL7v2 adapter out-of-the-box, false
otherwise.public static String convertBodyToString(org.apache.camel.Message message, String charset, boolean defragmentSegments) throws Exception
String
using the given character set
and replaces all '\n''s with '\r''s.
If requested, segments will be defragmented as well.Exception
public static ca.uhn.hl7v2.model.Message extractHapiMessage(org.apache.camel.Message message, String charset, ca.uhn.hl7v2.parser.Parser parser) throws Exception
Message
.message
- Camel message to be converted.charset
- character set.parser
- HL7 parser.Message
or null
when it was impossible
to get or create one.Exception
Copyright © 2018 Open eHealth Foundation. All rights reserved.