diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java index 09dd738a9b74..33e8844f951d 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java @@ -35,7 +35,7 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IInsta private boolean noBindingMsgSuppressed = false; private volatile VersionSpecificWorkerContextWrapper myWrappedWorkerContext; private boolean errorForUnknownProfiles = true; - private boolean myUnknownSystemsCauseErrors = true; + private boolean assumeValidRestReferences; private List myExtensionDomains = Collections.emptyList(); private IValidatorResourceFetcher validatorResourceFetcher; @@ -133,14 +133,6 @@ public void setBestPracticeWarningLevel(BestPracticeWarningLevel theBestPractice myBestPracticeWarningLevel = theBestPracticeWarningLevel; } - public void setUnknownSystemsCauseErrors(boolean theUnknownSystemsCauseErrors) { - myUnknownSystemsCauseErrors = theUnknownSystemsCauseErrors; - } - - public boolean isUnknownSystemsCauseErrors() { - return myUnknownSystemsCauseErrors; - } - /** * Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of * DefaultProfileValidationSupport if the no-arguments constructor for this object was used. @@ -238,7 +230,6 @@ protected List validate(IValidationContext theValidationCt .setAnyExtensionsAllowed(isAnyExtensionsAllowed()) .setBestPracticeWarningLevel(getBestPracticeWarningLevel()) .setErrorForUnknownProfiles(isErrorForUnknownProfiles()) - .setUnknownSystemsCauseErrors(isUnknownSystemsCauseErrors()) .setExtensionDomains(getExtensionDomains()) .setValidationPolicyAdvisor(validatorPolicyAdvisor) .setNoTerminologyChecks(isNoTerminologyChecks()) diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java index 2528e5577add..ac383cc3ca7e 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java @@ -47,7 +47,7 @@ class ValidatorWrapper { private boolean myAssumeValidRestReferences; private boolean myNoExtensibleWarnings; private boolean myNoBindingMsgSuppressed; - private boolean myUnknownSystemsCauseErrors; + private Collection myExtensionDomains; private IValidatorResourceFetcher myValidatorResourceFetcher; private IValidationPolicyAdvisor myValidationPolicyAdvisor; @@ -83,11 +83,6 @@ public ValidatorWrapper setErrorForUnknownProfiles(boolean theErrorForUnknownPro return this; } - public ValidatorWrapper setUnknownSystemsCauseErrors(boolean theUnknownSystemsCauseErrors) { - myUnknownSystemsCauseErrors = theUnknownSystemsCauseErrors; - return this; - } - public ValidatorWrapper setNoTerminologyChecks(boolean theNoTerminologyChecks) { myNoTerminologyChecks = theNoTerminologyChecks; return this; @@ -135,7 +130,8 @@ public List validate( v.setResourceIdRule(IdStatus.OPTIONAL); v.setNoTerminologyChecks(myNoTerminologyChecks); v.setErrorForUnknownProfiles(myErrorForUnknownProfiles); - v.setUnknownCodeSystemsCauseErrors(myUnknownSystemsCauseErrors); + /* setUnknownCodeSystemsCauseErrors interacts with UnknownCodeSystemWarningValidationSupport. Until this interaction is resolved, the value here should remain fixed. */ + v.setUnknownCodeSystemsCauseErrors(true); v.getExtensionDomains().addAll(myExtensionDomains); v.setFetcher(myValidatorResourceFetcher); v.setPolicyAdvisor(myValidationPolicyAdvisor);