com.mkdoc.query
Interface ResultRenderer

All Known Implementing Classes:
AbstractResultRenderer, RssResultRenderer, TextResultRenderer, XhtmlResultRenderer

public interface ResultRenderer

An interface for types that render query results.

Version:
0.6 2005-10-11
Author:
Philip Shaw

Field Summary
static int FULL
          The full document output mode.
static int INSERT
          The document insertion output mode.
 
Method Summary
 java.lang.String getContentType()
          Get the content type for the renderer.
 void renderQueryResult(javax.servlet.jsp.JspWriter jspWriter, QueryResult queryResult)
          Render a query result to a servlet output stream in FULL mode.
 void renderQueryResult(javax.servlet.jsp.JspWriter jspWriter, QueryResult queryResult, int mode)
          Render a query result to a servlet output stream.
 java.lang.String renderQueryResult(QueryResult queryResult, int mode)
          Render a query result to a string.
 void renderQueryResult(javax.servlet.ServletOutputStream outputStream, QueryResult queryResult)
          Render a query results table to a servlet output stream in FULL mode.
 void renderQueryResult(javax.servlet.ServletOutputStream outputStream, QueryResult queryResult, int mode)
          Render a query result to a servlet output stream.
 

Field Detail

FULL

public static final int FULL
The full document output mode.

Since:
Version 0.1 2005-07-19
See Also:
Constant Field Values

INSERT

public static final int INSERT
The document insertion output mode.

Since:
Version 0.1 2005-07-19
See Also:
Constant Field Values
Method Detail

getContentType

public java.lang.String getContentType()
Get the content type for the renderer.

Returns:
A content type for the rendered output.
Since:
Version 0.1 2005-01-26

renderQueryResult

public void renderQueryResult(javax.servlet.ServletOutputStream outputStream,
                              QueryResult queryResult)
                       throws java.io.IOException
Render a query results table to a servlet output stream in FULL mode.

Parameters:
outputStream - The output stream to which to write the results.
queryResult - The query result to render.
Throws:
java.io.IOException - If there is a problem writing results to the output stream.
Since:
Version 0.5 2005-09-12

renderQueryResult

public void renderQueryResult(javax.servlet.ServletOutputStream outputStream,
                              QueryResult queryResult,
                              int mode)
                       throws java.io.IOException
Render a query result to a servlet output stream.

Implementations may render output according to a particular markup language or content type.

Parameters:
outputStream - The output stream to which to write the results.
queryResult - The query result to render.
mode - The output mode, either ResultRenderer.FULL or ResultRenderer.INSERT.
Throws:
java.io.IOException - If there is a problem writing results to the output stream.
Since:
Version 0.2 2005-07-14

renderQueryResult

public void renderQueryResult(javax.servlet.jsp.JspWriter jspWriter,
                              QueryResult queryResult)
                       throws java.io.IOException
Render a query result to a servlet output stream in FULL mode.

Implementations may render output according to a particular markup language or content type.

Parameters:
jspWriter - The output stream to which to write the results.
queryResult - The query result to render.
Throws:
java.io.IOException - If there is a problem writing results to the output stream.
Since:
Version 0.5 2005-09-12

renderQueryResult

public void renderQueryResult(javax.servlet.jsp.JspWriter jspWriter,
                              QueryResult queryResult,
                              int mode)
                       throws java.io.IOException
Render a query result to a servlet output stream.

Implementations may render output according to a particular markup language or content type.

Parameters:
jspWriter - The output stream to which to write the results.
queryResult - The query result to render.
mode - The output mode, either ResultRenderer.FULL or ResultRenderer.INSERT.
Throws:
java.io.IOException - If there is a problem writing results to the output stream.
Since:
Version 0.3 2005-07-19

renderQueryResult

public java.lang.String renderQueryResult(QueryResult queryResult,
                                          int mode)
Render a query result to a string.

Parameters:
queryResult - The query result to render.
mode - The output mode, either ResultRenderer.FULL or ResultRenderer.INSERT.
Returns:
A formatted representation of the query results.
Since:
Version 0.2 2005-07-14