com.hp.hpl.jena.sparql.lang.rdql
Class Q_StringLangEqual

java.lang.Object
  extended by com.hp.hpl.jena.sparql.lang.rdql.SimpleNode
      extended by com.hp.hpl.jena.sparql.lang.rdql.Q_StringLangEqual
All Implemented Interfaces:
com.hp.hpl.jena.graph.query.Expression, com.hp.hpl.jena.graph.query.Valuator, Expr, ExprBoolean, ExprRDQL, PrintableRDQL, RDQL_Node

public class Q_StringLangEqual
extends SimpleNode
implements ExprRDQL, ExprBoolean


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hp.hpl.jena.graph.query.Expression
com.hp.hpl.jena.graph.query.Expression.Application, com.hp.hpl.jena.graph.query.Expression.Base, com.hp.hpl.jena.graph.query.Expression.BoolConstant, com.hp.hpl.jena.graph.query.Expression.Constant, com.hp.hpl.jena.graph.query.Expression.Fixed, com.hp.hpl.jena.graph.query.Expression.Util, com.hp.hpl.jena.graph.query.Expression.Valof, com.hp.hpl.jena.graph.query.Expression.Variable
 
Field Summary
 
Fields inherited from interface com.hp.hpl.jena.sparql.expr.Expr
CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL
 
Fields inherited from interface com.hp.hpl.jena.graph.query.Expression
FALSE, TRUE
 
Method Summary
 Expr applyNodeTransform(NodeTransform transform)
          Rewrite, applying a node->node transformation
 int argCount()
           
 java.lang.String asInfixString()
           
 java.lang.String asPrefixString()
           
 Var asVar()
          Convert to a Var variable.
 Expr copySubstitute(Binding binding)
          Deep copy with substitution
 Expr copySubstitute(Binding binding, boolean foldConstants)
           
 Expr deepCopy()
          Deep copy
 NodeValue eval(Binding binding, FunctionEnv env)
          Evaluate this expression against the binding
 boolean evalBool(com.hp.hpl.jena.graph.query.IndexValues iv)
          Answer the result of evaluating the constraint expression as a primitive boolean value; implements Expression.evalBool(*).
 RDQL_NodeValue evalNode(Query q, com.hp.hpl.jena.graph.query.IndexValues env)
          Answer the NodeValue result of evaluating the constraints relative to the query and with the specified environment.
 java.lang.Object evalObject(com.hp.hpl.jena.graph.query.IndexValues iv)
          Answer the result of evaluating the constraint expression; implements Expression.evalObject(*).
 RDQL_NodeValue evalRDQL(Query q, com.hp.hpl.jena.graph.query.IndexValues env)
           
 void format(IndentedWriter writer)
           
 void format(Query query, IndentedWriter writer)
           
 com.hp.hpl.jena.graph.query.Expression getArg(int i)
           
 NodeValue getConstant()
          NodeValue constant (returns null if not a constant)
 ExprVar getExprVar()
          Variable (or null)
 java.lang.String getFun()
           
 ExprFunction getFunction()
          Get the function (returns null if not a function)
 java.lang.String getName()
           
 java.lang.Object getValue()
           
 java.lang.String getVarName()
          Variable name (returns null if not a variable)
 java.util.Set<java.lang.String> getVarNamesMentioned()
           
 java.util.Set<Var> getVarsMentioned()
           
 boolean isApply()
           
 boolean isConstant()
          Answer whether this is a constant expression - false includes "don't know" No constant folding so "false" from an expression that evaluates to a constant
 boolean isFunction()
          Answer wether this is a function.
 boolean isSatisfied(Binding binding, FunctionEnv execCxt)
          Test whether a Constraint is satisfied, given a set of bindings Includes error propagtion and Effective Boolean Value rules.
 boolean isSatisfied(com.hp.hpl.jena.graph.query.IndexValues env)
           
 boolean isVariable()
          Answer whether this is a variable (in which case getVarName and getNodeVar can be called)
 void jjtClose()
          This method is called after all the child nodes have been added.
 void postParse2(Query q)
           
 com.hp.hpl.jena.graph.query.Valuator prepare(com.hp.hpl.jena.graph.query.VariableIndexes vi)
           
 java.lang.String toString()
           
 void varNamesMentioned(java.util.Collection<java.lang.String> acc)
           
 void varsMentioned(java.util.Collection<Var> acc)
           
 void visit(ExprVisitor visitor)
           
 
Methods inherited from class com.hp.hpl.jena.sparql.lang.rdql.SimpleNode
dump, jjtAddChild, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, postParse1, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.sparql.expr.Expr
applyNodeTransform, asVar, copySubstitute, copySubstitute, deepCopy, eval, getConstant, getExprVar, getFunction, getVarName, getVarsMentioned, isConstant, isFunction, isSatisfied, isVariable, varsMentioned, visit
 

Method Detail

evalRDQL

public RDQL_NodeValue evalRDQL(Query q,
                               com.hp.hpl.jena.graph.query.IndexValues env)
Specified by:
evalRDQL in interface ExprRDQL

jjtClose

public void jjtClose()
Description copied from interface: RDQL_Node
This method is called after all the child nodes have been added.

Specified by:
jjtClose in interface RDQL_Node
Overrides:
jjtClose in class SimpleNode

isApply

public boolean isApply()
Specified by:
isApply in interface com.hp.hpl.jena.graph.query.Expression

getFun

public java.lang.String getFun()
Specified by:
getFun in interface com.hp.hpl.jena.graph.query.Expression

argCount

public int argCount()
Specified by:
argCount in interface com.hp.hpl.jena.graph.query.Expression

getArg

public com.hp.hpl.jena.graph.query.Expression getArg(int i)
Specified by:
getArg in interface com.hp.hpl.jena.graph.query.Expression

asInfixString

public java.lang.String asInfixString()
Specified by:
asInfixString in interface PrintableRDQL

asPrefixString

public java.lang.String asPrefixString()
Specified by:
asPrefixString in interface PrintableRDQL

toString

public java.lang.String toString()

format

public void format(IndentedWriter writer)
Specified by:
format in interface PrintableRDQL

copySubstitute

public Expr copySubstitute(Binding binding)
Description copied from interface: Expr
Deep copy with substitution

Specified by:
copySubstitute in interface Expr

copySubstitute

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

applyNodeTransform

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

Specified by:
applyNodeTransform in interface Expr

deepCopy

public Expr deepCopy()
Description copied from interface: Expr
Deep copy

Specified by:
deepCopy in interface Expr

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

getConstant

public NodeValue getConstant()
Description copied from interface: Expr
NodeValue constant (returns null if not a constant)

Specified by:
getConstant in interface Expr

getExprVar

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

Specified by:
getExprVar in interface Expr

getVarName

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

Specified by:
getVarName in interface Expr

asVar

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

Specified by:
asVar in interface Expr

visit

public void visit(ExprVisitor visitor)
Specified by:
visit in interface Expr

isSatisfied

public boolean isSatisfied(Binding binding,
                           FunctionEnv execCxt)
Description copied from interface: Expr
Test whether a Constraint is satisfied, given a set of bindings Includes error propagtion and Effective Boolean Value rules.

Specified by:
isSatisfied in interface Expr
Parameters:
binding - The bindings
execCxt - FunctionEnv
Returns:
true or false

isSatisfied

public boolean isSatisfied(com.hp.hpl.jena.graph.query.IndexValues env)

postParse2

public void postParse2(Query q)
Overrides:
postParse2 in class SimpleNode

getVarsMentioned

public java.util.Set<Var> getVarsMentioned()
Specified by:
getVarsMentioned in interface Expr

getVarNamesMentioned

public java.util.Set<java.lang.String> getVarNamesMentioned()

varNamesMentioned

public void varNamesMentioned(java.util.Collection<java.lang.String> acc)

varsMentioned

public void varsMentioned(java.util.Collection<Var> acc)
Specified by:
varsMentioned in interface Expr

prepare

public com.hp.hpl.jena.graph.query.Valuator prepare(com.hp.hpl.jena.graph.query.VariableIndexes vi)
Specified by:
prepare in interface com.hp.hpl.jena.graph.query.Expression

evalObject

public java.lang.Object evalObject(com.hp.hpl.jena.graph.query.IndexValues iv)
Answer the result of evaluating the constraint expression; implements Expression.evalObject(*).

Specified by:
evalObject in interface com.hp.hpl.jena.graph.query.Valuator

evalBool

public boolean evalBool(com.hp.hpl.jena.graph.query.IndexValues iv)
Answer the result of evaluating the constraint expression as a primitive boolean value; implements Expression.evalBool(*).

Specified by:
evalBool in interface com.hp.hpl.jena.graph.query.Valuator

evalNode

public RDQL_NodeValue evalNode(Query q,
                               com.hp.hpl.jena.graph.query.IndexValues env)
Answer the NodeValue result of evaluating the constraints relative to the query and with the specified environment. Traps and handles exceptions. This code used to be in isSatisfied() until Expressions gained evalObject(), then it was factored out so that it could be shared by both evalXXX() methods.


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 com.hp.hpl.jena.graph.query.Expression
Specified by:
isVariable in interface Expr

getName

public java.lang.String getName()
Specified by:
getName in interface com.hp.hpl.jena.graph.query.Expression

isConstant

public boolean isConstant()
Description copied from interface: Expr
Answer 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:
isConstant in interface com.hp.hpl.jena.graph.query.Expression
Specified by:
isConstant in interface Expr

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface com.hp.hpl.jena.graph.query.Expression

isFunction

public boolean isFunction()
Description copied from interface: Expr
Answer wether this is a function.

Specified by:
isFunction in interface Expr

getFunction

public ExprFunction getFunction()
Description copied from interface: Expr
Get the function (returns null if not a function)

Specified by:
getFunction in interface Expr

format

public void format(Query query,
                   IndentedWriter writer)


Copyright ? 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP Copyright ? 2010 Talis Systems Ltd. Copyright ? 2010, 2011 Epimorphics Ltd.