java.lang.Object
org.apache.jena.sparql.expr.ExprNode
org.apache.jena.sparql.expr.ExprFunction
org.apache.jena.sparql.expr.ExprFunction2
- All Implemented Interfaces:
Expr
- Direct Known Subclasses:
E_Add
,E_Cast
,E_Divide
,E_Equals
,E_GreaterThan
,E_GreaterThanOrEqual
,E_IRI2
,E_LangMatches
,E_LessThan
,E_LessThanOrEqual
,E_LogicalAnd
,E_LogicalOr
,E_Multiply
,E_NotEquals
,E_OpNumericIntegerDivide
,E_OpNumericMod
,E_SameTerm
,E_StrAfter
,E_StrBefore
,E_StrContains
,E_StrDatatype
,E_StrEndsWith
,E_StrLang
,E_StrStartsWith
,E_Subtract
A function of two arguments
-
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 TypeMethodDescriptionapply
(ExprTransform transform, Expr arg1, Expr arg2) final Expr
applyNodeTransform
(NodeTransform transform) Rewrite, applying a node->node transformationabstract Expr
final Expr
copySubstitute
(Binding binding) Deep copy with substitutionfinal NodeValue
eval
(Binding binding, FunctionEnv env) Evaluate this expression against the bindingabstract NodeValue
eval
(NodeValue x, NodeValue y, FunctionEnv env) getArg
(int i) getArg1()
getArg2()
int
hashCode()
Expr
are used in both syntax and algebra.int
numArgs()
void
visit
(ExprVisitor visitor) Methods inherited from class org.apache.jena.sparql.expr.ExprFunction
equals, getArgs, getFunction, getFunctionIRI, getFunctionName, getFunctionPrintName, getFunctionSymbol, getOpName, isFunction
Methods inherited from class org.apache.jena.sparql.expr.ExprNode
asVar, deepCopy, equals, equalsBySyntax, getConstant, getExpr, getExprVar, getGraphPattern, getVarName, getVarsMentioned, isConstant, isExpr, isGraphPattern, isSatisfied, isVariable, toString
-
Method Details
-
getArg1
-
getArg2
-
getArg
- Specified by:
getArg
in classExprFunction
-
numArgs
public int numArgs()- Specified by:
numArgs
in classExprFunction
-
hashCode
public int hashCode()Description copied from interface:Expr
Expr
are 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 EXISTS
andEXISTS
expressions which involve a query pattern. As a result there are different ways in syntax to produce the same algebra form.Two
Expr
are considered equal if they are equal as algebra expressions.hashCode
andequals
must 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,equalsBySyntax
impliesequals
(by algebra).Hence, different
hashCode
=> notequalsBySyntax
.- Specified by:
hashCode
in interfaceExpr
- Overrides:
hashCode
in classExprFunction
-
eval
Description copied from interface:Expr
Evaluate this expression against the binding -
eval
-
eval
-
copySubstitute
Description copied from interface:Expr
Deep copy with substitution- Specified by:
copySubstitute
in interfaceExpr
- Specified by:
copySubstitute
in classExprNode
-
applyNodeTransform
Description copied from interface:Expr
Rewrite, applying a node->node transformation- Specified by:
applyNodeTransform
in interfaceExpr
- Specified by:
applyNodeTransform
in classExprNode
-
copy
-
visit
-
apply
-