Package ca.uhn.hl7v2

Examples of ca.uhn.hl7v2.DefaultHapiContext


        Message received = mock.getReceivedExchanges().get(0).getIn().getMandatoryBody(Message.class);
        assertEquals("O01", new Terser(received).get("MSH-9-2"));
    }   

    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() {
View Full Code Here


  public void afterPropertiesSet() throws Exception {
    if (myPort <= 0) {
      throw new IllegalStateException("Port not set");
    }
   
    myContext = new DefaultHapiContext();
    StandardSocketFactory socketFactory = new StandardSocketFactory();
    socketFactory.setAcceptedSocketTimeout(2000);
    myContext.setSocketFactory(socketFactory);
    myContext.setExecutorService(Executors.newCachedThreadPool(new MyThreadFactory()));
    myContext.setLowerLayerProtocol(new MinLowerLayerProtocol(true));
View Full Code Here

   * NoValidation validation context}.
     *
     * @return PipeParser with disabled validation
   */
  public static PipeParser getInstanceWithNoValidation() {
    HapiContext context = new DefaultHapiContext();
    context.setValidationContext(ValidationContextFactory.noValidation());
    return new PipeParser(context);
  }
View Full Code Here

  private final PipeParser pipeParser;
  private final XMLParser xmlParser;

  /** Creates a new instance of GenericParser */
  public GenericParser() {
    this(new DefaultHapiContext());
  }
View Full Code Here

     *
     * @return instance of GenericParser without validation
     */
    public static GenericParser getInstanceWithNoValidation() {
        return new GenericParser(
                new DefaultHapiContext(ValidationContextFactory.noValidation()));
    }
View Full Code Here

   *
   * @param theInputStream
   *            The input stream to read from
   */
  public Hl7InputStreamMessageIterator(InputStream theInputStream) {
        this(theInputStream, new DefaultHapiContext(ValidationContextFactory.noValidation()));
  }
View Full Code Here

   *
   * @param theReader
   *            The reader to read from
   */
  public Hl7InputStreamMessageIterator(Reader theReader) {
    this(theReader, new DefaultHapiContext(ValidationContextFactory.noValidation()));
  }
View Full Code Here

                     implements ValidationExceptionHandlerFactory<Boolean> {

  private boolean result = true;

  public DefaultValidationExceptionHandler() {
        super(new DefaultHapiContext());
    }
View Full Code Here

        super();
        this.context = context;
    }

    public DefaultValidator(ValidationContext validationContext) {
        this(new DefaultHapiContext(validationContext));
    }
View Full Code Here

    public DefaultValidator(ValidationContext validationContext) {
        this(new DefaultHapiContext(validationContext));
    }

    public DefaultValidator(ValidationRuleBuilder builder) {
        this(new DefaultHapiContext(builder));
    }
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.DefaultHapiContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.