org.eclipse.rdf4j.federated.optimizer

## Class GenericInfoOptimizer

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

- All Implemented Interfaces:
    FedXOptimizer, QueryModelVisitor<OptimizationException>

      public class GenericInfoOptimizer
      extends AbstractQueryModelVisitor<OptimizationException>
      implements FedXOptimizer

  Generic optimizer Tasks: - Collect information (hasUnion, hasFilter, hasService) - Collect all statements in a list (for source selection), do not collect SERVICE expressions - Collect all Join arguments and group them in the NJoin structure for easier optimization (flatten)
  Author:
    Andreas Schwarte

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `hasFilter`
    `protected boolean` | `hasUnion`
    `protected long` | `limit`
    `protected QueryInfo` | `queryInfo`
    `protected List<Service>` | `services`
    `protected List<StatementPattern>` | `stmts`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GenericInfoOptimizer(QueryInfo queryInfo)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getLimit()`
    `List<Service>` | `getServices()`
    `List<StatementPattern>` | `getStatements()`
    `boolean` | `hasFilter()`
    `boolean` | `hasLimit()`
    `boolean` | `hasService()`
    `boolean` | `hasUnion()`
    `void` | `meet(Filter filter)`
    `void` | `meet(Join node)`
    `void` | `meet(LeftJoin node)`
    `void` | `meet(Projection node)`
    `void` | `meet(Service service)`
    `void` | `meet(Slice node)`
    `void` | `meet(StatementPattern node)`
    `void` | `meet(Union union)`
    `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, 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`

- - ### Field Detail

    - #### hasFilter

          protected boolean hasFilter

    - #### hasUnion

          protected boolean hasUnion

    - #### services

          protected List<Service> services

    - #### limit

          protected long limit

    - #### stmts

          protected List<StatementPattern> stmts

    - #### queryInfo

          protected final QueryInfo queryInfo

  - ### Constructor Detail

    - #### GenericInfoOptimizer

          public GenericInfoOptimizer(QueryInfo queryInfo)

  - ### Method Detail

    - #### hasFilter

          public boolean hasFilter()

    - #### hasUnion

          public boolean hasUnion()

    - #### getStatements

          public List<StatementPattern> getStatements()

    - #### hasLimit

          public boolean hasLimit()

    - #### getLimit

          public long getLimit()

    - #### 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(Union union)

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

    - #### meet

          public void meet(Filter filter)

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

    - #### meet

          public void meet(Service service)

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

    - #### meet

          public void meet(Join node)

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

    - #### meet

          public void meet(LeftJoin node)
                    throws OptimizationException

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

    - #### meet

          public void meet(StatementPattern node)

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

    - #### meet

          public void meet(Projection node)
                    throws OptimizationException

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

    - #### meet

          public void meet(Slice node)
                    throws OptimizationException

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

    - #### hasService

          public boolean hasService()

    - #### getServices

          public List<Service> getServices()

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