public abstract class BigdataASTVisitorBase extends ASTVisitorBase
Modifier and Type | Field and Description |
---|---|
protected BigdataASTContext |
context |
Modifier | Constructor and Description |
---|---|
protected |
BigdataASTVisitorBase(BigdataASTContext context) |
Modifier and Type | Method and Description |
---|---|
protected int |
depth(Node node)
Return the depth of the node in the parse tree.
|
protected ASTGraphGraphPattern |
firstASTGraphGraphAncestor(Node node)
Returns the enclosing ASTGraphGraphPattern ancestor-or-self for the
given node, or null if none exists.
|
protected static String |
indent(int depth)
Returns a string that may be used to indent a dump of the nodes in the
tree.
|
protected String |
indent(Node node)
Return a white space string which may be used to indent the node to its
depth in the parse tree.
|
protected com.bigdata.rdf.sail.sparql.GroupGraphPattern |
scopedGroupGraphPattern(Node n)
Builds a fresh
GroupGraphPattern that inherits the scope
for the given node. |
Object |
visit(ASTBlankNode node,
Object data) |
ConstantNode |
visit(ASTFalse node,
Object data) |
ConstantNode |
visit(ASTIRI node,
Object data) |
ConstantNode |
visit(ASTNumericLiteral node,
Object data) |
Object |
visit(ASTQName node,
Object data) |
ConstantNode |
visit(ASTRDFLiteral node,
Object data) |
String |
visit(ASTString node,
Object data) |
ConstantNode |
visit(ASTTrue node,
Object data) |
VarNode |
visit(ASTVar node,
Object data)
Note: openrdf uses the
BlankNodeVarProcessor create anonymous
variables from blank nodes and then flags those as anonymous variables in
this step. |
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, 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 final BigdataASTContext context
protected BigdataASTVisitorBase(BigdataASTContext context)
protected final int depth(Node node)
node
- The node.protected final String indent(Node node)
node
- The node.protected static String indent(int depth)
depth
- The indentation depth.public final VarNode visit(ASTVar node, Object data) throws VisitorException
BlankNodeVarProcessor
create anonymous
variables from blank nodes and then flags those as anonymous variables in
this step.visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final Object visit(ASTQName node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final Object visit(ASTBlankNode node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final ConstantNode visit(ASTIRI node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final ConstantNode visit(ASTRDFLiteral node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final ConstantNode visit(ASTNumericLiteral node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final ConstantNode visit(ASTTrue node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final ConstantNode visit(ASTFalse node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
public final String visit(ASTString node, Object data) throws VisitorException
visit
in interface SyntaxTreeBuilderVisitor
visit
in class ASTVisitorBase
VisitorException
protected com.bigdata.rdf.sail.sparql.GroupGraphPattern scopedGroupGraphPattern(Node n) throws VisitorException
GroupGraphPattern
that inherits the scope
for the given node. This is done by looking up the scope of the given
node by following its ancestor chain, to identify whether the node
has some named graph ancestors. If so, the scope from the enclosing
named graph ancestor is copied over, otherwise we're in default context.n
- VisitorException
protected ASTGraphGraphPattern firstASTGraphGraphAncestor(Node node)
node
- node at which to start lookupASTGraphGraphPattern
ancestor, if any,
null otherwiseCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.