Package org.hl7.fhir.r5.context
Interface IWorkerContext.IContextResourceLoader
-
- Enclosing interface:
- IWorkerContext
public static interface IWorkerContext.IContextResourceLoader
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IWorkerContext.IContextResourceLoadergetNewLoader(org.hl7.fhir.utilities.npm.NpmPackage npm)called when a mew package is being loaded this is called by loadPacakgeAndDependencies when a new package is loadedStringgetResourcePath(Resource resource)get the path for references to this resource.String[]getTypes()BundleloadBundle(InputStream stream, boolean isJson)Request to actually load the resources and do whatever is requiredResourceloadResource(InputStream stream, boolean isJson)Load a single resources (lazy load)
-
-
-
Method Detail
-
loadBundle
Bundle loadBundle(InputStream stream, boolean isJson) throws org.hl7.fhir.exceptions.FHIRException, IOException
Request to actually load the resources and do whatever is required- Parameters:
stream-isJson-- Returns:
- A bundle because some single resources become multiple resources after loading
- Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException
-
loadResource
Resource loadResource(InputStream stream, boolean isJson) throws org.hl7.fhir.exceptions.FHIRException, IOException
Load a single resources (lazy load)- Parameters:
stream-isJson-- Returns:
- Throws:
org.hl7.fhir.exceptions.FHIRException- - throw this if you a single resource can't be returned - can't lazy load in this circumstanceIOException
-
getResourcePath
String getResourcePath(Resource resource)
get the path for references to this resource.- Parameters:
resource-- Returns:
- null if not tracking paths
-
getNewLoader
IWorkerContext.IContextResourceLoader getNewLoader(org.hl7.fhir.utilities.npm.NpmPackage npm) throws com.google.gson.JsonSyntaxException, IOException
called when a mew package is being loaded this is called by loadPacakgeAndDependencies when a new package is loaded- Parameters:
npm-- Returns:
- Throws:
IOExceptioncom.google.gson.JsonSyntaxException
-
-