Merge branch 'master' into gg_v5.2.6

This commit is contained in:
Grahame Grieve 2020-12-03 17:16:28 +11:00 committed by GitHub
commit f7ececa034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,10 +246,14 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
} }
public static SimpleWorkerContext fromClassPath(String name) throws IOException, FHIRException { public static SimpleWorkerContext fromClassPath(String name) throws IOException, FHIRException {
InputStream s = SimpleWorkerContext.class.getResourceAsStream("/"+name); return fromClassPath(name, false);
SimpleWorkerContext res = new SimpleWorkerContext(); }
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); res.loadFromStream(s, null);
return res; return res;
} }
public static SimpleWorkerContext fromDefinitions(Map<String, byte[]> source, IContextResourceLoader loader, PackageVersion pi) throws FileNotFoundException, IOException, FHIRException { public static SimpleWorkerContext fromDefinitions(Map<String, byte[]> source, IContextResourceLoader loader, PackageVersion pi) throws FileNotFoundException, IOException, FHIRException {
@ -834,5 +838,5 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
return xverManager; return xverManager;
} }
}
}