Package org.hl7.fhir.validation
Class IgLoader
- java.lang.Object
-
- org.hl7.fhir.validation.IgLoader
-
-
Constructor Summary
Constructors Constructor Description IgLoader(org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager packageCacheManager, org.hl7.fhir.r5.context.SimpleWorkerContext context, String theVersion)IgLoader(org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager packageCacheManager, org.hl7.fhir.r5.context.SimpleWorkerContext context, String theVersion, boolean isDebug)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.hl7.fhir.validation.ContentloadContent(String source, String opName, boolean asIg)protected org.hl7.fhir.r5.model.ResourceloadFileWithErrorChecking(String version, Map.Entry<String,byte[]> t, String fn)voidloadIg(List<org.hl7.fhir.r5.model.ImplementationGuide> igs, Map<String,byte[]> binaries, String src, boolean recursive)Map<String,byte[]>loadIgSource(String src, boolean recursive, boolean explore)Map<String,byte[]>loadPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, boolean loadInContext)org.hl7.fhir.r5.model.ResourceloadResourceByVersion(String fhirVersion, byte[] content, String fn)protected Map<String,byte[]>readZip(InputStream stream)voidscanForIgVersion(String src, boolean recursive, VersionSourceInformation versions)voidscanForVersions(List<String> sources, VersionSourceInformation versions)
-
-
-
Method Detail
-
loadIg
public void loadIg(List<org.hl7.fhir.r5.model.ImplementationGuide> igs, Map<String,byte[]> binaries, String src, boolean recursive) throws IOException, org.hl7.fhir.exceptions.FHIRException
- Parameters:
igs-binaries-src- Source of the IGrecursive-- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException- See Also:
loadIgSource for detailed description of the src parameter
-
loadContent
public org.hl7.fhir.validation.Content loadContent(String source, String opName, boolean asIg) throws org.hl7.fhir.exceptions.FHIRException, IOException
- Parameters:
source-opName-asIg-- Returns:
- Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException- * @see IgLoader#loadIgSource(String, boolean, boolean) loadIgSource for detailed description of the src parameter
-
loadIgSource
public Map<String,byte[]> loadIgSource(String src, boolean recursive, boolean explore) throws org.hl7.fhir.exceptions.FHIRException, IOException
- Parameters:
src- can be one of the following:
- a canonical url for an ig - this will be converted to a package id and loaded into the cache
- a package id for an ig - this will be loaded into the cache
- a direct reference to a package ("package.tgz") - this will be extracted by the cache manager, but not put in the cache
- a folder containing resources - these will be loaded directlyrecursive- if true and src resolves to a folder, recursively find and load IgSources from that directoryexplore- should be true if we're trying to load an -ig parameter, and false if we're loading source- Returns:
- Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException
-
scanForIgVersion
public void scanForIgVersion(String src, boolean recursive, VersionSourceInformation versions) throws Exception
- Throws:
Exception
-
scanForVersions
public void scanForVersions(List<String> sources, VersionSourceInformation versions) throws org.hl7.fhir.exceptions.FHIRException, IOException
- Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException
-
readZip
protected Map<String,byte[]> readZip(InputStream stream) throws IOException
- Throws:
IOException
-
loadPackage
public Map<String,byte[]> loadPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, boolean loadInContext) throws org.hl7.fhir.exceptions.FHIRException, IOException
- Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException
-
loadFileWithErrorChecking
protected org.hl7.fhir.r5.model.Resource loadFileWithErrorChecking(String version, Map.Entry<String,byte[]> t, String fn)
-
loadResourceByVersion
public org.hl7.fhir.r5.model.Resource loadResourceByVersion(String fhirVersion, byte[] content, String fn) throws IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException
-
-