Class TerminologyCache
java.lang.Object
org.hl7.fhir.r5.terminologies.utilities.TerminologyCache
This implements a two level cache.
- a temporary cache for remembering previous local operations
- a persistent cache for remembering tx server operations
the cache is a series of pairs: a map, and a list. the map is the loaded cache, the list is the persistent cache, carefully maintained in order for version control consistency
- Author:
- graha
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
static class
static class
static class
static class
static class
class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cacheCapabilityStatement
(String address, CapabilityStatement capabilityStatement) void
cacheCodeSystem
(String canonical, TerminologyCache.SourcedCodeSystem scs) void
cacheExpansion
(TerminologyCache.CacheToken cacheToken, ValueSetExpansionOutcome res, boolean persistent) void
cacheSubsumes
(TerminologyCache.CacheToken cacheToken, Boolean b, boolean persistent) void
cacheTerminologyCapabilities
(String address, TerminologyCapabilities terminologyCapabilities) void
cacheValidation
(TerminologyCache.CacheToken cacheToken, ValidationResult res, boolean persistent) void
cacheValueSet
(String canonical, TerminologyCache.SourcedValueSet svs) extracted
(JsonParser json, ValueSet vsc) generateExpandToken
(ValueSet vs, boolean hierarchical) generateSubsumesToken
(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding parent, Coding child, Parameters expParameters) generateValidationToken
(org.hl7.fhir.utilities.validation.ValidationOptions options, CodeableConcept code, ValueSet vs, Parameters expParameters) generateValidationToken
(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding code, String vsUrl, Parameters expParameters) generateValidationToken
(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding code, ValueSet vs, Parameters expParameters) getCapabilityStatement
(String address) getCodeSystem
(String canonical) getExpansion
(TerminologyCache.CacheToken cacheToken) org.hl7.fhir.r5.terminologies.utilities.TerminologyCache.NamedCache
getNamedCache
(TerminologyCache.CacheToken cacheToken) getServerId
(String address) getSubsumes
(TerminologyCache.CacheToken cacheToken) protected TerminologyCache.SystemNameKeyGenerator
getTerminologyCapabilities
(String address) getValidation
(TerminologyCache.CacheToken cacheToken) getValueSet
(String canonical) getVSEssense
(ValueSet vs) boolean
hasCapabilityStatement
(String address) boolean
hasCodeSystem
(String canonical) boolean
hasTerminologyCapabilities
(String address) boolean
hasValueSet
(String canonical) void
void
void
save()
servers()
void
store
(TerminologyCache.CacheToken cacheToken, boolean persistent, org.hl7.fhir.r5.terminologies.utilities.TerminologyCache.NamedCache nc, org.hl7.fhir.r5.terminologies.utilities.TerminologyCache.CacheEntry e) summary
(CodeableConcept code) void
unload()
-
Field Details
-
TRANSIENT
- See Also:
-
PERMANENT
- See Also:
-
-
Constructor Details
-
TerminologyCache
public TerminologyCache(Object lock, String folder) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException - Throws:
FileNotFoundException
IOException
org.hl7.fhir.exceptions.FHIRException
-
-
Method Details
-
getSystemNameKeyGenerator
-
getServerId
- Throws:
IOException
-
unload
-
hasCapabilityStatement
-
getCapabilityStatement
-
cacheCapabilityStatement
public void cacheCapabilityStatement(String address, CapabilityStatement capabilityStatement) throws IOException - Throws:
IOException
-
hasTerminologyCapabilities
-
getTerminologyCapabilities
-
cacheTerminologyCapabilities
public void cacheTerminologyCapabilities(String address, TerminologyCapabilities terminologyCapabilities) throws IOException - Throws:
IOException
-
generateValidationToken
public TerminologyCache.CacheToken generateValidationToken(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding code, ValueSet vs, Parameters expParameters) -
generateValidationToken
public TerminologyCache.CacheToken generateValidationToken(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding code, String vsUrl, Parameters expParameters) -
extracted
- Throws:
IOException
-
generateValidationToken
public TerminologyCache.CacheToken generateValidationToken(org.hl7.fhir.utilities.validation.ValidationOptions options, CodeableConcept code, ValueSet vs, Parameters expParameters) -
getVSEssense
-
generateExpandToken
-
nameCacheToken
-
getNamedCache
public org.hl7.fhir.r5.terminologies.utilities.TerminologyCache.NamedCache getNamedCache(TerminologyCache.CacheToken cacheToken) -
getExpansion
-
cacheExpansion
public void cacheExpansion(TerminologyCache.CacheToken cacheToken, ValueSetExpansionOutcome res, boolean persistent) -
store
public void store(TerminologyCache.CacheToken cacheToken, boolean persistent, org.hl7.fhir.r5.terminologies.utilities.TerminologyCache.NamedCache nc, org.hl7.fhir.r5.terminologies.utilities.TerminologyCache.CacheEntry e) -
getValidation
-
cacheValidation
public void cacheValidation(TerminologyCache.CacheToken cacheToken, ValidationResult res, boolean persistent) -
save
-
hashJson
-
summary
-
summary
-
summary
-
removeCS
-
getFolder
-
servers
-
hasValueSet
-
hasCodeSystem
-
getValueSet
-
getCodeSystem
-
cacheValueSet
-
cacheCodeSystem
-
generateSubsumesToken
public TerminologyCache.CacheToken generateSubsumesToken(org.hl7.fhir.utilities.validation.ValidationOptions options, Coding parent, Coding child, Parameters expParameters) -
getSubsumes
-
cacheSubsumes
-