Examples of HapiContext


Examples of ca.uhn.hl7v2.HapiContext

   *            this parser (defaults to ValidationContextFactory.DefaultValidation)
   *
   * @deprecated use a dedicated {@link HapiContext} and set its ValidationContext property
   */
  public void setValidationContext(ValidationContext context) {
    HapiContext newContext = new DefaultHapiContext(getHapiContext());
    newContext.setValidationContext(context);
    setHapiContext(newContext);
  }
View Full Code Here

Examples of ca.uhn.hl7v2.HapiContext

   * @param configuration The parser configuration
   *
   * @deprecated use a dedicated {@link HapiContext} and set its ParserConfiguration property
   */
  public void setParserConfiguration(ParserConfiguration configuration) {
    HapiContext newContext = new DefaultHapiContext(getHapiContext());
    newContext.setParserConfiguration(configuration);
    setHapiContext(newContext);
  }
View Full Code Here

Examples of ca.uhn.hl7v2.HapiContext

   * 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

Examples of ca.uhn.hl7v2.HapiContext

        assertMockEndpointsSatisfied();
    }   

    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

Examples of ca.uhn.hl7v2.HapiContext

        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

Examples of ca.uhn.hl7v2.HapiContext

   * 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

Examples of ca.uhn.hl7v2.HapiContext

   *            this parser (defaults to ValidationContextFactory.DefaultValidation)
   *
   * @deprecated use a dedicated {@link HapiContext} and set its ValidationContext property
   */
  public void setValidationContext(ValidationContext context) {
    HapiContext newContext = new DefaultHapiContext(getHapiContext());
    newContext.setValidationContext(context);
    setHapiContext(newContext);
  }
View Full Code Here

Examples of ca.uhn.hl7v2.HapiContext

   * @param configuration The parser configuration
   *
   * @deprecated use a dedicated {@link HapiContext} and set its ParserConfiguration property
   */
  public void setParserConfiguration(ParserConfiguration configuration) {
    HapiContext newContext = new DefaultHapiContext(getHapiContext());
    newContext.setParserConfiguration(configuration);
    setHapiContext(newContext);
  }
View Full Code Here

Examples of ca.uhn.hl7v2.HapiContext

        return declaredProfiles.toArray(new String[declaredProfiles.size()]);
    }
   
    private ValidationException[] testAgainstProfile(Message message, String id) throws ProfileException, HL7Exception {
        HL7Exception[] exceptions;
        HapiContext context = message.getParser().getHapiContext();
        Validator validator = context.getConformanceValidator();
        try {
            ProfileStore profileStore = context.getProfileStore();
            String profileString = profileStore.getProfile(id);
            if (profileString != null) {
                RuntimeProfile profile = PARSER.parse(profileString);              
                exceptions = validator.validate(message, profile.getMessage());
            } else {
View Full Code Here

Examples of ca.uhn.hl7v2.HapiContext

   * 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
TOP
Copyright © 2018 www.massapi.com. 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.