Class ContextCollector
java.lang.Object
org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor<Exception>
org.eclipse.rdf4j.queryrender.sparql.ContextCollector
- All Implemented Interfaces:
QueryModelVisitor<Exception>
Visitor implementation for the query algebra which walks the tree and figures out the context for nodes in the algebra. The context for a node is set on the highest node in the tree. That is, everything below it shares the same context.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
binaryOpMeet
(TupleExpr theCurrentExpr, TupleExpr theLeftExpr, TupleExpr theRightExpr) collectContexts
(TupleExpr theTupleExpr) private boolean
void
meet
(Difference theOp) void
void
meet
(Intersection theOp) void
void
void
meet
(StatementPattern thePattern) void
private void
sameCtxCheck
(TupleExpr theCurrentExpr, TupleExpr theLeftExpr, Var theLeftCtx, TupleExpr theRightExpr, Var theRightCtx) Methods inherited from class org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor
meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryTupleOperator, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetNode, meetOther, meetSubQueryValueOperator, meetUnaryTupleOperator, meetUnaryValueOperator, meetUpdateExpr
-
Field Details
-
mContexts
Maps TupleExpr to contexts. This map contains only top-level expression elements that share the given context (i.e., all elements below share the same context) -- this is because of where contexts are being introduced into a SPARQL query -- all elements sharing the same contexts are grouped together with a "GRAPH{ ... }" clause.
-
-
Constructor Details
-
ContextCollector
private ContextCollector()
-
-
Method Details
-
collectContexts
- Throws:
Exception
-
meet
- Specified by:
meet
in interfaceQueryModelVisitor<Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<Exception>
- Throws:
Exception
-
meet
- Specified by:
meet
in interfaceQueryModelVisitor<Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<Exception>
- Throws:
Exception
-
meet
- Specified by:
meet
in interfaceQueryModelVisitor<Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<Exception>
- Throws:
Exception
-
meet
- Specified by:
meet
in interfaceQueryModelVisitor<Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<Exception>
- Throws:
Exception
-
meet
- Specified by:
meet
in interfaceQueryModelVisitor<Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<Exception>
- Throws:
Exception
-
meet
- Specified by:
meet
in interfaceQueryModelVisitor<Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<Exception>
- Throws:
Exception
-
binaryOpMeet
private void binaryOpMeet(TupleExpr theCurrentExpr, TupleExpr theLeftExpr, TupleExpr theRightExpr) throws Exception - Throws:
Exception
-
meet
- Specified by:
meet
in interfaceQueryModelVisitor<Exception>
- Overrides:
meet
in classAbstractQueryModelVisitor<Exception>
- Throws:
Exception
-
sameCtxCheck
-
isSameCtx
-