Package org.hl7.fhir.r5.test.utils
Class TestPackageLoader
java.lang.Object
org.hl7.fhir.r5.test.utils.TestPackageLoader
- All Implemented Interfaces:
IWorkerContext.IContextResourceLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalled when processing R2 for implicit code systems in ValueSetsgetNewLoader(org.hl7.fhir.utilities.npm.NpmPackage npm) called when a new package is being loaded this is called by loadPackageAndDependencies when a new package is loadedgetResourcePath(Resource resource) get the path for references to this resource.String[]getTypes()loadBundle(InputStream stream, boolean isJson) Request to actually load the resources and do whatever is requiredloadResource(InputStream stream, boolean isJson) Load a single resources (lazy load)
-
Constructor Details
-
TestPackageLoader
-
-
Method Details
-
loadBundle
public Bundle loadBundle(InputStream stream, boolean isJson) throws org.hl7.fhir.exceptions.FHIRException, IOException Description copied from interface:IWorkerContext.IContextResourceLoaderRequest to actually load the resources and do whatever is required- Specified by:
loadBundlein interfaceIWorkerContext.IContextResourceLoader- Returns:
- A bundle because some single resources become multiple resources after loading
- Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException
-
loadResource
public Resource loadResource(InputStream stream, boolean isJson) throws org.hl7.fhir.exceptions.FHIRException, IOException Description copied from interface:IWorkerContext.IContextResourceLoaderLoad a single resources (lazy load)- Specified by:
loadResourcein interfaceIWorkerContext.IContextResourceLoader- 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
-
getTypes
- Specified by:
getTypesin interfaceIWorkerContext.IContextResourceLoader- Returns:
- List of the resource types that should be loaded
-
getResourcePath
Description copied from interface:IWorkerContext.IContextResourceLoaderget the path for references to this resource.- Specified by:
getResourcePathin interfaceIWorkerContext.IContextResourceLoader- Returns:
- null if not tracking paths
-
getNewLoader
public IWorkerContext.IContextResourceLoader getNewLoader(org.hl7.fhir.utilities.npm.NpmPackage npm) Description copied from interface:IWorkerContext.IContextResourceLoadercalled when a new package is being loaded this is called by loadPackageAndDependencies when a new package is loaded- Specified by:
getNewLoaderin interfaceIWorkerContext.IContextResourceLoader- Returns:
-
getCodeSystems
Description copied from interface:IWorkerContext.IContextResourceLoadercalled when processing R2 for implicit code systems in ValueSets- Specified by:
getCodeSystemsin interfaceIWorkerContext.IContextResourceLoader- Returns:
-