com.mkdoc.query
Class RssResultRenderer

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

public class RssResultRenderer
extends AbstractResultRenderer
implements ResultRenderer

A result renderer for RSS output.

Version:
0.2 2005-10-11
Author:
Philip Shaw
To do:
Need some way to configure the output namespaces based on the application profile, so that results metadata can be inserted in the feed.

Field Summary
static java.lang.String CONTENT_TYPE
          The RSS content type.
static java.lang.String FOOTER
          The close RDF document element.
static java.lang.String HEADER
          The XML header and document element.
 
Fields inherited from class com.mkdoc.query.AbstractResultRenderer
query
 
Fields inherited from interface com.mkdoc.query.ResultRenderer
FULL, INSERT
 
Constructor Summary
RssResultRenderer(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 a query result 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 RSS content type.

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

HEADER

public static final java.lang.String HEADER
The XML header and document element.

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

FOOTER

public static final java.lang.String FOOTER
The close RDF document element.

Since:
Version 0.2 2005-10-28
See Also:
Constant Field Values
Constructor Detail

RssResultRenderer

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

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

getQueryResult

protected final java.lang.StringBuffer getQueryResult(QueryResult queryResult,
                                                      int mode)
Render a query result 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-07-29

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/html.
Since:
Version 0.1 2005-07-29