Class ContextCollector

  • All Implemented Interfaces:
    QueryModelVisitor<java.lang.Exception>

    public class ContextCollector
    extends AbstractQueryModelVisitor<java.lang.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 Detail

      • mContexts

        private final java.util.Map<TupleExpr,​Var> 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 Detail

      • ContextCollector

        private ContextCollector()