java.lang.Object
org.apache.jena.sparql.expr.ExprNode
- All Implemented Interfaces:
Expr
- Direct Known Subclasses:
ExprAggregator,ExprFunction,ExprNone,ExprTripleTerm,ExprVar,NodeValue
-
Field Summary
Fields inherited from interface org.apache.jena.sparql.expr.Expr
CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL, NONE -
Method Summary
Modifier and TypeMethodDescriptionabstract ExprapplyNodeTransform(NodeTransform transform) Rewrite, applying a node->node transformationasVar()Convert to a Var variable.abstract ExprcopySubstitute(Binding binding) Deep copy with substitutionfinal ExprdeepCopy()Deep copyfinal booleanabstract booleanGeneral equality operation - consider this to be 'protected'final booleanequalsBySyntax(Expr other) abstract NodeValueeval(Binding binding, FunctionEnv env) Evaluate this expression against the bindingNodeValue constant (returns null if not a constant)final ExprgetExpr()Deprecated, for removal: This API element is subject to removal in a future version.Unnecessary - to be removedVariable (or null)Get the function (returns null if not a function)Variable name (returns null if not a variable)Variables used by this expression.abstract inthashCode()Exprare used in both syntax and algebra.booleanAnswer whether this is a constant expression - false includes "don't know" No constant folding so "false" from an expression that evaluates to a constantbooleanisExpr()Deprecated, for removal: This API element is subject to removal in a future version.Unnecessary - to be removedbooleanAnswer whether this is a function.booleanfinal booleanisSatisfied(Binding binding, FunctionEnv funcEnv) Test whether a constraint is satisfied, given a set of bindings.booleanAnswer whether this is a variable.toString()
-
Method Details
-
isSatisfied
Description copied from interface:ExprTest whether a constraint is satisfied, given a set of bindings. Includes error propagation and Effective Boolean Value rules. This method does not throwExprEvalException. This function supports FILTER. Expression errors cause a result of false.- Specified by:
isSatisfiedin interfaceExpr- Parameters:
binding- The bindingsfuncEnv- FunctionEnv- Returns:
- true or false
-
isExpr
Deprecated, for removal: This API element is subject to removal in a future version.Unnecessary - to be removed -
getExpr
Deprecated, for removal: This API element is subject to removal in a future version.Unnecessary - to be removed -
eval
Description copied from interface:ExprEvaluate this expression against the binding -
getVarsMentioned
Description copied from interface:ExprVariables used by this expression.- Specified by:
getVarsMentionedin interfaceExpr- See Also:
-
hashCode
public abstract int hashCode()Description copied from interface:ExprExprare used in both syntax and algebra. There is no syntax to algebra translation step because the parser uses operator precedence to build the right evaluation structure directly.The exceptions to this are the
NOT EXISTSandEXISTSexpressions which involve a query pattern. As a result there are different ways in syntax to produce the same algebra form.Two
Exprare considered equal if they are equal as algebra expressions.hashCodeandequalsmust implement that.There is also
equalsBySyntax. Because two different syntax forms can yield the same algebra, but two different algebra forms must be different syntax,equalsBySyntaximpliesequals(by algebra).Hence, different
hashCode=> notequalsBySyntax. -
equals
-
equalsBySyntax
- Specified by:
equalsBySyntaxin interfaceExpr
-
equals
Description copied from interface:ExprGeneral equality operation - consider this to be 'protected' -
deepCopy
Description copied from interface:ExprDeep copy -
copySubstitute
Description copied from interface:ExprDeep copy with substitution- Specified by:
copySubstitutein interfaceExpr
-
applyNodeTransform
Description copied from interface:ExprRewrite, applying a node->node transformation- Specified by:
applyNodeTransformin interfaceExpr
-
isVariable
public boolean isVariable()Description copied from interface:ExprAnswer whether this is a variable.- Specified by:
isVariablein interfaceExpr
-
getVarName
Description copied from interface:ExprVariable name (returns null if not a variable)- Specified by:
getVarNamein interfaceExpr
-
getExprVar
Description copied from interface:ExprVariable (or null)- Specified by:
getExprVarin interfaceExpr
-
asVar
Description copied from interface:ExprConvert to a Var variable. -
isConstant
public boolean isConstant()Description copied from interface:ExprAnswer whether this is a constant expression - false includes "don't know" No constant folding so "false" from an expression that evaluates to a constant- Specified by:
isConstantin interfaceExpr
-
getConstant
Description copied from interface:ExprNodeValue constant (returns null if not a constant)- Specified by:
getConstantin interfaceExpr
-
isFunction
public boolean isFunction()Description copied from interface:ExprAnswer whether this is a function.- Specified by:
isFunctionin interfaceExpr
-
getFunction
Description copied from interface:ExprGet the function (returns null if not a function)- Specified by:
getFunctionin interfaceExpr
-
isGraphPattern
public boolean isGraphPattern() -
getGraphPattern
-
toString
-