Search in sources :

Example 6 with GenericParser

use of ca.uhn.hl7v2.parser.GenericParser in project camel by apache.

the class HL7XmlDataFormatTest method createRouteBuilder.

protected RouteBuilder createRouteBuilder() throws Exception {
    HapiContext hapiContext = new DefaultHapiContext();
    hapiContext.setValidationContext(new NoValidation());
    Parser p = new GenericParser(hapiContext);
    hl7 = new HL7DataFormat();
    hl7.setParser(p);
    return new RouteBuilder() {

        public void configure() throws Exception {
            from("direct:unmarshalOk").unmarshal().hl7(false).to("mock:unmarshal");
            from("direct:unmarshalOkXml").unmarshal(hl7).to("mock:unmarshal");
        }
    };
}
Also used : RouteBuilder(org.apache.camel.builder.RouteBuilder) DefaultHapiContext(ca.uhn.hl7v2.DefaultHapiContext) NoValidation(ca.uhn.hl7v2.validation.impl.NoValidation) HapiContext(ca.uhn.hl7v2.HapiContext) DefaultHapiContext(ca.uhn.hl7v2.DefaultHapiContext) Parser(ca.uhn.hl7v2.parser.Parser) GenericParser(ca.uhn.hl7v2.parser.GenericParser) GenericParser(ca.uhn.hl7v2.parser.GenericParser)

Aggregations

GenericParser (ca.uhn.hl7v2.parser.GenericParser)6 NoValidation (ca.uhn.hl7v2.validation.impl.NoValidation)6 Message (ca.uhn.hl7v2.model.Message)4 Parser (ca.uhn.hl7v2.parser.Parser)4 ValidationContext (ca.uhn.hl7v2.validation.ValidationContext)3 KettleException (org.pentaho.di.core.exception.KettleException)3 DefaultHapiContext (ca.uhn.hl7v2.DefaultHapiContext)2 HapiContext (ca.uhn.hl7v2.HapiContext)2 Transportable (ca.uhn.hl7v2.protocol.Transportable)2 MLLPTransport (ca.uhn.hl7v2.protocol.impl.MLLPTransport)2 RouteBuilder (org.apache.camel.builder.RouteBuilder)2 Result (org.pentaho.di.core.Result)2 KettleDatabaseException (org.pentaho.di.core.exception.KettleDatabaseException)2 KettleXMLException (org.pentaho.di.core.exception.KettleXMLException)2 MLLPSocketCacheEntry (org.pentaho.di.trans.steps.hl7input.common.MLLPSocketCacheEntry)2 Structure (ca.uhn.hl7v2.model.Structure)1 TransportableImpl (ca.uhn.hl7v2.protocol.impl.TransportableImpl)1 ValidationRuleBuilder (ca.uhn.hl7v2.validation.builder.ValidationRuleBuilder)1 IOException (java.io.IOException)1 MessageBox (org.eclipse.swt.widgets.MessageBox)1