diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java index c947c6d44..43e80037a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java @@ -246,10 +246,14 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon } public static SimpleWorkerContext fromClassPath(String name) throws IOException, FHIRException { - InputStream s = SimpleWorkerContext.class.getResourceAsStream("/"+name); - SimpleWorkerContext res = new SimpleWorkerContext(); + return fromClassPath(name, false); + } + public static SimpleWorkerContext fromClassPath(String name, boolean allowDuplicates) throws IOException, FHIRException { + InputStream s = SimpleWorkerContext.class.getResourceAsStream("/" + name); + SimpleWorkerContext res = new SimpleWorkerContext(); + res.setAllowLoadingDuplicates(allowDuplicates); res.loadFromStream(s, null); - return res; + return res; } public static SimpleWorkerContext fromDefinitions(Map source, IContextResourceLoader loader, PackageVersion pi) throws FileNotFoundException, IOException, FHIRException { @@ -834,5 +838,5 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon return xverManager; } - -} \ No newline at end of file +} +