com.hp.hpl.jena.sparql.expr
Class ExprLib

java.lang.Object
  extended by com.hp.hpl.jena.sparql.expr.ExprLib

public class ExprLib
extends Object


Constructor Summary
ExprLib()
           
 
Method Summary
static Expr foldConstants(Expr expr)
          Attempt to fold any sub-expressions of the Expr.
static boolean isAssignmentSafeEquality(Expr expr)
          Decide whether an expression is safe for using a a graph substitution.
static boolean isAssignmentSafeEquality(Expr expr, boolean graphHasStringEquality, boolean graphHasNumercialValueEquality)
           
static Expr replaceAggregateByVariable(Expr expr)
          transform an expression that may involve aggregates into one that just uses the variable for the aggregate
static ExprList replaceAggregateByVariable(ExprList exprs)
          transform expressions that may involve aggregates into one that just uses the variable for the aggregate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExprLib

public ExprLib()
Method Detail

foldConstants

public static Expr foldConstants(Expr expr)
Attempt to fold any sub-expressions of the Expr. Return an expression that is euqivalent to the argument but maybe simpler.

Parameters:
expr -
Returns:
Expression

replaceAggregateByVariable

public static Expr replaceAggregateByVariable(Expr expr)
transform an expression that may involve aggregates into one that just uses the variable for the aggregate


replaceAggregateByVariable

public static ExprList replaceAggregateByVariable(ExprList exprs)
transform expressions that may involve aggregates into one that just uses the variable for the aggregate


isAssignmentSafeEquality

public static boolean isAssignmentSafeEquality(Expr expr)
Decide whether an expression is safe for using a a graph substitution. Need to be careful about value-like tests when the graph is not matched in a value fashion.


isAssignmentSafeEquality

public static boolean isAssignmentSafeEquality(Expr expr,
                                               boolean graphHasStringEquality,
                                               boolean graphHasNumercialValueEquality)
Parameters:
graphHasStringEquality - True if the graph triple matching equates xsd:string and plain literal
graphHasNumercialValueEquality - True if the graph triple matching equates numeric values


Licenced under the Apache License, Version 2.0