com.mkdoc.query
Class TextResultRenderer

java.lang.Object
  |
  +--com.mkdoc.query.AbstractResultRenderer
        |
        +--com.mkdoc.query.TextResultRenderer
All Implemented Interfaces:
ResultRenderer

public class TextResultRenderer
extends AbstractResultRenderer
implements ResultRenderer

Renders Sesame query results to plain text.

Version:
0.8 2005-10-28
Author:
Philip Shaw

Field Summary
static java.lang.String CONTENT_TYPE
          The text content type.
 
Fields inherited from class com.mkdoc.query.AbstractResultRenderer
query
 
Fields inherited from interface com.mkdoc.query.ResultRenderer
FULL, INSERT
 
Constructor Summary
TextResultRenderer(Query query)
          Construct a renderer for a specific query.
 
Method Summary
 java.lang.String getContentType()
          Get the content type for the renderer.
protected  java.lang.StringBuffer getQueryResult(QueryResult queryResult, int mode)
          Render query results to a string buffer.
 
Methods inherited from class com.mkdoc.query.AbstractResultRenderer
getEndIndex, getQuery, getStartIndex, renderQueryResult, renderQueryResult, renderQueryResult, renderQueryResult, renderQueryResult, setQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.mkdoc.query.ResultRenderer
renderQueryResult, renderQueryResult, renderQueryResult, renderQueryResult, renderQueryResult
 

Field Detail

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
The text content type.

Since:
Version 0.1 2005-01-26
See Also:
Constant Field Values
Constructor Detail

TextResultRenderer

public TextResultRenderer(Query query)
Construct a renderer for a specific query.

Parameters:
query - The query against which the results were returned.
Since:
Version 0.5 2005-07-26
Method Detail

getQueryResult

protected final java.lang.StringBuffer getQueryResult(QueryResult queryResult,
                                                      int mode)
Render query results to a string buffer.

Specified by:
getQueryResult in class AbstractResultRenderer
Parameters:
queryResult - The query results to render.
mode - The output mode, either ResultRenderer.FULL or ResultRenderer.INSERT.
Returns:
A text formatted tabular layout of the query results.
Since:
Version 0.1 2005-01-26

getContentType

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

Specified by:
getContentType in interface ResultRenderer
Returns:
The MIME type text/plain.
Since:
Version 0.1 2005-01-26