org.eclipse.rdf4j.query.algebra.evaluation

## Interface EvaluationStrategy

- All Superinterfaces:
    FederatedServiceResolver
  All Known Implementing Classes:
    EvaluationStrategyImpl, ExtendedEvaluationStrategy, FederationStrategy, LimitedSizeEvaluationStrategy, SimpleEvaluationStrategy, StrictEvaluationStrategy, TupleFunctionEvaluationStrategy

      public interface EvaluationStrategy
      extends FederatedServiceResolver

  Evaluates `TupleExpr`s and `ValueExpr`s.
  Author:
    Arjohn Kampman, James Leigh

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `CloseableIteration<BindingSet,QueryEvaluationException>` | `evaluate(Service expr, String serviceUri, CloseableIteration<BindingSet,QueryEvaluationException> bindings)` Evaluates the tuple expression against the supplied triple source with the specified set of variable bindings as input.
    `CloseableIteration<BindingSet,QueryEvaluationException>` | `evaluate(TupleExpr expr, BindingSet bindings)` Evaluates the tuple expression against the supplied triple source with the specified set of variable bindings as input.
    `Value` | `evaluate(ValueExpr expr, BindingSet bindings)` Gets the value of this expression.
    `FederatedService` | `getService(String serviceUrl)` Retrieve the `FederatedService` registered for serviceUrl.
    `boolean` | `isTrue(ValueExpr expr, BindingSet bindings)` Evaluates the boolean expression on the supplied TripleSource object.

- - ### Method Detail

    - #### getService

          FederatedService getService(String serviceUrl)
                               throws QueryEvaluationException

      Retrieve the `FederatedService` registered for serviceUrl. If there is no service registered for serviceUrl, a new `SPARQLFederatedService` is created and registered.
      Specified by:
        `getService` in interface `FederatedServiceResolver`
      Parameters:
        `serviceUrl` - URL of the service.
      Returns:
        the `FederatedService` registered for the serviceUrl.
      Throws:
        `QueryEvaluationException`
      See Also:
        `FederatedServiceResolver.getService(java.lang.String)`

    - #### evaluate

          CloseableIteration<BindingSet,QueryEvaluationException> evaluate(Service expr,
                                                                           String serviceUri,
                                                                           CloseableIteration<BindingSet,QueryEvaluationException> bindings)
                                                                    throws QueryEvaluationException

      Evaluates the tuple expression against the supplied triple source with the specified set of variable bindings as input.
      Parameters:
        `expr` - The Service Expression to evaluate
        `serviceUri` - TODO
        `bindings` - The variables bindings iterator to use for evaluating the expression, if applicable.
      Returns:
        A closeable iterator over all of variable binding sets that match the tuple expression.
      Throws:
        `QueryEvaluationException`

    - #### evaluate

          CloseableIteration<BindingSet,QueryEvaluationException> evaluate(TupleExpr expr,
                                                                           BindingSet bindings)
                                                                    throws QueryEvaluationException

      Evaluates the tuple expression against the supplied triple source with the specified set of variable bindings as input.
      Parameters:
        `expr` - The Tuple Expression to evaluate
        `bindings` - The variables bindings to use for evaluating the expression, if applicable.
      Returns:
        A closeable iterator over the variable binding sets that match the tuple expression.
      Throws:
        `QueryEvaluationException`

    - #### evaluate

          Value evaluate(ValueExpr expr,
                         BindingSet bindings)
                  throws ValueExprEvaluationException,
                         QueryEvaluationException

      Gets the value of this expression.
      Parameters:
        `bindings` - The variables bindings to use for evaluating the expression, if applicable.
      Returns:
        The Value that this expression evaluates to, or `null` if the expression could not be evaluated.
      Throws:
        `ValueExprEvaluationException`
        `QueryEvaluationException`

    - #### isTrue

          boolean isTrue(ValueExpr expr,
                         BindingSet bindings)
                  throws ValueExprEvaluationException,
                         QueryEvaluationException

      Evaluates the boolean expression on the supplied TripleSource object.
      Parameters:
        `bindings` - The variables bindings to use for evaluating the expression, if applicable.
      Returns:
        The result of the evaluation.
      Throws:
        `ValueExprEvaluationException` - If the value expression could not be evaluated, for example when comparing two incompatible operands. When thrown, the result of the boolean expression is neither `true` nor `false` , but unknown.
        `QueryEvaluationException`

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.