be specific about which resource types to cache up from core package

This commit is contained in:
Grahame Grieve 2019-12-21 09:13:18 +11:00
parent 219e4acbbd
commit 44893b89b9
2 changed files with 22 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -415,13 +415,13 @@ public class ValidationEngine implements IValidatorResourceFetcher {
if (Utilities.noString(version)) if (Utilities.noString(version))
return null; return null;
if (version.startsWith("1.0")) 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")) 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")) 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")) 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; return null;
} }