Class BaseFhirLibraryContentProvider
- java.lang.Object
-
- org.opencds.cqf.cql.evaluator.cql2elm.content.fhir.BaseFhirLibraryContentProvider
-
- All Implemented Interfaces:
org.cqframework.cql.cql2elm.LibrarySourceProvider,LibraryContentProvider
- Direct Known Subclasses:
BundleFhirLibraryContentProvider,FhirClientFhirLibraryContentProvider
public abstract class BaseFhirLibraryContentProvider extends Object implements LibraryContentProvider
This class implements logic for extracting content from a FHIR Library resource and provides an extension point for implementing the fetch of a FHIR library matching a specific identifier.
-
-
Field Summary
Fields Modifier and Type Field Description protected AdapterFactoryadapterFactory
-
Constructor Summary
Constructors Constructor Description BaseFhirLibraryContentProvider(AdapterFactory adapterFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected InputStreamgetContentStream(org.hl7.fhir.instance.model.api.IBaseResource library, String contentType)protected abstract org.hl7.fhir.instance.model.api.IBaseResourcegetLibrary(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier)InputStreamgetLibraryContent(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, LibraryContentType libraryContentType)Get content of a library in the format specified.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opencds.cqf.cql.evaluator.cql2elm.content.LibraryContentProvider
getLibrarySource
-
-
-
-
Field Detail
-
adapterFactory
protected AdapterFactory adapterFactory
-
-
Constructor Detail
-
BaseFhirLibraryContentProvider
public BaseFhirLibraryContentProvider(AdapterFactory adapterFactory)
-
-
Method Detail
-
getLibraryContent
public InputStream getLibraryContent(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, LibraryContentType libraryContentType)
Description copied from interface:LibraryContentProviderGet content of a library in the format specified. If the versionedIdentifier has a version specified it returns the nearest compatible version. If a version is not specified it returns the highest version. If no compatible version is found, it returns null. Returns null if unable to provide the type of content specified.- Specified by:
getLibraryContentin interfaceLibraryContentProvider- Parameters:
libraryIdentifier- The identifier of the library to provide content for.libraryContentType- The format of the content to return- Returns:
- InputStream the library content
-
getContentStream
protected InputStream getContentStream(org.hl7.fhir.instance.model.api.IBaseResource library, String contentType)
-
getLibrary
protected abstract org.hl7.fhir.instance.model.api.IBaseResource getLibrary(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier)
-
-