java.lang.Object
org.apache.jena.sparql.algebra.optimize.Optimize

public class Optimize extends Object
Optimization of algebra expressions.

New optimization processes can be installed via a global change:

    Optimize.setFactory((cxt)->new MyOptimizer(cxt)) ;
or on a per-context basis:
    Optimize.RewriterFactory f = (cxt)->new MyOptimizer(cxt) ;
    context.set(ARQConstants.sysOptimizerFactory, f) ;
  • Field Details

    • noOptimizationFactory

      public static RewriteFactory noOptimizationFactory
      Factory for the "Do nothing" optimizer.
    • minimalOptimizationFactory

      public static RewriteFactory minimalOptimizationFactory
      Factory for the "minimal" optimizer.
    • stdOptimizationFactory

      public static RewriteFactory stdOptimizationFactory
      Factory for the standard optimization sequnece.
  • Constructor Details

    • Optimize

      public Optimize()
  • Method Details

    • optimize

      public static Op optimize(Op op, ExecutionContext execCxt)
    • optimize

      public static Op optimize(Op op, Context context)
      Optimize based on all options
    • noOptimizer

      public static void noOptimizer()
      Set the global optimizer factory to one that does nothing. Applications probably want basicOptimizer()
    • basicOptimizer

      public static void basicOptimizer()
      Set the global optimizer factory to one that only does property functions and scoped variables.
      See Also:
    • setFactory

      public static void setFactory(RewriteFactory aFactory)
      Globally set the factory for making optimizers
    • getFactory

      public static RewriteFactory getFactory()
      Get the global factory for making optimizers
    • apply

      public static Op apply(Transform transform, Op op)
      Apply a Transform to an Op