Class SparqlQueryParser

java.lang.Object
cz.cvut.kbss.jopa.query.sparql.SparqlQueryParser
All Implemented Interfaces:
QueryParser

public class SparqlQueryParser extends Object implements QueryParser
A simplified SPARQL query parser.

This implementation does not use any AST tree-based query string parsing as its only purpose is to split the query into chunks delimited by variable occurrences, so that the variables can be bound using parameters in the query API.

More diligent query parsing is left to the engine used to execute the resulting query.

  • Constructor Details

  • Method Details

    • parseQuery

      public SparqlQueryHolder parseQuery(String query)
      Description copied from interface: QueryParser
      Parses the specified query string and returns a query builder instance containing the parsed query.
      Specified by:
      parseQuery in interface QueryParser
      Parameters:
      query - The query to parse
      Returns:
      Query builder with the parsed query