public class TextTableQueryResultWriter extends AbstractDataExporterQueryResultWriter
TupleQueryResultWriter interface to output a nice looking text table with many
customization options. The column widths can be calculated by prefetching a specified amount of results with the
possibility of specifying minimum and maximum widths to override automatically calculated values. Any value that
overflows the column will be printed on multiple lines where the other values in the same row will be top-aligned.| Modifier and Type | Field and Description |
|---|---|
static org.openrdf.query.resultio.TupleQueryResultWriterFactory |
FACTORY
Factory to create instances of this writer which is registered to
TupleQueryResultWriterRegistry on class
load. |
static org.openrdf.query.resultio.TupleQueryResultFormat |
FORMAT
The format to identify this writer with name "TEXT", mime type "text/plain" and file extension "txt".
|
| Constructor and Description |
|---|
TextTableQueryResultWriter(OutputStream theOut) |
| Modifier and Type | Method and Description |
|---|---|
protected com.brsanthu.dataexporter.DataExporter |
createExporter()
Creates the exporter and sets its options
|
void |
endQueryResult() |
long |
getStartTime()
Gets the current start time that will be used to display query execution time if summary is shown at the end.
|
org.openrdf.query.resultio.TupleQueryResultFormat |
getTupleQueryResultFormat() |
boolean |
isShowSummary()
Returns true is the number of results and query execution time will be shown at the end.
|
void |
setShowSummary(boolean mShowSummary)
Turns on showing query summary at the end of results which includes the number of results and query execution
time.
|
void |
setStartTime(long theStartTime)
Sets the current start time that will be used to display query execution time if summary is shown at the end.
|
addNamespaces, handleSolution, startQueryResultendHeader, getQueryResultFormat, getSupportedSettings, getWriterConfig, handleBoolean, handleLinks, handleNamespace, handleStylesheet, setWriterConfig, startDocument, startHeaderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final org.openrdf.query.resultio.TupleQueryResultFormat FORMAT
public static final org.openrdf.query.resultio.TupleQueryResultWriterFactory FACTORY
TupleQueryResultWriterRegistry on class
load.public TextTableQueryResultWriter(OutputStream theOut)
public boolean isShowSummary()
public void setShowSummary(boolean mShowSummary)
public long getStartTime()
public void setStartTime(long theStartTime)
public void endQueryResult()
throws org.openrdf.query.TupleQueryResultHandlerException
endQueryResult in interface org.openrdf.query.QueryResultHandlerendQueryResult in class AbstractDataExporterQueryResultWriterorg.openrdf.query.TupleQueryResultHandlerExceptionprotected com.brsanthu.dataexporter.DataExporter createExporter()
AbstractDataExporterQueryResultWritercreateExporter in class AbstractDataExporterQueryResultWriterpublic org.openrdf.query.resultio.TupleQueryResultFormat getTupleQueryResultFormat()
Copyright © 2010-2016 Stardog Union. All Rights Reserved.