/** * Validates a resource instance returning a {@link ca.uhn.fhir.validation.ValidationResult} which contains the results. * * @param theResource * the resource to validate * @return the results of validation * @since 1.1 */ public ValidationResult validateWithResult(String theResource) { Validate.notNull(theResource, "theResource must not be null"); applyDefaultValidators(); IValidationContext<IBaseResource> ctx = ValidationContext.forText(myContext, theResource); for (IValidatorModule next : myValidators) { next.validateResource(ctx); } return ctx.toResult(); }
/** * Validates a resource instance returning a {@link ca.uhn.fhir.validation.ValidationResult} which contains the results. * * @param theResource * the resource to validate * @return the results of validation * @since 0.7 */ public ValidationResult validateWithResult(IBaseResource theResource) { Validate.notNull(theResource, "theResource must not be null"); applyDefaultValidators(); IValidationContext<IBaseResource> ctx = ValidationContext.forResource(myContext, theResource); for (IValidatorModule next : myValidators) { next.validateResource(ctx); } return ctx.toResult(); }
/** * Validates a resource instance returning a {@link ca.uhn.fhir.validation.ValidationResult} which contains the results. * * @param theResource * the resource to validate * @return the results of validation * @since 0.7 */ public ValidationResult validateWithResult(IBaseResource theResource) { Validate.notNull(theResource, "theResource must not be null"); applyDefaultValidators(); IValidationContext<IBaseResource> ctx = ValidationContext.forResource(myContext, theResource); for (IValidatorModule next : myValidators) { next.validateResource(ctx); } return ctx.toResult(); }
/** * Validates a resource instance returning a {@link ca.uhn.fhir.validation.ValidationResult} which contains the results. * * @param theResource * the resource to validate * @return the results of validation * @since 1.1 */ public ValidationResult validateWithResult(String theResource) { Validate.notNull(theResource, "theResource must not be null"); applyDefaultValidators(); IValidationContext<IBaseResource> ctx = ValidationContext.forText(myContext, theResource); for (IValidatorModule next : myValidators) { next.validateResource(ctx); } return ctx.toResult(); }