Package org.hl7.fhir.r5.context
Class SimpleWorkerContext
- java.lang.Object
-
- org.hl7.fhir.utilities.i18n.I18nBase
-
- org.hl7.fhir.r5.context.BaseWorkerContext
-
- org.hl7.fhir.r5.context.SimpleWorkerContext
-
- All Implemented Interfaces:
ProfileUtilities.ProfileKnowledgeProvider,IWorkerContext
public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerContext, ProfileUtilities.ProfileKnowledgeProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSimpleWorkerContext.ILoadFilterstatic interfaceSimpleWorkerContext.IValidatorFactorystatic classSimpleWorkerContext.PackageResourceLoader-
Nested classes/interfaces inherited from class org.hl7.fhir.r5.context.BaseWorkerContext
BaseWorkerContext.MetadataResourceVersionComparator<T extends CanonicalResource>, BaseWorkerContext.NullTranslator, BaseWorkerContext.ResourceProxy
-
Nested classes/interfaces inherited from interface org.hl7.fhir.r5.context.IWorkerContext
IWorkerContext.CodingValidationRequest, IWorkerContext.ICanonicalResourceLocator, IWorkerContext.IContextResourceLoader, IWorkerContext.ILoggingService, IWorkerContext.PackageDetails, IWorkerContext.PackageVersion, IWorkerContext.ValidationResult
-
Nested classes/interfaces inherited from interface org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider
ProfileUtilities.ProfileKnowledgeProvider.BindingResolution
-
-
Field Summary
-
Fields inherited from class org.hl7.fhir.r5.context.BaseWorkerContext
binaries, clock, expParameters, logger, name, noTerminologyServer, oidCache, transforms, tsServer, txCache, txClient, txLog, userAgent, validationCache, version
-
-
Constructor Summary
Constructors Constructor Description SimpleWorkerContext()SimpleWorkerContext(Locale locale)SimpleWorkerContext(SimpleWorkerContext other)SimpleWorkerContext(SimpleWorkerContext other, Locale locale)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<StructureDefinition>allStructures()voidcachePackage(IWorkerContext.PackageDetails packageDetails, List<IWorkerContext.PackageVersion> dependencies)Inform the cache about package dependencies.voidcachePackage(IWorkerContext.PackageVersion packageDetails, List<IWorkerContext.PackageVersion> dependencies)StringconnectToTSServer(TerminologyClient client, String log)protected voidcopy(SimpleWorkerContext other)static String[]defaultTypesToLoad()StructureDefinitionfetchRawProfile(String uri)<T extends Resource>
TfetchResource(Class<T> class_, String uri)Find an identified resource.List<StructureMap>findTransformsforSource(String url)static SimpleWorkerContextfromClassPath()static SimpleWorkerContextfromClassPath(String name)static SimpleWorkerContextfromClassPath(String name, boolean allowDuplicates)static SimpleWorkerContextfromDefinitions(Map<String,byte[]> source, IWorkerContext.IContextResourceLoader loader, IWorkerContext.PackageVersion pi)static SimpleWorkerContextfromNothing()static SimpleWorkerContextfromPack(String path)Load the working context from the validation packstatic SimpleWorkerContextfromPack(String path, boolean allowDuplicates)static SimpleWorkerContextfromPack(String path, IWorkerContext.IContextResourceLoader loader)static SimpleWorkerContextfromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi)static SimpleWorkerContextfromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, boolean allowDuplicates)static SimpleWorkerContextfromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader)voidgenerateSnapshot(StructureDefinition p)Given a structure definition, generate a snapshot (or regenerate it)voidgenerateSnapshot(StructureDefinition p, boolean logical)StringgetAbbreviation(String name)returns the recommended tla for the type (from the structure definitions)StringgetLinkFor(String corePath, String typeSimple)StringgetLinkForProfile(StructureDefinition profile, String url)List<String>getLoadedPackages()IWorkerContext.PackageDetailsgetPackage(IWorkerContext.PackageVersion pack)IParsergetParser(String type)Get a parser to read/write instances.IParsergetParser(ParserType type)Get a parser to read/write instances.QuestionnairegetQuestionnaire()List<String>getResourceNames()List<String>getTypeNames()SimpleWorkerContext.IValidatorFactorygetValidatorFactory()StringgetVersion()Get the versions of the definitions loaded in contextXVerExtensionManagergetXVer()booleanhasCache()booleanhasLinkFor(String typeSimple)booleanhasPackage(String idAndver)booleanhasPackage(String id, String ver)booleanhasPackage(IWorkerContext.PackageVersion pack)booleanisCanNoTS()booleanisDatatype(String typeSimple)booleanisIgnoreProfileErrors()booleanisProgress()booleanisResource(String t)StringlistMapUrls()voidloadBinariesFromFolder(String folder)voidloadBinariesFromFolder(org.hl7.fhir.utilities.npm.NpmPackage pi)voidloadFromFile(InputStream stream, String name, IWorkerContext.IContextResourceLoader loader)voidloadFromFile(InputStream stream, String name, IWorkerContext.IContextResourceLoader loader, SimpleWorkerContext.ILoadFilter filter)voidloadFromFile(String file, IWorkerContext.IContextResourceLoader loader)voidloadFromFolder(String folder)intloadFromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader)Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resourceintloadFromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader, String[] types)Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource Deprecated - use the simpler method where the types come from the loader.intloadFromPackageAndDependencies(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader, org.hl7.fhir.utilities.npm.BasePackageCacheManager pcm)Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource This method also loads all the packages that the package depends on (recursively)intloadFromPackageAndDependenciesInt(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader, org.hl7.fhir.utilities.npm.BasePackageCacheManager pcm, String path)intloadFromPackageInt(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader, String... types)IParsernewJsonParser()Get a JSON parserIResourceValidatornewValidator()Get a validator that can check whether a resource is validIParsernewXmlParser()Get an XML parserbooleanprependLinks()ProfileUtilities.ProfileKnowledgeProvider.BindingResolutionresolveBinding(StructureDefinition profile, String url, String path)ProfileUtilities.ProfileKnowledgeProvider.BindingResolutionresolveBinding(StructureDefinition profile, ElementDefinition.ElementDefinitionBindingComponent binding, String path)voidsetCanNoTS(boolean canNoTS)voidsetClock(org.hl7.fhir.utilities.TimeTracker tt)voidsetIgnoreProfileErrors(boolean ignoreProfileErrors)voidsetProgress(boolean progress)voidsetQuestionnaire(Questionnaire questionnaire)voidsetValidatorFactory(SimpleWorkerContext.IValidatorFactory validatorFactory)-
Methods inherited from class org.hl7.fhir.r5.context.BaseWorkerContext
allConformanceResources, allImplementationGuides, cacheResource, cacheResourceFromPackage, cacheVS, clearTS, clearTSCache, clock, copy, countAllCaches, dropResource, dropResource, expandVS, expandVS, expandVS, expandVS, expandVS, fetchCodeSystem, fetchCodeSystem, fetchResource, fetchResource, fetchResourceById, fetchResourceWithException, fetchResourceWithException, fetchResourceWithException, fetchResourceWithException, fetchResourceWithException, fetchTypeDefinition, findMapsForSource, finishLoading, fixOldSD, getBinaries, getCacheId, getClientRetryCount, getCodeSystemsUsed, getExpandCodesLimit, getExpansionParameters, getLinkForUrl, getLocator, getLogger, getName, getOverrideVersionNs, getPackageForUrl, getResourceNamesAsSet, getSearchParameter, getSpecUrl, getStructure, getStructures, getTransform, getTxCache, getTxCaps, getTxClient, getUcumService, getUserAgent, hasResource, hasResource, initTS, isAllowLoadingDuplicates, isCanRunWithoutTerminology, isNoTerminologyServer, isTlogging, listMaps, listStructures, listSupportedSystems, listTransforms, oid2Uri, processValidationResult, registerResourceFromPackage, reportStatus, seeMetadataResource, setAllowLoadingDuplicates, setCacheId, setCanRunWithoutTerminology, setClientRetryCount, setExpandCodesLimit, setExpansionProfile, setLocator, setLogger, setName, setNoTerminologyServer, setOverrideVersionNs, setTlogging, setTranslator, setTxCaps, setUcumService, setUserAgent, supportsSystem, tail, tlog, totalCount, translator, validateCode, validateCode, validateCode, validateCode, validateCode, validateCode, validateCodeBatch
-
Methods inherited from class org.hl7.fhir.utilities.i18n.I18nBase
formatMessage, getLocale, isWarnAboutMissingMessages, setLocale, setValidationMessageLanguage, setWarnAboutMissingMessages
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.r5.context.IWorkerContext
allConformanceResources, cacheResource, cacheResourceFromPackage, clock, expandVS, expandVS, expandVS, expandVS, fetchCodeSystem, fetchCodeSystem, fetchResource, fetchResource, fetchResourceById, fetchResourceWithException, fetchTypeDefinition, findMapsForSource, formatMessage, getBinaries, getClientRetryCount, getCodeSystemsUsed, getExpansionParameters, getLinkForUrl, getLocale, getLogger, getOverrideVersionNs, getPackageForUrl, getResourceNamesAsSet, getSpecUrl, getStructures, getTransform, getUcumService, hasResource, isNoTerminologyServer, listTransforms, oid2Uri, setClientRetryCount, setExpansionProfile, setLocale, setLogger, setOverrideVersionNs, setUcumService, setValidationMessageLanguage, supportsSystem, translator, validateCode, validateCode, validateCode, validateCode, validateCode, validateCode, validateCodeBatch
-
Methods inherited from interface org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider
getLinkForUrl
-
-
-
-
Constructor Detail
-
SimpleWorkerContext
public SimpleWorkerContext() throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
SimpleWorkerContext
public SimpleWorkerContext(Locale locale) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
SimpleWorkerContext
public SimpleWorkerContext(SimpleWorkerContext other) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
SimpleWorkerContext
public SimpleWorkerContext(SimpleWorkerContext other, Locale locale) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
-
Method Detail
-
copy
protected void copy(SimpleWorkerContext other)
-
getLoadedPackages
public List<String> getLoadedPackages()
-
fromPack
public static SimpleWorkerContext fromPack(String path) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
Load the working context from the validation pack- Parameters:
path- filename of the validation pack- Returns:
- Throws:
IOExceptionFileNotFoundExceptionorg.hl7.fhir.exceptions.FHIRExceptionException
-
fromPackage
public static SimpleWorkerContext fromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, boolean allowDuplicates) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
fromPackage
public static SimpleWorkerContext fromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
fromPackage
public static SimpleWorkerContext fromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
fromPack
public static SimpleWorkerContext fromPack(String path, boolean allowDuplicates) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
fromPack
public static SimpleWorkerContext fromPack(String path, IWorkerContext.IContextResourceLoader loader) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
fromClassPath
public static SimpleWorkerContext fromClassPath() throws IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException
-
fromClassPath
public static SimpleWorkerContext fromClassPath(String name) throws IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException
-
fromClassPath
public static SimpleWorkerContext fromClassPath(String name, boolean allowDuplicates) throws IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException
-
fromDefinitions
public static SimpleWorkerContext fromDefinitions(Map<String,byte[]> source, IWorkerContext.IContextResourceLoader loader, IWorkerContext.PackageVersion pi) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
fromNothing
public static SimpleWorkerContext fromNothing() throws FileNotFoundException, org.hl7.fhir.exceptions.FHIRException, IOException
- Throws:
FileNotFoundExceptionorg.hl7.fhir.exceptions.FHIRExceptionIOException
-
connectToTSServer
public String connectToTSServer(TerminologyClient client, String log)
-
loadFromFile
public void loadFromFile(InputStream stream, String name, IWorkerContext.IContextResourceLoader loader) throws IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException
-
loadFromFile
public void loadFromFile(InputStream stream, String name, IWorkerContext.IContextResourceLoader loader, SimpleWorkerContext.ILoadFilter filter) throws IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException
-
loadFromPackage
public int loadFromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
Description copied from interface:IWorkerContextLoad relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource- Specified by:
loadFromPackagein interfaceIWorkerContext- Parameters:
pi- - the package to loadloader- - an implemenation of IContextResourceLoader that knows how to read the resources in the package (e.g. for the appropriate version).- Returns:
- the number of resources loaded
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
defaultTypesToLoad
public static String[] defaultTypesToLoad()
-
loadFromPackage
public int loadFromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader, String[] types) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
Description copied from interface:IWorkerContextLoad relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource Deprecated - use the simpler method where the types come from the loader.- Specified by:
loadFromPackagein interfaceIWorkerContext- Parameters:
pi- - the package to loadloader- - an implemenation of IContextResourceLoader that knows how to read the resources in the package (e.g. for the appropriate version).types- - which types of resources to load- Returns:
- the number of resources loaded
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
loadFromPackageAndDependencies
public int loadFromPackageAndDependencies(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader, org.hl7.fhir.utilities.npm.BasePackageCacheManager pcm) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
Description copied from interface:IWorkerContextLoad relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource This method also loads all the packages that the package depends on (recursively)- Specified by:
loadFromPackageAndDependenciesin interfaceIWorkerContext- Parameters:
pi- - the package to loadloader- - an implemenation of IContextResourceLoader that knows how to read the resources in the package (e.g. for the appropriate version).pcm- - used to find and load additional dependencies- Returns:
- the number of resources loaded
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
loadFromPackageAndDependenciesInt
public int loadFromPackageAndDependenciesInt(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader, org.hl7.fhir.utilities.npm.BasePackageCacheManager pcm, String path) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
loadFromPackageInt
public int loadFromPackageInt(org.hl7.fhir.utilities.npm.NpmPackage pi, IWorkerContext.IContextResourceLoader loader, String... types) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-
loadFromFile
public void loadFromFile(String file, IWorkerContext.IContextResourceLoader loader) throws IOException, org.hl7.fhir.exceptions.FHIRException
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRException
-
getParser
public IParser getParser(ParserType type)
Description copied from interface:IWorkerContextGet a parser to read/write instances. Use the defined type (will be extended as further types are added, though the only currently anticipate type is RDF) XML/JSON - the standard renderers XHTML - render the narrative only (generate it if necessary)- Specified by:
getParserin interfaceIWorkerContext- Returns:
-
getParser
public IParser getParser(String type)
Description copied from interface:IWorkerContextGet a parser to read/write instances. Determine the type from the stated type. Supported value for type: - the recommended MIME types - variants of application/xml and application/json - _format values xml, json- Specified by:
getParserin interfaceIWorkerContext- Returns:
-
newJsonParser
public IParser newJsonParser()
Description copied from interface:IWorkerContextGet a JSON parser- Specified by:
newJsonParserin interfaceIWorkerContext- Returns:
-
newXmlParser
public IParser newXmlParser()
Description copied from interface:IWorkerContextGet an XML parser- Specified by:
newXmlParserin interfaceIWorkerContext- Returns:
-
newValidator
public IResourceValidator newValidator() throws org.hl7.fhir.exceptions.FHIRException
Description copied from interface:IWorkerContextGet a validator that can check whether a resource is valid- Specified by:
newValidatorin interfaceIWorkerContext- Returns:
- a prepared generator
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getResourceNames
public List<String> getResourceNames()
- Specified by:
getResourceNamesin interfaceIWorkerContext- Returns:
- a list of the resource names defined for this version
-
getTypeNames
public List<String> getTypeNames()
- Specified by:
getTypeNamesin interfaceIWorkerContext- Returns:
- a list of the resource and type names defined for this version
-
getAbbreviation
public String getAbbreviation(String name)
Description copied from interface:IWorkerContextreturns the recommended tla for the type (from the structure definitions)- Specified by:
getAbbreviationin interfaceIWorkerContext- Returns:
-
isDatatype
public boolean isDatatype(String typeSimple)
- Specified by:
isDatatypein interfaceProfileUtilities.ProfileKnowledgeProvider
-
isResource
public boolean isResource(String t)
- Specified by:
isResourcein interfaceProfileUtilities.ProfileKnowledgeProvider
-
hasLinkFor
public boolean hasLinkFor(String typeSimple)
- Specified by:
hasLinkForin interfaceProfileUtilities.ProfileKnowledgeProvider
-
getLinkFor
public String getLinkFor(String corePath, String typeSimple)
- Specified by:
getLinkForin interfaceProfileUtilities.ProfileKnowledgeProvider
-
resolveBinding
public ProfileUtilities.ProfileKnowledgeProvider.BindingResolution resolveBinding(StructureDefinition profile, ElementDefinition.ElementDefinitionBindingComponent binding, String path)
- Specified by:
resolveBindingin interfaceProfileUtilities.ProfileKnowledgeProvider
-
resolveBinding
public ProfileUtilities.ProfileKnowledgeProvider.BindingResolution resolveBinding(StructureDefinition profile, String url, String path)
- Specified by:
resolveBindingin interfaceProfileUtilities.ProfileKnowledgeProvider
-
getLinkForProfile
public String getLinkForProfile(StructureDefinition profile, String url)
- Specified by:
getLinkForProfilein interfaceProfileUtilities.ProfileKnowledgeProvider
-
getQuestionnaire
public Questionnaire getQuestionnaire()
-
setQuestionnaire
public void setQuestionnaire(Questionnaire questionnaire)
-
allStructures
public List<StructureDefinition> allStructures()
- Specified by:
allStructuresin interfaceIWorkerContext- Returns:
- a list of all structure definitions, with snapshots generated (if possible)
-
loadBinariesFromFolder
public void loadBinariesFromFolder(String folder) throws FileNotFoundException, Exception
- Throws:
FileNotFoundExceptionException
-
loadBinariesFromFolder
public void loadBinariesFromFolder(org.hl7.fhir.utilities.npm.NpmPackage pi) throws FileNotFoundException, Exception
- Throws:
FileNotFoundExceptionException
-
loadFromFolder
public void loadFromFolder(String folder) throws FileNotFoundException, Exception
- Throws:
FileNotFoundExceptionException
-
prependLinks
public boolean prependLinks()
- Specified by:
prependLinksin interfaceProfileUtilities.ProfileKnowledgeProvider
-
hasCache
public boolean hasCache()
- Specified by:
hasCachein interfaceIWorkerContext- Returns:
- true if the contxt has a terminology caching service internally
-
getVersion
public String getVersion()
Description copied from interface:IWorkerContextGet the versions of the definitions loaded in context- Specified by:
getVersionin interfaceIWorkerContext- Returns:
-
findTransformsforSource
public List<StructureMap> findTransformsforSource(String url)
-
getValidatorFactory
public SimpleWorkerContext.IValidatorFactory getValidatorFactory()
-
setValidatorFactory
public void setValidatorFactory(SimpleWorkerContext.IValidatorFactory validatorFactory)
-
fetchResource
public <T extends Resource> T fetchResource(Class<T> class_, String uri)
Description copied from interface:IWorkerContextFind an identified resource. The most common use of this is to access the the standard conformance resources that are part of the standard - structure definitions, value sets, concept maps, etc. Also, the narrative generator uses this, and may access any kind of resource The URI is called speculatively for things that might exist, so not finding a matching resouce, return null, not an error The URI can have one of 3 formats: - a full URL e.g. http://acme.org/fhir/ValueSet/[id] - a relative URL e.g. ValueSet/[id] - a logical id e.g. [id] It's an error if the second form doesn't agree with class_. It's an error if class_ is null for the last form- Specified by:
fetchResourcein interfaceIWorkerContext- Overrides:
fetchResourcein classBaseWorkerContext- Returns:
-
fetchRawProfile
public StructureDefinition fetchRawProfile(String uri)
- Specified by:
fetchRawProfilein interfaceIWorkerContext
-
generateSnapshot
public void generateSnapshot(StructureDefinition p) throws org.hl7.fhir.exceptions.DefinitionException, org.hl7.fhir.exceptions.FHIRException
Description copied from interface:IWorkerContextGiven a structure definition, generate a snapshot (or regenerate it)- Specified by:
generateSnapshotin interfaceIWorkerContext- Throws:
org.hl7.fhir.exceptions.DefinitionExceptionorg.hl7.fhir.exceptions.FHIRException
-
generateSnapshot
public void generateSnapshot(StructureDefinition p, boolean logical) throws org.hl7.fhir.exceptions.DefinitionException, org.hl7.fhir.exceptions.FHIRException
- Specified by:
generateSnapshotin interfaceIWorkerContext- Throws:
org.hl7.fhir.exceptions.DefinitionExceptionorg.hl7.fhir.exceptions.FHIRException
-
isIgnoreProfileErrors
public boolean isIgnoreProfileErrors()
-
setIgnoreProfileErrors
public void setIgnoreProfileErrors(boolean ignoreProfileErrors)
-
listMapUrls
public String listMapUrls()
-
isProgress
public boolean isProgress()
-
setProgress
public void setProgress(boolean progress)
-
setClock
public void setClock(org.hl7.fhir.utilities.TimeTracker tt)
-
isCanNoTS
public boolean isCanNoTS()
-
setCanNoTS
public void setCanNoTS(boolean canNoTS)
-
getXVer
public XVerExtensionManager getXVer()
-
cachePackage
public void cachePackage(IWorkerContext.PackageVersion packageDetails, List<IWorkerContext.PackageVersion> dependencies)
-
hasPackage
public boolean hasPackage(String id, String ver)
- Specified by:
hasPackagein interfaceIWorkerContext
-
hasPackage
public boolean hasPackage(String idAndver)
-
cachePackage
public void cachePackage(IWorkerContext.PackageDetails packageDetails, List<IWorkerContext.PackageVersion> dependencies)
Description copied from interface:IWorkerContextInform the cache about package dependencies. This can be used to help resolve references Note that the cache doesn't load dependencies- Specified by:
cachePackagein interfaceIWorkerContext
-
hasPackage
public boolean hasPackage(IWorkerContext.PackageVersion pack)
- Specified by:
hasPackagein interfaceIWorkerContext
-
getPackage
public IWorkerContext.PackageDetails getPackage(IWorkerContext.PackageVersion pack)
- Specified by:
getPackagein interfaceIWorkerContext
-
-