Package org.openrdf.query.parser.serql.ast

Examples of org.openrdf.query.parser.serql.ast.ASTQueryContainer


  public QueryModel parseQuery(String queryStr, String baseURI)
    throws MalformedQueryException
  {
    try {
      ASTQueryContainer qc = SyntaxTreeBuilder.parseQuery(queryStr);

      // Replace deprecated NULL nodes with semantically equivalent
      // alternatives
      NullProcessor.process(qc);

      StringEscapesProcessor.process(qc);
      Map<String, String> namespaces = NamespaceDeclProcessor.process(qc);
      ProjectionProcessor.process(qc);
      qc.jjtAccept(new ProjectionAliasProcessor(), null);
      qc.jjtAccept(new AnonymousVarGenerator(), null);

      // TODO: check use of unbound variables?

      TupleExpr tupleExpr = QueryModelBuilder.buildQueryModel(qc, new ValueFactoryImpl());

      ASTQuery queryNode = qc.getQuery();
      QueryModel query;
      if (queryNode instanceof ASTTupleQuery) {
        query = new TupleQueryModel(tupleExpr);
      }
      else if (queryNode instanceof ASTGraphQuery) {
View Full Code Here


  public ParsedQuery parseQuery(String queryStr, String baseURI)
    throws MalformedQueryException
  {
    try {
      ASTQueryContainer qc = SyntaxTreeBuilder.parseQuery(queryStr);

      // Replace deprecates NULL nodes with semantically equivalent
      // alternatives
      NullProcessor.process(qc);

      StringEscapesProcessor.process(qc);
      Map<String, String> namespaces = NamespaceDeclProcessor.process(qc);
      WildcardProjectionProcessor.process(qc);
      qc.jjtAccept(new ProjectionAliasProcessor(), null);
      qc.jjtAccept(new AnonymousVarGenerator(), null);

      // TODO: check use of unbound variables?

      TupleExpr tupleExpr = QueryModelBuilder.buildQueryModel(qc, new ValueFactoryImpl());

      ASTQuery queryNode = qc.getQuery();
      ParsedQuery query;
      if (queryNode instanceof ASTTupleQuery) {
        query = new ParsedTupleQuery(tupleExpr);
      }
      else if (queryNode instanceof ASTGraphQuery) {
View Full Code Here

TOP

Related Classes of org.openrdf.query.parser.serql.ast.ASTQueryContainer

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.