mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-02 01:19:14 +00:00
Merge pull request #391 from azizjonh/patch-1
Load context from classpath allowing duplicates
This commit is contained in:
commit
45530c0f5d
@ -243,8 +243,12 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
||||
}
|
||||
|
||||
public static SimpleWorkerContext fromClassPath(String name) throws IOException, FHIRException {
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user