Examples of ASTSelectQuery


Examples of lupos.sparql1_1.ASTSelectQuery

      // walk through first level children of AST...
      for (int i = 0; i < ast.jjtGetNumChildren(); ++i) {
        final Node child = ast.jjtGetChild(i); // get current child

        if (child instanceof ASTSelectQuery) {
          final ASTSelectQuery selectChild = (ASTSelectQuery) child;

          // SELECT is not the wildcard *...
          if (!selectChild.isSelectAll()) {
            // walk through select children...
            for (int j = 0; j < selectChild.jjtGetNumChildren(); ++j) {
              final Node selectChildChild = selectChild
              .jjtGetChild(j);

              // child of select is variable...
              if (selectChildChild instanceof ASTVar) {
                final ASTVar var = (ASTVar) selectChildChild;
View Full Code Here

Examples of lupos.sparql1_1.ASTSelectQuery

      }
    } else if(node instanceof ASTTripleSet){
      FederatedQuery.checkVariables(node, result);
    } else if(node instanceof ASTSelectQuery){
      // check embedded select queries recursively
      final ASTSelectQuery select = (ASTSelectQuery) node;
      final Set<Variable> innerQueryVariables = new HashSet<Variable>();
      final Set<Variable> innerQueryProjectedVariables = new HashSet<Variable>();
      for(final Node innerQueryChild: select.getChildren()){
        if(innerQueryChild instanceof ASTVar){
          final Variable v = new Variable(((ASTVar) innerQueryChild).getName());
          innerQueryProjectedVariables.add(v);
        } else if(innerQueryChild instanceof ASTGroupConstraint){
          innerQueryVariables.addAll(FederatedQuery.getSurelyBoundVariables(innerQueryChild));
        }
      }

      if(!select.isSelectAll()){
        innerQueryVariables.retainAll(innerQueryProjectedVariables);
      }
      result.addAll(innerQueryVariables);
    } else if(node instanceof ASTUnionConstraint){
      // Check union...
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.