Interface IContextResourceLoader

All Known Implementing Classes:
TestPackageLoader

public interface IContextResourceLoader
  • Method Details

    • getTypes

      Returns:
      List of the resource types that should be loaded
    • 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.FHIRException
      IOException
    • 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 circumstance
      IOException
    • getResourcePath

      get the path for references to this resource.
      Parameters:
      resource -
      Returns:
      null if not tracking paths
    • getNewLoader

      IContextResourceLoader getNewLoader(org.hl7.fhir.utilities.npm.NpmPackage npm) throws com.google.gson.JsonSyntaxException, IOException
      called when a new package is being loaded this is called by loadPackageAndDependencies when a new package is loaded
      Parameters:
      npm -
      Returns:
      Throws:
      IOException
      com.google.gson.JsonSyntaxException
    • getCodeSystems

      called when processing R2 for implicit code systems in ValueSets
      Returns:
    • setPatchUrls

      void setPatchUrls(boolean value)
      if this is true, then the loader will patch canonical URLs and cross-links to add /X.X/ into the URL so that different versions can be loaded safely default is false
    • patchUrl

      String patchUrl(String url, String resourceType)
      patch the URL if necessary
      Parameters:
      url -
      Returns:
    • setLoadProfiles

      set this to false (default is true) if you don't want profiles loaded
      Parameters:
      value -
      Returns:
    • txFactory

      Returns:
      the terminology client factory
    • wantLoad

      boolean wantLoad(org.hl7.fhir.utilities.npm.NpmPackage pi, org.hl7.fhir.utilities.npm.NpmPackage.PackageResourceInformation pri)
      Called during the loading process - the loader can decide which resources to load. At this point, only the .index.json is being read
      Parameters:
      pi -
      pri -
      Returns: