Class AbstractQueryRequestHandler
- java.lang.Object
-
- org.eclipse.rdf4j.http.server.repository.handler.AbstractQueryRequestHandler
-
- All Implemented Interfaces:
QueryRequestHandler
- Direct Known Subclasses:
DefaultQueryRequestHandler
public abstract class AbstractQueryRequestHandler extends Object implements QueryRequestHandler
A base implementation to handle an HTTP query request.
-
-
Constructor Summary
Constructors Constructor Description AbstractQueryRequestHandler(RepositoryResolver repositoryResolver)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Object
evaluateQuery(Query query, long limit, long offset, boolean distinct)
protected long
getLimit(javax.servlet.http.HttpServletRequest request)
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)
protected long
getOffset(javax.servlet.http.HttpServletRequest request)
protected abstract Query
getQuery(javax.servlet.http.HttpServletRequest request, RepositoryConnection repositoryCon, String queryString)
protected abstract String
getQueryString(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.View
getViewFor(Query query)
org.springframework.web.servlet.ModelAndView
handleQueryRequest(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.annotation.RequestMethod requestMethod, javax.servlet.http.HttpServletResponse response)
protected boolean
isDistinct(javax.servlet.http.HttpServletRequest request)
-
-
-
Constructor Detail
-
AbstractQueryRequestHandler
public AbstractQueryRequestHandler(RepositoryResolver repositoryResolver)
-
-
Method Detail
-
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:
handleQueryRequest
in interfaceQueryRequestHandler
- Throws:
HTTPException
IOException
-
evaluateQuery
protected abstract Object evaluateQuery(Query query, long limit, long offset, boolean distinct) throws ClientHTTPException
- Throws:
ClientHTTPException
-
getViewFor
protected abstract org.springframework.web.servlet.View getViewFor(Query query)
-
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:
IOException
HTTPException
-
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
protected long getOffset(javax.servlet.http.HttpServletRequest request) throws ClientHTTPException
- Throws:
ClientHTTPException
-
getLimit
protected long getLimit(javax.servlet.http.HttpServletRequest request) throws ClientHTTPException
- Throws:
ClientHTTPException
-
-