Package org.openrdf.query.parser.sparql.ast

Examples of org.openrdf.query.parser.sparql.ast.ASTQuery


      BlankNodeVarProcessor.process(qc);
      TupleExpr tupleExpr = buildQueryModel(qc);

      QueryModel query;

      ASTQuery queryNode = qc.getQuery();
      if (queryNode instanceof ASTSelectQuery) {
        query = new TupleQueryModel(tupleExpr);
      }
      else if (queryNode instanceof ASTConstructQuery) {
        query = new GraphQueryModel(tupleExpr, prefixes);
      }
      else if (queryNode instanceof ASTAskQuery) {
        query = new BooleanQueryModel(tupleExpr);
      }
      else if (queryNode instanceof ASTDescribeQuery) {
        query = new GraphQueryModel(tupleExpr, prefixes);
      }
      else {
        throw new RuntimeException("Unexpected query type: " + queryNode.getClass());
      }

      // Handle dataset declaration
      Dataset dataset = DatasetDeclProcessor.process(qc);
      if (dataset != null) {
View Full Code Here


      BlankNodeVarProcessor.process(qc);
      TupleExpr tupleExpr = buildQueryModel(qc);

      ParsedQuery query;

      ASTQuery queryNode = qc.getQuery();
      if (queryNode instanceof ASTSelectQuery) {
        query = new ParsedTupleQuery(tupleExpr);
      }
      else if (queryNode instanceof ASTConstructQuery) {
        query = new ParsedGraphQuery(tupleExpr, prefixes);
      }
      else if (queryNode instanceof ASTAskQuery) {
        query = new ParsedBooleanQuery(tupleExpr);
      }
      else if (queryNode instanceof ASTDescribeQuery) {
        query = new ParsedGraphQuery(tupleExpr, prefixes);
      }
      else {
        throw new RuntimeException("Unexpected query type: " + queryNode.getClass());
      }

      // Handle dataset declaration
      Dataset dataset = DatasetDeclProcessor.process(qc);
      if (dataset != null) {
View Full Code Here

class WildcardProjectionProcessor extends ASTVisitorBase {

  public static void process(ASTQueryContainer qc)
    throws MalformedQueryException
  {
    ASTQuery queryNode = qc.getQuery();

    if (queryNode instanceof ASTSelectQuery) {
      ASTSelect selectNode = ((ASTSelectQuery)queryNode).getSelect();

      if (selectNode.isWildcard()) {
View Full Code Here

TOP

Related Classes of org.openrdf.query.parser.sparql.ast.ASTQuery

Copyright © 2018 www.massapicom. 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.