Class PackageRegistryResourceProvider
- java.lang.Object
-
- org.linuxforhealth.fhir.registry.spi.AbstractRegistryResourceProvider
-
- org.linuxforhealth.fhir.registry.util.PackageRegistryResourceProvider
-
- All Implemented Interfaces:
FHIRRegistryResourceProvider
- Direct Known Subclasses:
C4BB100ResourceProvider
,C4BB110ResourceProvider
,Core430ResourceProvider
,Formulary101ResourceProvider
,Formulary110ResourceProvider
,Formulary200ResourceProvider
,Hl7Terminology310ResourceProvider
,HREX100ResourceProvider
,MCODEResourceProvider
,PDEX100ResourceProvider
,PDEX200ResourceProvider
,PlanNet100ResourceProvider
,PlanNet110ResourceProvider
,ResourceProvider
,ResourceProvider
,USCore311ResourceProvider
,USCore400ResourceProvider
,USCore501ResourceProvider
public abstract class PackageRegistryResourceProvider extends AbstractRegistryResourceProvider
A static registry resource provider that is loaded from an NPM package as specified at https://confluence.hl7.org/pages/viewpage.action?pageId=35718629This implementation caches registry resources by resource type and url
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.util.List<FHIRRegistryResource>>
profileResourceMap
protected java.util.Map<java.lang.Class<? extends Resource>,java.util.Map<java.lang.String,java.util.List<FHIRRegistryResource>>>
registryResourceMap
protected java.util.Collection<FHIRRegistryResource>
registryResources
-
Constructor Summary
Constructors Constructor Description PackageRegistryResourceProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.String
getPackageId()
Get the package id for this package registry resource provider (e.g.java.util.Collection<FHIRRegistryResource>
getProfileResources()
Get the profiles for all of the resources.java.util.Collection<FHIRRegistryResource>
getProfileResources(java.lang.String type)
Get the profile resources from this provider that constrain the given resource typejava.util.Collection<FHIRRegistryResource>
getRegistryResources()
Get all the registry resources from this providerjava.util.Collection<FHIRRegistryResource>
getRegistryResources(java.lang.Class<? extends Resource> resourceType)
Get the registry resources from this provider for the given resource typeprotected java.util.List<FHIRRegistryResource>
getRegistryResources(java.lang.Class<? extends Resource> resourceType, java.lang.String url)
Return a sorted list of FHIRRegistryResource with the passed canonical urljava.util.Collection<FHIRRegistryResource>
getSearchParameterResources(java.lang.String type)
Get the search parameter resources from this provider with the given search parameter type (e.g.-
Methods inherited from class org.linuxforhealth.fhir.registry.spi.AbstractRegistryResourceProvider
getRegistryResource, loadFromRegistry
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.linuxforhealth.fhir.registry.spi.FHIRRegistryResourceProvider
init
-
-
-
-
Field Detail
-
registryResources
protected final java.util.Collection<FHIRRegistryResource> registryResources
-
registryResourceMap
protected final java.util.Map<java.lang.Class<? extends Resource>,java.util.Map<java.lang.String,java.util.List<FHIRRegistryResource>>> registryResourceMap
-
profileResourceMap
protected final java.util.Map<java.lang.String,java.util.List<FHIRRegistryResource>> profileResourceMap
-
-
Method Detail
-
getPackageId
public abstract java.lang.String getPackageId()
Get the package id for this package registry resource provider (e.g. hl7.fhir.us.core)- Returns:
- the package id for this package registry resource provider
-
getRegistryResources
protected java.util.List<FHIRRegistryResource> getRegistryResources(java.lang.Class<? extends Resource> resourceType, java.lang.String url)
Description copied from class:AbstractRegistryResourceProvider
Return a sorted list of FHIRRegistryResource with the passed canonical url- Specified by:
getRegistryResources
in classAbstractRegistryResourceProvider
url
- the canonical url for this resource (without version suffix)- Returns:
- a list of FHIRRegistryResources with this url, sorted from low to high by version
-
getRegistryResources
public java.util.Collection<FHIRRegistryResource> getRegistryResources(java.lang.Class<? extends Resource> resourceType)
Description copied from interface:FHIRRegistryResourceProvider
Get the registry resources from this provider for the given resource type- Specified by:
getRegistryResources
in interfaceFHIRRegistryResourceProvider
- Specified by:
getRegistryResources
in classAbstractRegistryResourceProvider
- Parameters:
resourceType
- the resource type of the registry resource- Returns:
- the registry resources from this provider for the given resource type; never null
-
getRegistryResources
public java.util.Collection<FHIRRegistryResource> getRegistryResources()
Description copied from interface:FHIRRegistryResourceProvider
Get all the registry resources from this provider- Specified by:
getRegistryResources
in interfaceFHIRRegistryResourceProvider
- Specified by:
getRegistryResources
in classAbstractRegistryResourceProvider
- Returns:
- all of the registry resources from this provider; never null
-
getProfileResources
public java.util.Collection<FHIRRegistryResource> getProfileResources()
Description copied from interface:FHIRRegistryResourceProvider
Get the profiles for all of the resources.- Returns:
- the profile resources from this provider that constrain the resource types
-
getProfileResources
public java.util.Collection<FHIRRegistryResource> getProfileResources(java.lang.String type)
Description copied from interface:FHIRRegistryResourceProvider
Get the profile resources from this provider that constrain the given resource type- Specified by:
getProfileResources
in interfaceFHIRRegistryResourceProvider
- Specified by:
getProfileResources
in classAbstractRegistryResourceProvider
- Parameters:
type
- the constrained resource type- Returns:
- the profile resources from this provider that constrain the given resource type; never null
-
getSearchParameterResources
public java.util.Collection<FHIRRegistryResource> getSearchParameterResources(java.lang.String type)
Description copied from interface:FHIRRegistryResourceProvider
Get the search parameter resources from this provider with the given search parameter type (e.g. string, token, etc.)- Specified by:
getSearchParameterResources
in interfaceFHIRRegistryResourceProvider
- Specified by:
getSearchParameterResources
in classAbstractRegistryResourceProvider
- Parameters:
type
- the search parameter type- Returns:
- the search parameter resources from this provider with the given search parameter type; never null
-
-