Class AbstractQueryRequestHandler
java.lang.Object
org.eclipse.rdf4j.http.server.repository.handler.AbstractQueryRequestHandler
- All Implemented Interfaces:
QueryRequestHandler
- Direct Known Subclasses:
DefaultQueryRequestHandler
A base implementation to handle an HTTP query request.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ObjectevaluateQuery(Query query, long limit, long offset, boolean distinct) protected longgetLimit(javax.servlet.http.HttpServletRequest request) protected org.springframework.web.servlet.ModelAndViewgetModelAndView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean headersOnly, RepositoryConnection repositoryCon, org.springframework.web.servlet.View view, Object queryResult, FileFormatServiceRegistry<? extends FileFormat, ?> registry) protected longgetOffset(javax.servlet.http.HttpServletRequest request) protected abstract QuerygetQuery(javax.servlet.http.HttpServletRequest request, RepositoryConnection repositoryCon, String queryString) protected abstract StringgetQueryString(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.annotation.RequestMethod requestMethod) protected abstract FileFormatServiceRegistry<? extends FileFormat,?> getResultWriterFor(Query query) protected abstract org.springframework.web.servlet.ViewgetViewFor(Query query) org.springframework.web.servlet.ModelAndViewhandleQueryRequest(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.annotation.RequestMethod requestMethod, javax.servlet.http.HttpServletResponse response) protected booleanisDistinct(javax.servlet.http.HttpServletRequest request)
-
Constructor Details
-
AbstractQueryRequestHandler
-
-
Method Details
-
handleQueryRequest
public org.springframework.web.servlet.ModelAndView handleQueryRequest(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.annotation.RequestMethod requestMethod, javax.servlet.http.HttpServletResponse response) throws HTTPException, IOException - Specified by:
handleQueryRequestin interfaceQueryRequestHandler- Throws:
HTTPExceptionIOException
-
evaluateQuery
protected abstract Object evaluateQuery(Query query, long limit, long offset, boolean distinct) throws ClientHTTPException - Throws:
ClientHTTPException
-
getViewFor
-
getResultWriterFor
protected abstract FileFormatServiceRegistry<? extends FileFormat,?> getResultWriterFor(Query query) -
getQueryString
protected abstract String getQueryString(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.annotation.RequestMethod requestMethod) throws HTTPException - Throws:
HTTPException
-
getQuery
protected abstract Query getQuery(javax.servlet.http.HttpServletRequest request, RepositoryConnection repositoryCon, String queryString) throws IOException, HTTPException - Throws:
IOExceptionHTTPException
-
getModelAndView
protected org.springframework.web.servlet.ModelAndView getModelAndView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean headersOnly, RepositoryConnection repositoryCon, org.springframework.web.servlet.View view, Object queryResult, FileFormatServiceRegistry<? extends FileFormat, ?> registry) throws ClientHTTPException- Throws:
ClientHTTPException
-
isDistinct
protected boolean isDistinct(javax.servlet.http.HttpServletRequest request) throws ClientHTTPException - Throws:
ClientHTTPException
-
getOffset
- Throws:
ClientHTTPException
-
getLimit
- Throws:
ClientHTTPException
-