Class InMemoryLibraryContentProvider
- java.lang.Object
-
- org.opencds.cqf.cql.evaluator.cql2elm.content.InMemoryLibraryContentProvider
-
- All Implemented Interfaces:
org.cqframework.cql.cql2elm.LibrarySourceProvider,LibraryContentProvider
public class InMemoryLibraryContentProvider extends Object implements LibraryContentProvider
This class implements the LibraryContentProvider API, using a set of strings representing CQL library content as a source.
-
-
Constructor Summary
Constructors Constructor Description InMemoryLibraryContentProvider(List<String> libraries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamgetLibraryContent(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, LibraryContentType libraryContentType)Get content of a library in the format specified.InputStreamgetLibrarySource(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier)Gets the content of a library as CQL text.
-
-
-
Method Detail
-
getLibrarySource
public InputStream getLibrarySource(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier)
Description copied from interface:LibraryContentProviderGets the content of a library as CQL text. 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.- Specified by:
getLibrarySourcein interfaceLibraryContentProvider- Specified by:
getLibrarySourcein interfaceorg.cqframework.cql.cql2elm.LibrarySourceProvider- Parameters:
libraryIdentifier- The identifier of the library to provide content for.- Returns:
- InputStream the CQL text.
-
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
-
-