Class QueryResultView

java.lang.Object
org.eclipse.rdf4j.http.server.repository.QueryResultView
All Implemented Interfaces:
org.springframework.web.servlet.View
Direct Known Subclasses:
BooleanQueryResultView, ExplainQueryResultView, 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 Details

    • QUERY_RESULT_KEY

      public static final String QUERY_RESULT_KEY
      Key by which the query result is stored in the model.
      See Also:
    • QUERY_EXPLAIN_RESULT_KEY

      public static final String QUERY_EXPLAIN_RESULT_KEY
      Key by which the query result explanation is stored in the model.
      See Also:
    • FACTORY_KEY

      public static final String FACTORY_KEY
      Key by which the query result writer factory is stored in the model.
      See Also:
    • 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:
    • CONNECTION_KEY

      public static final String CONNECTION_KEY
      Key by which the current RepositoryConnection is stored in the Model. If this is present, the QueryResultView will take care to close the connection after processing the query result.
      See Also:
    • HEADERS_ONLY

      public static final String HEADERS_ONLY
      See Also:
    • BREAKER_HANDLE_KEY

      public static final String BREAKER_HANDLE_KEY
      See Also:
  • Constructor Details

    • QueryResultView

      public QueryResultView()
  • Method Details

    • render

      public final void render(Map model, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Specified by:
      render in interface org.springframework.web.servlet.View
      Throws:
      IOException
    • renderInternal

      protected abstract void renderInternal(Map model, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Throws:
      IOException
    • setContentType

      protected void setContentType(jakarta.servlet.http.HttpServletResponse response, FileFormat fileFormat) throws IOException
      Throws:
      IOException
    • setContentDisposition

      protected void setContentDisposition(Map model, jakarta.servlet.http.HttpServletResponse response, FileFormat fileFormat) throws IOException
      Throws:
      IOException
    • logEndOfRequest

      protected void logEndOfRequest(jakarta.servlet.http.HttpServletRequest request)
    • sendServiceUnavailable

      protected void sendServiceUnavailable(jakarta.servlet.http.HttpServletResponse response, QueryInterruptedException exception, String fallbackMessage) throws IOException
      Throws:
      IOException