test_class.declarator: ast
test_class.modifier: private
test_class.original_string: private ASTQueryContainer ast;
test_class.type: ASTQueryContainer
test_class.var_name: ast
test_class.file: recommendation-servlet/src/test/java/org/sindice/analytics/queryProcessor/TestRecommendationScopeProcessor.java
test_class.identifier: TestRecommendationScopeProcessor
test_case.body: @Test
    public void testGraphGraphPattern2()
    throws Exception {
      final String q = "SELECT * { ?s1 ?POF ?g . GRAPH ?g { ?o ?p ?s. } ?a ?b ?c }";
      ast = SyntaxTreeBuilder.parseQuery(q);
  
      final String expected = "QueryContainer\n" +
                              " SelectQuery\n" +
                              "  Select ( * )\n" +
                              "  WhereClause\n" +
                              "   GraphPatternGroup\n" +
                              "    BasicGraphPattern\n" +
                              "     TriplesSameSubjectPath\n" +
                              "      Var (s1)\n" +
                              "      PropertyListPath\n" +
                              "       Var (POF)\n" +
                              "       ObjectList\n" +
                              "        Var (g)\n" +
                              "    GraphGraphPattern\n" +
                              "     Var (g)\n" +
                              "     GraphPatternGroup\n" +
                              "      BasicGraphPattern\n" +
                              "       TriplesSameSubjectPath\n" +
                              "        Var (o)\n" +
                              "        PropertyListPath\n" +
                              "         Var (p)\n" +
                              "         ObjectList\n" +
                              "          Var (s)";
      RecommendationScopeProcessor.process(ast);
      assertEquals(expected, ast.dump(""));
    }
test_case.class_method_signature: TestRecommendationScopeProcessor.testGraphGraphPattern2()
test_case.full_signature: @Test public void testGraphGraphPattern2()
test_case.identifier: testGraphGraphPattern2
test_case.invocations: parseQuery process assertEquals dump
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGraphGraphPattern2()
focal_class.declarator: logger = LoggerFactory.getLogger(RecommendationScopeProcessor.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(RecommendationScopeProcessor.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: recommendation-servlet/src/main/java/org/sindice/analytics/queryProcessor/RecommendationScopeProcessor.java
focal_class.identifier: RecommendationScopeProcessor
focal_class.class_method_signature: RecommendationScopeProcessor.RecommendationScopeProcessor()
focal_class.full_signature: private  RecommendationScopeProcessor()
focal_class.identifier: RecommendationScopeProcessor
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  RecommendationScopeProcessor()
focal_class.class_method_signature: RecommendationScopeProcessor.process(ASTQueryContainer ast)
focal_class.full_signature: public static void process(ASTQueryContainer ast)
focal_class.identifier: process
focal_class.modifiers: public static
focal_class.parameters: (ASTQueryContainer ast)
focal_class.return: void
focal_class.signature: void process(ASTQueryContainer ast)
focal_class.class_method_signature: RecommendationScopeProcessor.pruneToScope(SimpleNode node)
focal_class.full_signature: private static void pruneToScope(SimpleNode node)
focal_class.identifier: pruneToScope
focal_class.modifiers: private static
focal_class.parameters: (SimpleNode node)
focal_class.return: void
focal_class.signature: void pruneToScope(SimpleNode node)
focal_method.body: public static void process(ASTQueryContainer ast)
    throws VisitorException {
      final ScopedVariables scopedVariables = new ScopedVariables();
      final POFConnected scope = new POFConnected();
  
      // Initialize the seed
      scopedVariables.newConnectedVars.add(Hash.get(SyntaxTreeBuilder.PointOfFocus));
      // Define the recommendation scope
      do {
        scopedVariables.updateVars();
        scope.visit(ast, scopedVariables);
      } while (!scopedVariables.newConnectedVars.isEmpty());
      // Prune disconnected parts of the AST
      pruneToScope(ast);
    }
focal_method.class_method_signature: RecommendationScopeProcessor.process(ASTQueryContainer ast)
focal_method.full_signature: public static void process(ASTQueryContainer ast)
focal_method.identifier: process
focal_method.invocations: add get updateVars visit isEmpty pruneToScope
focal_method.modifiers: public static
focal_method.parameters: (ASTQueryContainer ast)
focal_method.return: void
focal_method.signature: void process(ASTQueryContainer ast)