
Class FFHIRPathHostServices
java.lang.Object
org.hl7.fhir.r5.utils.structuremap.FFHIRPathHostServices
- All Implemented Interfaces:
FHIRPathEngine.IEvaluationContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hl7.fhir.r5.utils.FHIRPathEngine.IEvaluationContext
FHIRPathEngine.IEvaluationContext.FunctionDetails
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckFunction
(Object appContext, String functionName, List<TypeDetails> parameters) Check the function parameters, and throw an error if they are incorrect, or return the type for the functionboolean
conformsToProfile
(Object appContext, Base item, String url) executeFunction
(Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) boolean
when the .log() function is calledresolveConstant
(Object appContext, String name, boolean beforeContext) A constant reference - e.g.resolveConstantType
(Object appContext, String name) resolveFunction
(String functionName) resolveReference
(Object appContext, String url, Base refContext) Implementation of resolve() function.resolveValueSet
(Object appContext, String url)
-
Constructor Details
-
FFHIRPathHostServices
-
-
Method Details
-
resolveConstant
public List<Base> resolveConstant(Object appContext, String name, boolean beforeContext) throws org.hl7.fhir.exceptions.PathEngineException Description copied from interface:FHIRPathEngine.IEvaluationContext
A constant reference - e.g. a reference to a name that must be resolved in context. The % will be removed from the constant name before this is invoked. This will also be called if the host invokes the FluentPath engine with a context of null- Specified by:
resolveConstant
in interfaceFHIRPathEngine.IEvaluationContext
- Parameters:
appContext
- - content passed into the fluent path enginename
- - name reference to resolvebeforeContext
- - whether this is being called before the name is resolved locally, or not- Returns:
- the value of the reference (or null, if it's not valid, though can throw an exception if desired)
- Throws:
org.hl7.fhir.exceptions.PathEngineException
-
resolveConstantType
public TypeDetails resolveConstantType(Object appContext, String name) throws org.hl7.fhir.exceptions.PathEngineException - Specified by:
resolveConstantType
in interfaceFHIRPathEngine.IEvaluationContext
- Throws:
org.hl7.fhir.exceptions.PathEngineException
-
log
Description copied from interface:FHIRPathEngine.IEvaluationContext
when the .log() function is called- Specified by:
log
in interfaceFHIRPathEngine.IEvaluationContext
- Returns:
-
resolveFunction
- Specified by:
resolveFunction
in interfaceFHIRPathEngine.IEvaluationContext
- Returns:
- null if the function is not known
-
checkFunction
public TypeDetails checkFunction(Object appContext, String functionName, List<TypeDetails> parameters) throws org.hl7.fhir.exceptions.PathEngineException Description copied from interface:FHIRPathEngine.IEvaluationContext
Check the function parameters, and throw an error if they are incorrect, or return the type for the function- Specified by:
checkFunction
in interfaceFHIRPathEngine.IEvaluationContext
- Returns:
- Throws:
org.hl7.fhir.exceptions.PathEngineException
-
executeFunction
public List<Base> executeFunction(Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) - Specified by:
executeFunction
in interfaceFHIRPathEngine.IEvaluationContext
- Returns:
-
resolveReference
public Base resolveReference(Object appContext, String url, Base refContext) throws org.hl7.fhir.exceptions.FHIRException Description copied from interface:FHIRPathEngine.IEvaluationContext
Implementation of resolve() function. Passed a string, return matching resource, if one is known - else null- Specified by:
resolveReference
in interfaceFHIRPathEngine.IEvaluationContext
url
- the reference (Reference.reference or the value of the canonical- Returns:
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
conformsToProfile
public boolean conformsToProfile(Object appContext, Base item, String url) throws org.hl7.fhir.exceptions.FHIRException - Specified by:
conformsToProfile
in interfaceFHIRPathEngine.IEvaluationContext
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
resolveValueSet
- Specified by:
resolveValueSet
in interfaceFHIRPathEngine.IEvaluationContext
-