Package org.apache.jena.sparql.expr
Class ExprVar
- java.lang.Object
-
- org.apache.jena.sparql.expr.ExprNode
-
- org.apache.jena.sparql.expr.ExprVar
-
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Exprapply(ExprTransform transform)ExprapplyNodeTransform(NodeTransform transform)Rewrite, applying a node->node transformationjava.lang.StringasSparqlExpr()VarasVar()Convert to a Var variable.Exprcopy(Var v)ExprcopySubstitute(Binding binding)Deep copy with substitutionbooleanequals(Expr other, boolean bySyntax)General equality operation - consider this to be 'protected'NodeValueeval(Binding binding, FunctionEnv env)Evaluate this expression against the bindingvoidformat(Query query, org.apache.jena.atlas.io.IndentedWriter out)NodegetAsNode()ExprVargetExprVar()Variable (or null)java.lang.StringgetVarName()Variable name (returns null if not a variable)inthashCode()Exprare used in both syntax and algebra.booleanisVariable()Answer whether this is a variable.java.lang.StringtoPrefixString()java.lang.StringtoString()voidvisit(ExprVisitor visitor)-
Methods inherited from class org.apache.jena.sparql.expr.ExprNode
deepCopy, equals, equalsBySyntax, getConstant, getExpr, getFunction, getGraphPattern, getVarsMentioned, isConstant, isExpr, isFunction, isGraphPattern, isSatisfied
-
-
-
-
Method Detail
-
eval
public NodeValue eval(Binding binding, FunctionEnv env)
Description copied from interface:ExprEvaluate this expression against the binding
-
copySubstitute
public Expr copySubstitute(Binding binding)
Description copied from interface:ExprDeep copy with substitution- Specified by:
copySubstitutein interfaceExpr- Specified by:
copySubstitutein classExprNode
-
applyNodeTransform
public Expr applyNodeTransform(NodeTransform transform)
Description copied from interface:ExprRewrite, applying a node->node transformation- Specified by:
applyNodeTransformin interfaceExpr- Specified by:
applyNodeTransformin classExprNode
-
visit
public void visit(ExprVisitor visitor)
-
apply
public Expr apply(ExprTransform transform)
-
format
public void format(Query query, org.apache.jena.atlas.io.IndentedWriter out)
-
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 alegbra).Hence, different
hashCode=> notequalsBySyntax.
-
equals
public boolean equals(Expr other, boolean bySyntax)
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
public java.lang.String 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
public ExprVar getExprVar()
Description copied from interface:ExprVariable (or null)- Specified by:
getExprVarin interfaceExpr- Overrides:
getExprVarin classExprNode
-
getAsNode
public Node getAsNode()
-
toPrefixString
public java.lang.String toPrefixString()
-
asSparqlExpr
public java.lang.String asSparqlExpr()
-
-