org.apache.camel.component.hl7
Class HL7DataFormat

java.lang.Object
  extended by org.apache.camel.component.hl7.HL7DataFormat
All Implemented Interfaces:
org.apache.camel.spi.DataFormat

public class HL7DataFormat
extends Object
implements org.apache.camel.spi.DataFormat

HL7 DataFormat (supports v2.x of the HL7 protocol).

This data format supports two operations:

Uses the HAPI (HL7 API) for HL7 parsing.

Uses the default GenericParser from the HAPI API. This DataFormat only supports both the EDI based HL7 messages and the XML based messages.

The unmarshal operation adds these MSH fields as headers on the Camel message (key, MSH-field):

All headers are String types.

See Also:
HL7MLLPCodec

Constructor Summary
HL7DataFormat()
           
 
Method Summary
 ca.uhn.hl7v2.parser.Parser getParser()
           
 boolean isValidate()
           
 void marshal(org.apache.camel.Exchange exchange, Object body, OutputStream outputStream)
           
 void setParser(ca.uhn.hl7v2.parser.Parser parser)
           
 void setValidate(boolean validate)
           
 Object unmarshal(org.apache.camel.Exchange exchange, InputStream inputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HL7DataFormat

public HL7DataFormat()
Method Detail

marshal

public void marshal(org.apache.camel.Exchange exchange,
                    Object body,
                    OutputStream outputStream)
             throws Exception
Specified by:
marshal in interface org.apache.camel.spi.DataFormat
Throws:
Exception

unmarshal

public Object unmarshal(org.apache.camel.Exchange exchange,
                        InputStream inputStream)
                 throws Exception
Specified by:
unmarshal in interface org.apache.camel.spi.DataFormat
Throws:
Exception

isValidate

public boolean isValidate()

setValidate

public void setValidate(boolean validate)

getParser

public ca.uhn.hl7v2.parser.Parser getParser()

setParser

public void setParser(ca.uhn.hl7v2.parser.Parser parser)


Apache Camel