com.hp.hpl.jena.sparql.expr
Interface Expr

All Known Implementing Classes:
E_Add, E_BNode, E_Bound, E_Call, E_Cast, E_Coalesce, E_Conditional, E_Datatype, E_DateTimeDay, E_DateTimeHours, E_DateTimeMinutes, E_DateTimeMonth, E_DateTimeSeconds, E_DateTimeTimezone, E_DateTimeTZ, E_DateTimeYear, E_Divide, E_Equals, E_Exists, E_Function, E_FunctionDynamic, E_GreaterThan, E_GreaterThanOrEqual, E_IRI, E_IsBlank, E_IsIRI, E_IsLiteral, E_IsNumeric, E_IsURI, E_Lang, E_LangMatches, E_LessThan, E_LessThanOrEqual, E_LogicalAnd, E_LogicalNot, E_LogicalOr, E_MD5, E_Multiply, E_NotEquals, E_NotExists, E_NotOneOf, E_Now, E_NumAbs, E_NumCeiling, E_NumFloor, E_NumRound, E_OneOf, E_OneOfBase, E_Random, E_Regex, E_SameTerm, E_Scalar, E_SHA1, E_SHA224, E_SHA256, E_SHA384, E_SHA512, E_Str, E_StrAfter, E_StrBefore, E_StrConcat, E_StrContains, E_StrDatatype, E_StrEncodeForURI, E_StrEndsWith, E_StrLang, E_StrLength, E_StrLowerCase, E_StrReplace, E_StrStartsWith, E_StrSubstring, E_StrUpperCase, E_Subtract, E_UnaryMinus, E_UnaryPlus, E_URI, E_UUID, E_Version, ExprAggregator, ExprDigest, ExprFunction, ExprFunction0, ExprFunction1, ExprFunction2, ExprFunction3, ExprFunctionN, ExprFunctionOp, ExprNode, ExprSystem, ExprVar, NodeValue, NodeValueBoolean, NodeValueDate, NodeValueDateTime, NodeValueDecimal, NodeValueDouble, NodeValueDuration, NodeValueFloat, NodeValueGDay, NodeValueGMonth, NodeValueGMonthDay, NodeValueGYear, NodeValueGYearMonth, NodeValueInteger, NodeValueNode, NodeValueString, NodeValueTime

public interface Expr


Field Summary
static int CMP_EQUAL
           
static int CMP_GREATER
           
static int CMP_INDETERMINATE
           
static int CMP_LESS
           
static int CMP_UNEQUAL
           
 
Method Summary
 Expr applyNodeTransform(NodeTransform transform)
          Rewrite, applying a node->node transformation
 Var asVar()
          Convert to a Var variable.
 Expr copySubstitute(Binding binding)
          Deep copy with substitution
 Expr copySubstitute(Binding binding, boolean foldConstants)
           
 Expr deepCopy()
          Deep copy
 NodeValue eval(Binding binding, FunctionEnv env)
          Evaluate this expression against the binding
 NodeValue getConstant()
          NodeValue constant (returns null if not a constant)
 ExprVar getExprVar()
          Variable (or null)
 ExprFunction getFunction()
          Get the function (returns null if not a function)
 String getVarName()
          Variable name (returns null if not a variable)
 Set<Var> getVarsMentioned()
           
 boolean isConstant()
          Answer whether this is a constant expression - false includes "don't know" No constant folding so "false" from an expression that evaluates to a constant
 boolean isFunction()
          Answer wether this is a function.
 boolean isSatisfied(Binding binding, FunctionEnv execCxt)
          Test whether a Constraint is satisfied, given a set of bindings Includes error propagtion and Effective Boolean Value rules.
 boolean isVariable()
          Answer whether this is a variable (in which case getVarName and getNodeVar can be called)
 void varsMentioned(Collection<Var> acc)
           
 void visit(ExprVisitor visitor)
           
 

Field Detail

CMP_GREATER

static final int CMP_GREATER
See Also:
Constant Field Values

CMP_EQUAL

static final int CMP_EQUAL
See Also:
Constant Field Values

CMP_LESS

static final int CMP_LESS
See Also:
Constant Field Values

CMP_UNEQUAL

static final int CMP_UNEQUAL
See Also:
Constant Field Values

CMP_INDETERMINATE

static final int CMP_INDETERMINATE
See Also:
Constant Field Values
Method Detail

isSatisfied

boolean isSatisfied(Binding binding,
                    FunctionEnv execCxt)
Test whether a Constraint is satisfied, given a set of bindings Includes error propagtion and Effective Boolean Value rules.

Parameters:
binding - The bindings
execCxt - FunctionEnv
Returns:
true or false

getVarsMentioned

Set<Var> getVarsMentioned()

varsMentioned

void varsMentioned(Collection<Var> acc)

eval

NodeValue eval(Binding binding,
               FunctionEnv env)
Evaluate this expression against the binding

Parameters:
binding -
env -

copySubstitute

Expr copySubstitute(Binding binding)
Deep copy with substitution


copySubstitute

Expr copySubstitute(Binding binding,
                    boolean foldConstants)

applyNodeTransform

Expr applyNodeTransform(NodeTransform transform)
Rewrite, applying a node->node transformation


deepCopy

Expr deepCopy()
Deep copy


isVariable

boolean isVariable()
Answer whether this is a variable (in which case getVarName and getNodeVar can be called)


getVarName

String getVarName()
Variable name (returns null if not a variable)


getExprVar

ExprVar getExprVar()
Variable (or null)


asVar

Var asVar()
Convert to a Var variable.


isConstant

boolean isConstant()
Answer whether this is a constant expression - false includes "don't know" No constant folding so "false" from an expression that evaluates to a constant


getConstant

NodeValue getConstant()
NodeValue constant (returns null if not a constant)


isFunction

boolean isFunction()
Answer wether this is a function.


getFunction

ExprFunction getFunction()
Get the function (returns null if not a function)


visit

void visit(ExprVisitor visitor)


Licenced under the Apache License, Version 2.0