org.eclipse.rdf4j.federated.optimizer

## Class FilterOptimizer

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor<OptimizationException>
  - - org.eclipse.rdf4j.federated.optimizer.FilterOptimizer

- All Implemented Interfaces:
    FedXOptimizer, QueryModelVisitor<OptimizationException>

      public class FilterOptimizer
      extends AbstractQueryModelVisitor<OptimizationException>
      implements FedXOptimizer

  Filter optimizer to push down FILTER expressions as far as possible.
  Author:
    Andreas Schwarte

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `FilterOptimizer.FilterBindingFinder`
    `protected static class` | `FilterOptimizer.FilterExprInsertVisitor`
    `protected static class` | `FilterOptimizer.VarFinder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterOptimizer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `getConjunctiveExpressions(ValueExpr expr, List<ValueExpr> conjExpr)` add the conjunctive expressions to specified list, has recursive step.
    `protected boolean` | `isCompatibleExpr(ValueExpr e)` returns true if this filter can be used for optimization.
    `void` | `meet(Filter filter)`
    `void` | `meet(Service node)`
    `void` | `optimize(TupleExpr tupleExpr)` Optimize the provided tuple expression

    - ### Methods inherited from class org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor

      `meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetNode, meetOther, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUpdateExpr`

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

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

- - ### Constructor Detail

    - #### FilterOptimizer

          public FilterOptimizer()

  - ### Method Detail

    - #### optimize

          public void optimize(TupleExpr tupleExpr)

      Description copied from interface: `FedXOptimizer`
      Optimize the provided tuple expression
      Specified by:
        `optimize` in interface `FedXOptimizer`

    - #### meet

          public void meet(Filter filter)

      Specified by:
        `meet` in interface `QueryModelVisitor<OptimizationException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<OptimizationException>`

    - #### meet

          public void meet(Service node)
                    throws OptimizationException

      Specified by:
        `meet` in interface `QueryModelVisitor<OptimizationException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<OptimizationException>`
      Throws:
        `OptimizationException`

    - #### getConjunctiveExpressions

          protected void getConjunctiveExpressions(ValueExpr expr,
                                                   List<ValueExpr> conjExpr)

      add the conjunctive expressions to specified list, has recursive step.
      Parameters:
        `expr` - the expr, in the best case in CNF
        `conjExpr` - the list to which expressions will be added

    - #### isCompatibleExpr

          protected boolean isCompatibleExpr(ValueExpr e)

      returns true if this filter can be used for optimization. Currently no conjunctive or disjunctive expressions are supported.
      Parameters:
        `e` -
      Returns:
        whether the expression is compatible

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