com.mkdoc.query
Class XhtmlResultRenderer

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

public class XhtmlResultRenderer
extends AbstractResultRenderer
implements ResultRenderer

Renders Sesame query results to XHTML.

Version:
0.7 2005-10-12
Author:
Philip Shaw
To do:
Optimise markup literal output.

Field Summary
static java.lang.String CONTENT_TYPE
          The text content type.
static java.lang.String FOOTER
          An XHTML document footer.
static java.lang.String HEADER
          An XHTML document header.
static int LAG
          The trailing "lag" behind the current results page.
static int PAGE_LIMIT
          The maximum number of pages in the results navigation.
 
Fields inherited from class com.mkdoc.query.AbstractResultRenderer
query
 
Fields inherited from interface com.mkdoc.query.ResultRenderer
FULL, INSERT
 
Constructor Summary
XhtmlResultRenderer(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 text content type.

Since:
Version 0.1 2005-02-02
See Also:
Constant Field Values

HEADER

public static final java.lang.String HEADER
An XHTML document header.

Since:
Version 0.1 2005-02-02
See Also:
Constant Field Values

FOOTER

public static final java.lang.String FOOTER
An XHTML document footer.

Since:
Version 0.1 2005-02-02
See Also:
Constant Field Values

PAGE_LIMIT

public static final int PAGE_LIMIT
The maximum number of pages in the results navigation.

Since:
Version 0.1 2005-02-02
See Also:
Constant Field Values

LAG

public static final int LAG
The trailing "lag" behind the current results page.

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

XhtmlResultRenderer

public XhtmlResultRenderer(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 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-02-02

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-02-02