/** * Returns the ValidationContext. If none has been explicitly set, * {@link #getValidationRuleBuilder()} is called in order to to contruct a * context. If this is also null, the ca.uhn.hl7v2.validation.context_class * system property is evaluated, otherwise it returns the DefaultValidation * context. */ public ValidationContext getValidationContext() { if (validationContext == null) { if (getValidationRuleBuilder() != null) { setValidationContext(ValidationContextFactory .fromBuilder(getValidationRuleBuilder())); } else { try { setValidationContext(ValidationContextFactory.getContext()); } catch (HL7Exception e) { setValidationContext(ValidationContextFactory.defaultValidation()); } } } return validationContext; }
/** * Returns the ValidationContext. If none has been explicitly set, * {@link #getValidationRuleBuilder()} is called in order to to contruct a * context. If this is also null, the ca.uhn.hl7v2.validation.context_class * system property is evaluated, otherwise it returns the DefaultValidation * context. */ public ValidationContext getValidationContext() { if (validationContext == null) { if (getValidationRuleBuilder() != null) { setValidationContext(ValidationContextFactory .fromBuilder(getValidationRuleBuilder())); } else { try { setValidationContext(ValidationContextFactory.getContext()); } catch (HL7Exception e) { setValidationContext(ValidationContextFactory.defaultValidation()); } } } return validationContext; }