java.lang.Object
org.apache.jena.sparql.expr.ExprNode
org.apache.jena.sparql.expr.ExprVar
- All Implemented Interfaces:
Expr
An expression that is a variable in an expression.
-
Field Summary
Fields inherited from interface org.apache.jena.sparql.expr.Expr
CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL, NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ExprTransform transform) applyNodeTransform(NodeTransform transform) Rewrite, applying a node->node transformationasVar()Convert to a Var variable.copySubstitute(Binding binding) Deep copy with substitutionbooleanGeneral equality operation - consider this to be 'protected'eval(Binding binding, FunctionEnv env) Evaluate this expression against the bindingvoidorg.apache.jena.graph.NodeVariable (or null)Variable name (returns null if not a variable)Variables used by this expression.inthashCode()Exprare used in both syntax and algebra.booleanAnswer whether this is a variable.toString()voidvisit(ExprVisitor visitor) Methods inherited from class org.apache.jena.sparql.expr.ExprNode
deepCopy, equals, equalsBySyntax, getConstant, getExpr, getFunction, getGraphPattern, isConstant, isExpr, isFunction, isGraphPattern, isSatisfied
-
Constructor Details
-
ExprVar
-
ExprVar
public ExprVar(org.apache.jena.graph.Node n) -
ExprVar
-
-
Method Details
-
getVarsMentioned
Description copied from interface:ExprVariables used by this expression.- Specified by:
getVarsMentionedin interfaceExpr- Overrides:
getVarsMentionedin classExprNode- See Also:
-
eval
Description copied from interface:ExprEvaluate this expression against the binding -
copySubstitute
Description copied from interface:ExprDeep copy with substitution- Specified by:
copySubstitutein interfaceExpr- Specified by:
copySubstitutein classExprNode
-
applyNodeTransform
Description copied from interface:ExprRewrite, applying a node->node transformation- Specified by:
applyNodeTransformin interfaceExpr- Specified by:
applyNodeTransformin classExprNode
-
copy
-
visit
-
apply
-
format
-
hashCode
public 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
Description copied from interface:ExprGeneral equality operation - consider this to be 'protected' -
isVariable
public boolean isVariable()Description copied from interface:ExprAnswer whether this is a variable.- Specified by:
isVariablein interfaceExpr- Overrides:
isVariablein classExprNode
-
getVarName
Description copied from interface:ExprVariable name (returns null if not a variable)- Specified by:
getVarNamein interfaceExpr- Overrides:
getVarNamein classExprNode- Returns:
- Returns the name.
-
getExprVar
Description copied from interface:ExprVariable (or null)- Specified by:
getExprVarin interfaceExpr- Overrides:
getExprVarin classExprNode
-
asVar
Description copied from interface:ExprConvert to a Var variable. -
getAsNode
public org.apache.jena.graph.Node getAsNode() -
toPrefixString
-
asSparqlExpr
-
toString
-