org.eclipse.rdf4j.federated.algebra

## Interface FilterTuple

- All Known Implementing Classes:
    ExclusiveGroup, ExclusiveStatement, FedXStatementPattern, StatementSourcePattern

      public interface FilterTuple

  Expressions implementing this interface can apply some `FilterValueExpr` during evaluation.
  Author:
    Andreas Schwarte
  See Also:
    `StatementSourcePattern`, `ExclusiveStatement`, `ExclusiveGroup`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBoundFilter(String varName, Value value)` register a filter that can be directly expressed as a binding, e.g.
    `void` | `addFilterExpr(FilterExpr expr)` register a new filter expression.
    `BindingSet` | `getBoundFilters()` Returns bound filter bindings, that need to be added as additional bindings to the final result
    `FilterValueExpr` | `getFilterExpr()`
    `List<String>` | `getFreeVars()`
    `boolean` | `hasFilter()`

- - ### Method Detail

    - #### hasFilter

          boolean hasFilter()

      Returns:
        true if this expression has a filter to apply

    - #### addFilterExpr

          void addFilterExpr(FilterExpr expr)

      register a new filter expression. If the expr has already a filter registered, the new expression is added to a `ConjunctiveFilterExpr`.
      Parameters:
        `expr` -

    - #### addBoundFilter

          void addBoundFilter(String varName,
                              Value value)

      register a filter that can be directly expressed as a binding, e.g. SELECT * WHERE { ?s p o . FILTER (?s = X) } is equivalent to SELECT * WHERE { X p o . }
      Parameters:
        `varName` -
        `value` -

    - #### getFilterExpr

          FilterValueExpr getFilterExpr()

      Returns:
        the currently registered filter expressions, usually of type `FilterExpr` or `ConjunctiveFilterExpr`

    - #### getFreeVars

          List<String> getFreeVars()

      Returns:
        the free variables of this expression

    - #### getBoundFilters

          BindingSet getBoundFilters()

      Returns bound filter bindings, that need to be added as additional bindings to the final result
      Returns:
        the bound filters, or `null`

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