public class ValueExprBuilder extends BigdataASTVisitorBase
IValueExpressionNode
s.FunctionRegistry
Modifier and Type | Field and Description |
---|---|
protected com.bigdata.rdf.sail.sparql.GroupGraphPattern |
graphPattern
Used to manage collection and nesting of graph patterns.
|
context
Constructor and Description |
---|
ValueExprBuilder(BigdataASTContext context) |
Modifier and Type | Method and Description |
---|---|
protected FunctionNode |
aggregate(ASTAggregate node,
org.openrdf.model.URI functionURI) |
protected FunctionNode |
binary(SimpleNode node,
org.openrdf.model.URI functionURI)
Handle a simple binary function (both children of the node are arguments
to the function).
|
protected ValueExpressionNode |
left(SimpleNode node) |
protected FunctionNode |
nary(SimpleNode node,
org.openrdf.model.URI functionURI)
Handle a simple nary function (all children of the node are arguments to
the function).
|
protected FunctionNode |
noneary(SimpleNode node,
org.openrdf.model.URI functionURI)
Handle a simple function without any arguments.
|
protected FunctionNode |
quadary(SimpleNode node,
org.openrdf.model.URI functionURI)
Handle a function with four arguments (there are four children of the
node which are the arguments to the function).
|
protected ValueExpressionNode |
right(SimpleNode node) |
protected FunctionNode |
ternary(SimpleNode node,
org.openrdf.model.URI functionURI)
Handle a simple ternary function (there are three children of the node
which are the arguments to the function).
|
protected FunctionNode |
unary(SimpleNode node,
org.openrdf.model.URI functionURI)
Handle a simple unary function (the child of the node is the argument to
the function).
|
FunctionNode |
visit(ASTAbs node,
Object data) |
FunctionNode |
visit(ASTAnd node,
Object data) |
FunctionNode |
visit(ASTAvg node,
Object data) |
FunctionNode |
visit(ASTBNodeFunc node,
Object data)
TODO Same functionURI for BNode() and BNode(Literal)?
|
FunctionNode |
visit(ASTBound node,
Object data) |
FunctionNode |
visit(ASTCeil node,
Object data) |
FunctionNode |
visit(ASTCoalesce node,
Object data) |
FunctionNode |
visit(ASTCompare node,
Object data) |
FunctionNode |
visit(ASTConcat node,
Object data) |
FunctionNode |
visit(ASTContains node,
Object data) |
FunctionNode |
visit(ASTCount node,
Object data) |
FunctionNode |
visit(ASTDatatype node,
Object data) |
FunctionNode |
visit(ASTDay node,
Object data) |
FunctionNode |
visit(ASTEncodeForURI node,
Object data) |
ExistsNode |
visit(ASTExistsFunc node,
Object data)
Note: EXISTS is basically an ASK subquery.
|
FunctionNode |
visit(ASTFloor node,
Object data) |
FunctionNode |
visit(ASTFunctionCall node,
Object data)
ASTFunctionCall (IRIRef, ArgList).
|
FunctionNode |
visit(ASTGroupConcat node,
Object data)
TODO additional scalar values (sparql.jjt specifies "separator EQ" as a
constant in the grammar, but we support additional scalar values for
GROUP_CONCAT . |
AssignmentNode |
visit(ASTGroupCondition node,
Object data)
Aggregate value expressions in GROUP BY clause.
|
FunctionNode |
visit(ASTHours node,
Object data) |
FunctionNode |
visit(ASTIf node,
Object data) |
FunctionNode |
visit(ASTInfix node,
Object data)
Unwrap an
ASTInfix node, returning the inner FunctionNode
constructed for it. |
FunctionNode |
visit(ASTIn node,
Object data)
"IN" and "NOT IN" are infix notation operators.
|
FunctionNode |
visit(ASTIRIFunc node,
Object data) |
FunctionNode |
visit(ASTIsBlank node,
Object data) |
FunctionNode |
visit(ASTIsIRI node,
Object data) |
FunctionNode |
visit(ASTIsLiteral node,
Object data) |
FunctionNode |
visit(ASTIsNumeric node,
Object data) |
FunctionNode |
visit(ASTLangMatches node,
Object data) |
FunctionNode |
visit(ASTLang node,
Object data) |
FunctionNode |
visit(ASTLowerCase node,
Object data) |
FunctionNode |
visit(ASTMath node,
Object data) |
FunctionNode |
visit(ASTMax node,
Object data) |
FunctionNode |
visit(ASTMD5 node,
Object data) |
FunctionNode |
visit(ASTMin node,
Object data) |
FunctionNode |
visit(ASTMinutes node,
Object data) |
FunctionNode |
visit(ASTMonth node,
Object data) |
NotExistsNode |
visit(ASTNotExistsFunc node,
Object data)
See EXISTS above.
|
FunctionNode |
visit(ASTNotIn node,
Object data)
See IN above.
|
FunctionNode |
visit(ASTNot node,
Object data) |
FunctionNode |
visit(ASTNow node,
Object data) |
FunctionNode |
visit(ASTOr node,
Object data) |
FunctionNode |
visit(ASTRand node,
Object data) |
FunctionNode |
visit(ASTRegexExpression node,
Object data) |
FunctionNode |
visit(ASTReplace node,
Object data) |
FunctionNode |
visit(ASTRound node,
Object data) |
FunctionNode |
visit(ASTSameTerm node,
Object data) |
FunctionNode |
visit(ASTSample node,
Object data) |
FunctionNode |
visit(ASTSeconds node,
Object data) |
FunctionNode |
visit(ASTSHA1 node,
Object data) |
FunctionNode |
visit(ASTSHA224 node,
Object data) |
FunctionNode |
visit(ASTSHA256 node,
Object data) |
FunctionNode |
visit(ASTSHA384 node,
Object data) |
FunctionNode |
visit(ASTSHA512 node,
Object data) |
FunctionNode |
visit(ASTStrAfter node,
Object data) |
FunctionNode |
visit(ASTStrBefore node,
Object data) |
FunctionNode |
visit(ASTStrDt node,
Object data) |
FunctionNode |
visit(ASTStrEnds node,
Object data) |
FunctionNode |
visit(ASTStrLang node,
Object data) |
FunctionNode |
visit(ASTStrLen node,
Object data) |
FunctionNode |
visit(ASTStr node,
Object data) |
FunctionNode |
visit(ASTStrStarts node,
Object data) |
FunctionNode |
visit(ASTSTRUUID node,
Object data) |
FunctionNode |
visit(ASTSubstr node,
Object data) |
FunctionNode |
visit(ASTSum node,
Object data) |
FunctionNode |
visit(ASTTimezone node,
Object data) |
FunctionNode |
visit(ASTTz node,
Object data) |
FunctionNode |
visit(ASTUpperCase node,
Object data) |
FunctionNode |
visit(ASTUUID node,
Object data) |
FunctionNode |
visit(ASTYear node,
Object data) |
depth, firstASTGraphGraphAncestor, indent, indent, scopedGroupGraphPattern, visit, visit, visit, visit, visit, visit, visit, visit, visit
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
protected com.bigdata.rdf.sail.sparql.GroupGraphPattern graphPattern
GroupGraphPatternBuilder
.
Note: Both ASTExistsFunc
and ASTNotExistsFunc
have an
inner graph pattern by they appear within value expressions.
public ValueExprBuilder(BigdataASTContext context)
protected ValueExpressionNode left(SimpleNode node) throws VisitorException
VisitorException
protected ValueExpressionNode right(SimpleNode node) throws VisitorException
VisitorException
protected FunctionNode noneary(SimpleNode node, org.openrdf.model.URI functionURI) throws VisitorException
VisitorException
protected FunctionNode unary(SimpleNode node, org.openrdf.model.URI functionURI) throws VisitorException
VisitorException
protected FunctionNode binary(SimpleNode node, org.openrdf.model.URI functionURI) throws VisitorException
VisitorException
protected FunctionNode ternary(SimpleNode node, org.openrdf.model.URI functionURI) throws VisitorException
VisitorException
protected FunctionNode quadary(SimpleNode node, org.openrdf.model.URI functionURI) throws VisitorException
VisitorException
protected FunctionNode nary(SimpleNode node, org.openrdf.model.URI functionURI) throws VisitorException
VisitorException
protected FunctionNode aggregate(ASTAggregate node, org.openrdf.model.URI functionURI) throws VisitorException
VisitorException
public final FunctionNode visit(ASTOr node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTAnd node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTNot node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTCoalesce node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTCompare node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSubstr node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTConcat node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTAbs node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTCeil node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTContains node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTFloor node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTRound node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTRand node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSameTerm node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTMath node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTFunctionCall node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTEncodeForURI node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTStr node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTStrDt node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTStrStarts node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTStrEnds node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTStrLen node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTStrAfter node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTStrBefore node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTUpperCase node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTLowerCase node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTStrLang node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTNow node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTYear node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTMonth node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTDay node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTHours node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTMinutes node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSeconds node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTTimezone node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTTz node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTMD5 node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSHA1 node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSHA224 node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSHA256 node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSHA384 node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSHA512 node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public FunctionNode visit(ASTUUID node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public FunctionNode visit(ASTSTRUUID node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTIRIFunc node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTLang node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTDatatype node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTLangMatches node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTBound node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTIsIRI node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTIsBlank node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTIsLiteral node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTIsNumeric node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTBNodeFunc node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTRegexExpression node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public FunctionNode visit(ASTReplace node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final ExistsNode visit(ASTExistsFunc node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
ExistsNode
public final NotExistsNode visit(ASTNotExistsFunc node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
NotExistsNode
public final FunctionNode visit(ASTIf node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTInfix node, Object data) throws VisitorException
ASTInfix
node, returning the inner FunctionNode
constructed for it.
Note: Sesame has picked up the notion of an ASTInfix node, but they are handling it slightly differently.
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
http://www.openrdf.org/issues/browse/SES-818
public final FunctionNode visit(ASTIn node, Object data) throws VisitorException
FunctionRegistry
require that the outer NumericExpression is
their first argument. The function registry optimizes several different
cases, including where the set is empty, where it has one member, and
where the members of the set are constants and the outer expression is a
variable.visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
FunctionRegistry.IN
,
FunctionRegistry.NOT_IN
,
http://www.openrdf.org/issues/browse/SES-818
public final FunctionNode visit(ASTNotIn node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final AssignmentNode visit(ASTGroupCondition node, Object data) throws VisitorException
VarNode
, AssignmentNode
, or
FunctionNode
(which handles both built-in functions and extension
functions). However, we always wrap it as an AssignmentNode
and
return that. A VarNode
will just bind itself. A bare
FunctionNode
will bind an anonymous variable.visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTCount node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTMax node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTMin node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSum node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTAvg node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTSample node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final FunctionNode visit(ASTGroupConcat node, Object data) throws VisitorException
GROUP_CONCAT
. Also, the grammar is permissive and allows
Expression for separator rather than a quoted string (per the W3C draft).visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.