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

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


  public QueryModel parseQuery(String queryStr, String baseURI)
    throws MalformedQueryException
  {
    try {
      ASTQueryContainer qc = SyntaxTreeBuilder.parseQuery(queryStr);
      StringEscapesProcessor.process(qc);
      BaseDeclProcessor.process(qc, baseURI);
      Map<String, String> prefixes = PrefixDeclProcessor.process(qc);
      WildcardProjectionProcessor.process(qc);
      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);
View Full Code Here


  public ParsedQuery parseQuery(String queryStr, String baseURI)
    throws MalformedQueryException
  {
    try {
      ASTQueryContainer qc = SyntaxTreeBuilder.parseQuery(queryStr);
      StringEscapesProcessor.process(qc);
      BaseDeclProcessor.process(qc, baseURI);
      Map<String, String> prefixes = PrefixDeclProcessor.process(qc);
      WildcardProjectionProcessor.process(qc);
      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);
View Full Code Here

TOP

Related Classes of org.openrdf.query.parser.sparql.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.