Class QueryResultView
- java.lang.Object
-
- org.eclipse.rdf4j.http.server.repository.QueryResultView
-
- All Implemented Interfaces:
org.springframework.web.servlet.View
- Direct Known Subclasses:
BooleanQueryResultView,GraphQueryResultView,TupleQueryResultView
public abstract class QueryResultView extends Object implements org.springframework.web.servlet.View
Base class for rendering query results.- Author:
- Herko ter Horst, Arjohn Kampman
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONNECTION_KEYKey by which the currentRepositoryConnectionis stored in the Model.static StringFACTORY_KEYKey by which the query result writer factory is stored in the model.static StringFILENAME_HINT_KEYKey by which a filename hint is stored in the model.static StringHEADERS_ONLYstatic StringQUERY_RESULT_KEYKey by which the query result is stored in the model.
-
Constructor Summary
Constructors Constructor Description QueryResultView()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidlogEndOfRequest(javax.servlet.http.HttpServletRequest request)voidrender(Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected abstract voidrenderInternal(Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voidsetContentDisposition(Map model, javax.servlet.http.HttpServletResponse response, FileFormat fileFormat)protected voidsetContentType(javax.servlet.http.HttpServletResponse response, FileFormat fileFormat)
-
-
-
Field Detail
-
QUERY_RESULT_KEY
public static final String QUERY_RESULT_KEY
Key by which the query result is stored in the model.- See Also:
- Constant Field Values
-
FACTORY_KEY
public static final String FACTORY_KEY
Key by which the query result writer factory is stored in the model.- See Also:
- Constant Field Values
-
FILENAME_HINT_KEY
public static final String FILENAME_HINT_KEY
Key by which a filename hint is stored in the model. The filename hint may be used to present the client with a suggestion for a filename to use for storing the result.- See Also:
- Constant Field Values
-
CONNECTION_KEY
public static final String CONNECTION_KEY
Key by which the currentRepositoryConnectionis stored in the Model. If this is present, theQueryResultViewwill take care to close the connection after processing the query result.- See Also:
- Constant Field Values
-
HEADERS_ONLY
public static final String HEADERS_ONLY
- See Also:
- Constant Field Values
-
-
Method Detail
-
render
public final void render(Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
- Specified by:
renderin interfaceorg.springframework.web.servlet.View- Throws:
IOException
-
renderInternal
protected abstract void renderInternal(Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
setContentType
protected void setContentType(javax.servlet.http.HttpServletResponse response, FileFormat fileFormat) throws IOException- Throws:
IOException
-
setContentDisposition
protected void setContentDisposition(Map model, javax.servlet.http.HttpServletResponse response, FileFormat fileFormat) throws IOException
- Throws:
IOException
-
logEndOfRequest
protected void logEndOfRequest(javax.servlet.http.HttpServletRequest request)
-
-