Package cz.cvut.kbss.jopa.query.sparql
Class Sparql11QueryParser
java.lang.Object
cz.cvut.kbss.jopa.query.sparql.Sparql11QueryParser
- All Implemented Interfaces:
QueryParser
Grammar-based SPARQL 1.1 query parser.
Follows more strictly the standard SPARQL 1.1 grammar with one exception - it allows using variable in property paths, so that they can be set on the query. If they are not set, an exception will be thrown when the query is executed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseQuery(String query) Parses the specified query string and returns a query holder instance containing the parsed query.parseQuery(String query, Class<?> resultClass) Parses the specified query string and returns a query holder instance containing the parsed query.
-
Constructor Details
-
Sparql11QueryParser
-
-
Method Details
-
parseQuery
Description copied from interface:QueryParserParses the specified query string and returns a query holder instance containing the parsed query.- Specified by:
parseQueryin interfaceQueryParser- Parameters:
query- The query to parse- Returns:
- Query holder with the parsed query
-
parseQuery
Description copied from interface:QueryParserParses the specified query string and returns a query holder instance containing the parsed query.The provided result class can be used when processing the query to make adjustments.
- Specified by:
parseQueryin interfaceQueryParser- Parameters:
query- Query to parseresultClass- Result class provided by the client- Returns:
- Query holder with the parsed query
-