com.hp.hpl.jena.sparql.expr
Class ExprVar

java.lang.Object
  extended by com.hp.hpl.jena.sparql.expr.ExprNode
      extended by com.hp.hpl.jena.sparql.expr.ExprVar
All Implemented Interfaces:
Expr

public class ExprVar
extends ExprNode

An expression that is a variable in an expression.


Field Summary
 
Fields inherited from interface com.hp.hpl.jena.sparql.expr.Expr
CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL
 
Constructor Summary
ExprVar(com.hp.hpl.jena.graph.Node n)
           
ExprVar(String name)
           
ExprVar(Var v)
           
 
Method Summary
 Expr apply(ExprTransform transform)
           
 Expr applyNodeTransform(NodeTransform transform)
          Rewrite, applying a node->node transformation
 String asSparqlExpr()
           
 Var asVar()
          Convert to a Var variable.
 Expr copy(Var v)
           
 Expr copySubstitute(Binding binding, boolean foldConstants)
           
 boolean equals(Object other)
           
 NodeValue eval(Binding binding, FunctionEnv env)
          Evaluate this expression against the binding
 void format(Query query, IndentedWriter out)
           
 com.hp.hpl.jena.graph.Node getAsNode()
           
 ExprVar getExprVar()
          Variable (or null)
 String getVarName()
          Variable name (returns null if not a variable)
 int hashCode()
           
 boolean isVariable()
          Answer whether this is a variable (in which case getVarName and getNodeVar can be called)
 String toPrefixString()
           
 String toString()
           
 void visit(ExprVisitor visitor)
           
 
Methods inherited from class com.hp.hpl.jena.sparql.expr.ExprNode
copySubstitute, deepCopy, getConstant, getExpr, getFunction, getGraphPattern, getVarNamesMentioned, getVarsMentioned, isConstant, isExpr, isFunction, isGraphPattern, isSatisfied, varNamesMentioned, varsMentioned
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExprVar

public ExprVar(String name)

ExprVar

public ExprVar(com.hp.hpl.jena.graph.Node n)

ExprVar

public ExprVar(Var v)
Method Detail

eval

public NodeValue eval(Binding binding,
                      FunctionEnv env)
Description copied from interface: Expr
Evaluate this expression against the binding

Specified by:
eval in interface Expr
Specified by:
eval in class ExprNode

copySubstitute

public Expr copySubstitute(Binding binding,
                           boolean foldConstants)
Specified by:
copySubstitute in interface Expr
Specified by:
copySubstitute in class ExprNode

applyNodeTransform

public Expr applyNodeTransform(NodeTransform transform)
Description copied from interface: Expr
Rewrite, applying a node->node transformation

Specified by:
applyNodeTransform in interface Expr
Specified by:
applyNodeTransform in class ExprNode

copy

public Expr copy(Var v)

visit

public void visit(ExprVisitor visitor)

apply

public Expr apply(ExprTransform transform)

format

public void format(Query query,
                   IndentedWriter out)

hashCode

public int hashCode()
Specified by:
hashCode in class ExprNode

equals

public boolean equals(Object other)
Specified by:
equals in class ExprNode

isVariable

public boolean isVariable()
Description copied from interface: Expr
Answer whether this is a variable (in which case getVarName and getNodeVar can be called)

Specified by:
isVariable in interface Expr
Overrides:
isVariable in class ExprNode

getVarName

public String getVarName()
Description copied from interface: Expr
Variable name (returns null if not a variable)

Specified by:
getVarName in interface Expr
Overrides:
getVarName in class ExprNode
Returns:
Returns the name.

getExprVar

public ExprVar getExprVar()
Description copied from interface: Expr
Variable (or null)

Specified by:
getExprVar in interface Expr
Overrides:
getExprVar in class ExprNode

asVar

public Var asVar()
Description copied from interface: Expr
Convert to a Var variable.

Specified by:
asVar in interface Expr
Overrides:
asVar in class ExprNode

getAsNode

public com.hp.hpl.jena.graph.Node getAsNode()

toPrefixString

public String toPrefixString()

asSparqlExpr

public String asSparqlExpr()

toString

public String toString()
Overrides:
toString in class ExprNode


Licenced under the Apache License, Version 2.0