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 voidbinaryOpMeet(TupleExpr theCurrentExpr, TupleExpr theLeftExpr, TupleExpr theRightExpr) collectContexts(TupleExpr theTupleExpr) private booleanvoidmeet(Difference theOp) voidvoidmeet(Intersection theOp) voidvoidvoidmeet(StatementPattern thePattern) voidprivate voidsameCtxCheck(TupleExpr theCurrentExpr, TupleExpr theLeftExpr, Var theLeftCtx, TupleExpr theRightExpr, Var theRightCtx) Methods inherited from class 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
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
binaryOpMeet
-
meet
- Specified by:
meetin interfaceQueryModelVisitor<Exception>- Overrides:
meetin classAbstractQueryModelVisitor<Exception>- Throws:
Exception
-
sameCtxCheck
-
isSameCtx
-