Package org.eclipse.rdf4j.workbench.util
Class QueryEvaluator
java.lang.Object
org.eclipse.rdf4j.workbench.util.QueryEvaluator
Evaluates queries for QueryServlet.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
evaluateTupleQuery
(TupleResultBuilder builder, String xslPath, WorkbenchRequest req, javax.servlet.http.HttpServletResponse resp, CookieHandler cookies, TupleQuery query, boolean writeCookie, boolean paged, int offset, int limit) Evaluate a tuple query, and create an XML results document.void
evaluateTupleQuery
(TupleResultBuilder builder, TupleQuery query) Evaluate a tuple query, and create an XML results document.void
extractQueryAndEvaluate
(TupleResultBuilder builder, javax.servlet.http.HttpServletResponse resp, OutputStream out, String xslPath, RepositoryConnection con, String queryText, WorkbenchRequest req, CookieHandler cookies) Evaluates the query submitted with the given request.
-
Field Details
-
INSTANCE
-
-
Method Details
-
extractQueryAndEvaluate
public void extractQueryAndEvaluate(TupleResultBuilder builder, javax.servlet.http.HttpServletResponse resp, OutputStream out, String xslPath, RepositoryConnection con, String queryText, WorkbenchRequest req, CookieHandler cookies) throws BadRequestException, RDF4JException Evaluates the query submitted with the given request.- Parameters:
builder
- used to build the responseresp
- the response objectout
- the output writerxslPath
- style sheet pathcon
- connection to repositoryqueryText
- the query text, having been pulled usingQueryServlet
from one of three request parameters: "query", "queryhash" or "saved"req
- the request objectcookies
- used to deal with browser cookies- Throws:
BadRequestException
- if there's a problem getting request parameters or issuing the repository queryRDF4JException
- if there's a problem preparing the query
-
evaluateTupleQuery
public void evaluateTupleQuery(TupleResultBuilder builder, String xslPath, WorkbenchRequest req, javax.servlet.http.HttpServletResponse resp, CookieHandler cookies, TupleQuery query, boolean writeCookie, boolean paged, int offset, int limit) throws QueryEvaluationException, QueryResultHandlerException Evaluate a tuple query, and create an XML results document. This method completes writing of the response. !paged means use all results.- Parameters:
builder
- response builder helper for generating the XML response to the client, which must not have had start() called on itxslPath
- needed to begin writing response body after writing result count cookiereq
- needed to write result count cookieresp
- needed to write result count cookiecookies
- needed to write result count cookiequery
- the query to be evaluatedwriteCookie
- whether to write the total result count cookiepaged
- whether to display a limited subset- Throws:
QueryResultHandlerException
QueryEvaluationException
-
evaluateTupleQuery
public void evaluateTupleQuery(TupleResultBuilder builder, TupleQuery query) throws QueryEvaluationException, QueryResultHandlerException Evaluate a tuple query, and create an XML results document. It is still necessary to call end() on the builder after calling this method.- Parameters:
builder
- response builder helper for generating the XML response to the client, which must have had start() called on itquery
- the query to be evaluated- Throws:
QueryResultHandlerException
QueryEvaluationException
-