Bump core version, add missing implementations
This commit is contained in:
parent
86c2c13e0f
commit
ac979e16b0
|
@ -208,5 +208,10 @@ public class SearchParamExtractorR4 extends BaseSearchParamExtractor implements
|
|||
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean paramIsType(String name, int index) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -196,6 +196,7 @@ import org.hl7.fhir.r5.utils.validation.constants.BindingKind;
|
|||
import org.hl7.fhir.r5.utils.validation.constants.ContainedReferenceValidationPolicy;
|
||||
import org.hl7.fhir.r5.utils.validation.constants.ReferenceValidationPolicy;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.validation.instance.advisor.BasePolicyAdvisorForFullValidation;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Order;
|
||||
|
@ -1075,6 +1076,18 @@ public abstract class BaseJpaR4Test extends BaseJpaTest implements ITestDataBuil
|
|||
public ReferenceValidationPolicy getReferencePolicy() {
|
||||
return ReferenceValidationPolicy.IGNORE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IValidationPolicyAdvisor getPolicyAdvisor() {
|
||||
return new BasePolicyAdvisorForFullValidation(getReferencePolicy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IValidationPolicyAdvisor setPolicyAdvisor(IValidationPolicyAdvisor policyAdvisor) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.hl7.fhir.r5.utils.validation.constants.BindingKind;
|
|||
import org.hl7.fhir.r5.utils.validation.constants.ContainedReferenceValidationPolicy;
|
||||
import org.hl7.fhir.r5.utils.validation.constants.ReferenceValidationPolicy;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.validation.instance.advisor.BasePolicyAdvisorForFullValidation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -123,6 +124,16 @@ public class ValidatorPolicyAdvisor implements IValidationPolicyAdvisor {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IValidationPolicyAdvisor getPolicyAdvisor() {
|
||||
return new BasePolicyAdvisorForFullValidation(getReferencePolicy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IValidationPolicyAdvisor setPolicyAdvisor(IValidationPolicyAdvisor policyAdvisor) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReferenceValidationPolicy getReferencePolicy() {
|
||||
return ReferenceValidationPolicy.IGNORE;
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.hl7.fhir.common.hapi.validation.validator.VersionSpecificWorkerContex
|
|||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.utils.XVerExtensionManager;
|
||||
import org.hl7.fhir.r5.utils.validation.ValidatorSession;
|
||||
import org.hl7.fhir.validation.instance.InstanceValidator;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -56,7 +57,7 @@ public class ValidatorResourceFetcherTest extends BaseTest {
|
|||
InstanceValidator v = new InstanceValidator(
|
||||
wrappedWorkerContext,
|
||||
new FhirInstanceValidator.NullEvaluationContext(),
|
||||
new XVerExtensionManager(null));
|
||||
new XVerExtensionManager(null), new ValidatorSession());
|
||||
RequestDetails r = new SystemRequestDetails();
|
||||
// test
|
||||
Element returnedResource = fetcher.fetch(v, r,"http://www.test-url-for-questionnaire.com/Questionnaire/test-id|1.0.0");
|
||||
|
|
|
@ -449,6 +449,26 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
|||
return retVal;
|
||||
}
|
||||
|
||||
public <T extends Resource> List<T> fetchResourcesByType(Class<T> theClass) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public <T extends Resource> T fetchResource(Class<T> class_, String uri, Resource source) {
|
||||
return fetchResource(class_, uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StructureDefinition> fetchTypeDefinitions(String n) {
|
||||
List<StructureDefinition> types = new ArrayList<>();
|
||||
for (StructureDefinition sd : allStructures()) {
|
||||
if (n.equals(sd.getTypeTail())) {
|
||||
types.add(sd);
|
||||
}
|
||||
}
|
||||
return types;
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.hl7.fhir.r4.model.Resource fetchResourceById(String theType, String theUri) {
|
||||
throw new UnsupportedOperationException(Msg.code(282));
|
||||
|
|
|
@ -158,6 +158,11 @@ public class FhirPathR4 implements IFhirPath {
|
|||
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean paramIsType(String name, int index) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import org.hl7.fhir.r5.utils.validation.constants.BindingKind;
|
|||
import org.hl7.fhir.r5.utils.validation.constants.ContainedReferenceValidationPolicy;
|
||||
import org.hl7.fhir.r5.utils.validation.constants.ReferenceValidationPolicy;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.validation.instance.advisor.BasePolicyAdvisorForFullValidation;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
|
@ -91,6 +92,16 @@ public class FhirDefaultPolicyAdvisor implements IValidationPolicyAdvisor {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IValidationPolicyAdvisor getPolicyAdvisor() {
|
||||
return new BasePolicyAdvisorForFullValidation(getReferencePolicy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IValidationPolicyAdvisor setPolicyAdvisor(IValidationPolicyAdvisor policyAdvisor) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReferenceValidationPolicy getReferencePolicy() {
|
||||
return ReferenceValidationPolicy.IGNORE;
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.hl7.fhir.r5.model.StructureDefinition;
|
|||
import org.hl7.fhir.r5.utils.XVerExtensionManager;
|
||||
import org.hl7.fhir.r5.utils.validation.IValidationPolicyAdvisor;
|
||||
import org.hl7.fhir.r5.utils.validation.IValidatorResourceFetcher;
|
||||
import org.hl7.fhir.r5.utils.validation.ValidatorSession;
|
||||
import org.hl7.fhir.r5.utils.validation.constants.BestPracticeWarningLevel;
|
||||
import org.hl7.fhir.r5.utils.validation.constants.IdStatus;
|
||||
import org.hl7.fhir.utilities.i18n.I18nConstants;
|
||||
|
@ -119,7 +120,7 @@ class ValidatorWrapper {
|
|||
FHIRPathEngine.IEvaluationContext evaluationCtx = new FhirInstanceValidator.NullEvaluationContext();
|
||||
XVerExtensionManager xverManager = new XVerExtensionManager(theWorkerContext);
|
||||
try {
|
||||
v = new InstanceValidator(theWorkerContext, evaluationCtx, xverManager);
|
||||
v = new InstanceValidator(theWorkerContext, evaluationCtx, xverManager, new ValidatorSession());
|
||||
} catch (Exception e) {
|
||||
throw new ConfigurationException(Msg.code(648) + e.getMessage(), e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue