Class FHIRPathEvaluator


  • public class FHIRPathEvaluator
    extends Object
    A FHIRPath evaluation engine that implements the FHIRPath 2.0.0 specification
    • Method Detail

      • getEvaluationContext

        public FHIRPathEvaluator.EvaluationContext getEvaluationContext()
        Get the EvaluationContext associated with this FHIRPathEvaluator
        Returns:
        get the EvaluationContext associated with this FHIRPathEvaluator
      • evaluate

        public Collection<FHIRPathNode> evaluate​(com.ibm.fhir.model.visitor.Visitable resourceOrElement,
                                                 String expr)
                                          throws FHIRPathException
        Evaluate a FHIRPath expression against a Resource or Element
        Parameters:
        resourceOrElement - the Resource or Element
        expr - the FHIRPath expression to evaluate
        Returns:
        the result of evaluation as a non-null, potentially empty collection of FHIRPath nodes
        Throws:
        NullPointerException - if any of the parameters are null
        FHIRPathException - if an exception occurs during evaluation
      • evaluate

        public Collection<FHIRPathNode> evaluate​(com.ibm.fhir.model.resource.Resource resource,
                                                 String expr)
                                          throws FHIRPathException
        Evaluate a FHIRPath expression against a Resource
        Parameters:
        resource - the resource
        expr - the FHIRPath expression to evaluate
        Returns:
        the result of evaluation as a non-null, potentially empty collection of FHIRPath nodes
        Throws:
        NullPointerException - if any of the parameters are null
        FHIRPathException - if an exception occurs during evaluation
      • evaluate

        public Collection<FHIRPathNode> evaluate​(com.ibm.fhir.model.type.Element element,
                                                 String expr)
                                          throws FHIRPathException
        Evaluate a FHIRPath expression against an Element
        Parameters:
        element - the element
        expr - the FHIRPath expression to evaluate
        Returns:
        the result of evaluation as a non-null, potentially empty collection of FHIRPath nodes
        Throws:
        NullPointerException - if any of the parameters are null
        FHIRPathException - if an exception occurs during evaluation
      • evaluator

        public static FHIRPathEvaluator evaluator()
        Static factory method for creating FHIRPathEvaluator instances
        Returns:
        a new FHIRPathEvaluator instance