Class ExprEvaluatorPartial

java.lang.Object
org.aksw.jena_sparql_api.views.ExprEvaluatorPartial
All Implemented Interfaces:
ExprEvaluator

public class ExprEvaluatorPartial extends Object implements ExprEvaluator
Evaluator for expressions. Transforms SPARQL expressions so that they can be translated to SQL. Concretely, this class attempts to remove all type constructors from the expressions. If not all of an expressions' variables are bound, it tries to evaluate as much as possible; hence the name "partial" evaluator.
Author:
Claus Stadler <cstadler@informatik.uni-leipzig.de>
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExprEvaluatorPartial(org.apache.jena.sparql.function.FunctionRegistry registry)
    The evaluator must be called AFTER the expression was transformed to be term-ctor free Bullshit below.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.jena.sparql.expr.Expr
    eval(org.apache.jena.sparql.expr.ExprFunction fn, Map<org.apache.jena.sparql.core.Var,org.apache.jena.sparql.expr.Expr> binding)
     
    org.apache.jena.sparql.expr.Expr
    eval(org.apache.jena.sparql.expr.Expr expr, Map<org.apache.jena.sparql.core.Var,org.apache.jena.sparql.expr.Expr> binding)
     
    static boolean
    isConstantArgsOnly(org.apache.jena.sparql.expr.ExprFunction fn)
     
    static boolean
    isConstantsOnly(Iterable<org.apache.jena.sparql.expr.Expr> exprs)
     
    org.apache.jena.sparql.expr.Expr
    transform(org.apache.jena.sparql.expr.Expr expr)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExprEvaluatorPartial

      public ExprEvaluatorPartial(org.apache.jena.sparql.function.FunctionRegistry registry)
      The evaluator must be called AFTER the expression was transformed to be term-ctor free Bullshit below. ---The transformer is called AFTER all of a functions arguments have been evaluated.
  • Method Details

    • isConstantsOnly

      public static boolean isConstantsOnly(Iterable<org.apache.jena.sparql.expr.Expr> exprs)
    • isConstantArgsOnly

      public static boolean isConstantArgsOnly(org.apache.jena.sparql.expr.ExprFunction fn)
    • eval

      public org.apache.jena.sparql.expr.Expr eval(org.apache.jena.sparql.expr.ExprFunction fn, Map<org.apache.jena.sparql.core.Var,org.apache.jena.sparql.expr.Expr> binding)
    • eval

      public org.apache.jena.sparql.expr.Expr eval(org.apache.jena.sparql.expr.Expr expr, Map<org.apache.jena.sparql.core.Var,org.apache.jena.sparql.expr.Expr> binding)
      Specified by:
      eval in interface ExprEvaluator
    • transform

      public org.apache.jena.sparql.expr.Expr transform(org.apache.jena.sparql.expr.Expr expr)
      Specified by:
      transform in interface ExprEvaluator