Package org.eclipse.rdf4j.query.algebra.evaluation.impl.evaluationsteps

## Class StatementPatternQueryEvaluationStep

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.evaluation.impl.evaluationsteps.StatementPatternQueryEvaluationStep

- All Implemented Interfaces:
    `QueryEvaluationStep`

      public class StatementPatternQueryEvaluationStep
      extends Object
      implements QueryEvaluationStep

  Evaluate the StatementPattern - taking care of graph/datasets - avoiding redoing work every call of evaluate if possible.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.rdf4j.query.algebra.evaluation.QueryEvaluationStep

      `QueryEvaluationStep.DelayedEvaluationIteration`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StatementPatternQueryEvaluationStep​(StatementPattern statementPattern, QueryEvaluationContext context, TripleSource tripleSource)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CloseableIteration<BindingSet,​QueryEvaluationException>` | `evaluate​(BindingSet bindings)` |
    `protected static Function<Value,​Resource[]>` | `extractContextsFromDatasets​(Var contextVar, boolean emptyGraph, Set<IRI> graphs)` |
    `protected static Predicate<Statement>` | `filterContextOrEqualVariables​(StatementPattern statementPattern, Value subjValue, Value predValue, Value objValue, Resource[] contexts)` | Generate a predicate that tests for Named contexts are matched by retrieving all statements from the store and filtering out the statements that do not have a context.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StatementPatternQueryEvaluationStep

          public StatementPatternQueryEvaluationStep​(StatementPattern statementPattern,
                                                     QueryEvaluationContext context,
                                                     TripleSource tripleSource)

  - ### Method Detail

    - #### evaluate

          public CloseableIteration<BindingSet,​QueryEvaluationException> evaluate​(BindingSet bindings)

      Specified by:
        `evaluate` in interface `QueryEvaluationStep`

    - #### filterContextOrEqualVariables

          protected static Predicate<Statement> filterContextOrEqualVariables​(StatementPattern statementPattern,
                                                                              Value subjValue,
                                                                              Value predValue,
                                                                              Value objValue,
                                                                              Resource[] contexts)

      Generate a predicate that tests for Named contexts are matched by retrieving all statements from the store and filtering out the statements that do not have a context. Or the same variable might have been used multiple times in this StatementPattern, verify value equality in those cases.

    - #### extractContextsFromDatasets

          protected static Function<Value,​Resource[]> extractContextsFromDatasets​(Var contextVar,
                                                                                        boolean emptyGraph,
                                                                                        Set<IRI> graphs)

      Parameters:
        `statementPattern` -
        `contextValue` -
      Returns:
        the contexts that are valid for this statement pattern or null