diff --git a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/context/SimpleWorkerContext.java b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/context/SimpleWorkerContext.java index bc6b2bec3..9dcd8d253 100644 --- a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/context/SimpleWorkerContext.java +++ b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/context/SimpleWorkerContext.java @@ -140,6 +140,11 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon return res; } + public static SimpleWorkerContext fromNothing() throws FileNotFoundException, IOException, FHIRException { + SimpleWorkerContext res = new SimpleWorkerContext(); + return res; + } + public static SimpleWorkerContext fromPackage(NpmPackage pi, boolean allowDuplicates) throws FileNotFoundException, IOException, FHIRException { SimpleWorkerContext res = new SimpleWorkerContext(); res.setAllowLoadingDuplicates(allowDuplicates); diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/context/SimpleWorkerContext.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/context/SimpleWorkerContext.java index 2d273468d..5358e9233 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/context/SimpleWorkerContext.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/context/SimpleWorkerContext.java @@ -147,6 +147,11 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon return res; } + public static SimpleWorkerContext fromNothing() throws FileNotFoundException, IOException, FHIRException { + SimpleWorkerContext res = new SimpleWorkerContext(); + return res; + } + public static SimpleWorkerContext fromPackage(NpmPackage pi, boolean allowDuplicates) throws FileNotFoundException, IOException, FHIRException { SimpleWorkerContext res = new SimpleWorkerContext(); res.setAllowLoadingDuplicates(allowDuplicates); diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/IgLoader.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/IgLoader.java index 637dbb675..77d43762e 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/IgLoader.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/IgLoader.java @@ -785,7 +785,7 @@ public class IgLoader { else if (fn.endsWith(".json") && !fn.endsWith("template.json")) res = new org.hl7.fhir.dstu3.formats.JsonParser().parse(new ByteArrayInputStream(content)); else if (fn.endsWith(".txt") || fn.endsWith(".map") || fn.endsWith(".fml")) - res = new org.hl7.fhir.dstu3.utils.StructureMapUtilities(null).parse(new String(content)); + res = new org.hl7.fhir.dstu3.utils.StructureMapUtilities(org.hl7.fhir.dstu3.context.SimpleWorkerContext.fromNothing()).parse(new String(content)); else throw new FHIRException("Unsupported format for " + fn); r = VersionConvertorFactory_30_50.convertResource(res); @@ -796,7 +796,7 @@ public class IgLoader { else if (fn.endsWith(".json") && !fn.endsWith("template.json")) res = new org.hl7.fhir.r4.formats.JsonParser().parse(new ByteArrayInputStream(content)); else if (fn.endsWith(".txt") || fn.endsWith(".map") || fn.endsWith(".fml")) - res = new org.hl7.fhir.r4.utils.StructureMapUtilities(null).parse(new String(content), fn); + res = new org.hl7.fhir.r4.utils.StructureMapUtilities(org.hl7.fhir.r4.context.SimpleWorkerContext.fromNothing()).parse(new String(content), fn); else throw new FHIRException("Unsupported format for " + fn); r = VersionConvertorFactory_40_50.convertResource(res); @@ -807,7 +807,7 @@ public class IgLoader { else if (fn.endsWith(".json") && !fn.endsWith("template.json")) res = new org.hl7.fhir.r4b.formats.JsonParser().parse(new ByteArrayInputStream(content)); else if (fn.endsWith(".txt") || fn.endsWith(".map") || fn.endsWith(".fml")) - res = new org.hl7.fhir.r4b.utils.structuremap.StructureMapUtilities(null).parse(new String(content), fn); + res = new org.hl7.fhir.r4b.utils.structuremap.StructureMapUtilities(org.hl7.fhir.r4b.context.SimpleWorkerContext.fromNothing()).parse(new String(content), fn); else throw new FHIRException("Unsupported format for " + fn); r = VersionConvertorFactory_43_50.convertResource(res);