From 44893b89b9915c0a0208a14cad2a917ac270a41b Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 21 Dec 2019 09:13:18 +1100 Subject: [PATCH] be specific about which resource types to cache up from core package --- .../org/hl7/fhir/convertors/BaseLoader.java | 18 ++++++++++++++++++ .../fhir/r5/validation/ValidationEngine.java | 8 ++++---- 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/BaseLoader.java diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/BaseLoader.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/BaseLoader.java new file mode 100644 index 000000000..8ad14c1b2 --- /dev/null +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/BaseLoader.java @@ -0,0 +1,18 @@ +package org.hl7.fhir.convertors; + +public abstract class BaseLoader { + + private String[] types; + + public BaseLoader(String[] types) { + super(); + this.types = types; + } + + public String[] getTypes() { + return types; + } + + + +} diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java index ca7dd3d0f..803428fb9 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java @@ -415,13 +415,13 @@ public class ValidationEngine implements IValidatorResourceFetcher { if (Utilities.noString(version)) return null; if (version.startsWith("1.0")) - return new R2ToR5Loader(); + return new R2ToR5Loader(new String[] { "Conformance", "StructureDefinition", "ValueSet", "SearchParameter", "OperationDefinition", "Questionnaire","ConceptMap","StructureMap", "NamingSystem"}); if (version.startsWith("1.4")) - return new R2016MayToR5Loader(); // special case + return new R2016MayToR5Loader(new String[] { "Conformance", "StructureDefinition", "ValueSet", "CodeSystem", "SearchParameter", "OperationDefinition", "Questionnaire","ConceptMap","StructureMap", "NamingSystem"}); // special case if (version.startsWith("3.0")) - return new R3ToR5Loader(); + return new R3ToR5Loader(new String[] { "CapabilityStatement", "StructureDefinition", "ValueSet", "CodeSystem", "SearchParameter", "OperationDefinition", "Questionnaire","ConceptMap","StructureMap", "NamingSystem"}); if (version.startsWith("4.0")) - return new R4ToR5Loader(); + return new R4ToR5Loader(new String[] { "CapabilityStatement", "StructureDefinition", "ValueSet", "CodeSystem", "SearchParameter", "OperationDefinition", "Questionnaire","ConceptMap","StructureMap", "NamingSystem"}); return null; }