Skip to content

Commit

Permalink
Don't expose unknownCodeSystemsCausesErrors for now. Use a constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
dotasek committed Oct 3, 2024
1 parent 2cca8bf commit 5faa571
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> myExtensionDomains = Collections.emptyList();
private IValidatorResourceFetcher validatorResourceFetcher;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -238,7 +230,6 @@ protected List<ValidationMessage> validate(IValidationContext<?> theValidationCt
.setAnyExtensionsAllowed(isAnyExtensionsAllowed())
.setBestPracticeWarningLevel(getBestPracticeWarningLevel())
.setErrorForUnknownProfiles(isErrorForUnknownProfiles())
.setUnknownSystemsCauseErrors(isUnknownSystemsCauseErrors())
.setExtensionDomains(getExtensionDomains())
.setValidationPolicyAdvisor(validatorPolicyAdvisor)
.setNoTerminologyChecks(isNoTerminologyChecks())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ValidatorWrapper {
private boolean myAssumeValidRestReferences;
private boolean myNoExtensibleWarnings;
private boolean myNoBindingMsgSuppressed;
private boolean myUnknownSystemsCauseErrors;

private Collection<? extends String> myExtensionDomains;
private IValidatorResourceFetcher myValidatorResourceFetcher;
private IValidationPolicyAdvisor myValidationPolicyAdvisor;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -135,7 +130,8 @@ public List<ValidationMessage> 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);
Expand Down

0 comments on commit 5faa571

Please sign in to comment.