|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.hp.hpl.jena.rdf.query.QueryResultsFormatter
Takes a QueryResult object and returns formatted (in various ways) Useful for the scripting interface. May help for display in other contexts.
Note: this is compute intensive and memory intensive. It needs to read all the results first (all the results are now in-memory - not kept here) in order to find things like the maximum length of a column value; then it needs to pass over the results again, turning them into Strings again, in order to return them.
We prefer slow and less memory intensive because it is more rebust for scripting.
Don't keep QueryResultsFormatter's around unnecessarily!
Constructor Summary | |
QueryResultsFormatter(QueryResults qresults)
Create a formatter for a QueryResults object |
Method Summary | |
void |
close()
Forcefully clearup. |
void |
consume()
This operation faithfully walks the results but does nothing with them. |
void |
dump(java.io.PrintWriter pw,
boolean format)
Write out a compact form. |
int |
numColumns()
How wide is the result table |
int |
numRows()
How deep is the result table. |
void |
printAll(java.io.PrintWriter pw,
java.lang.String colSep)
Textual representation |
void |
printAll(java.io.PrintWriter pw,
java.lang.String colSep,
java.lang.String lineEnd)
|
void |
printHTML(java.io.PrintWriter pw)
HTML representation |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QueryResultsFormatter(QueryResults qresults)
Method Detail |
public int numColumns()
public int numRows()
public void close()
public void dump(java.io.PrintWriter pw, boolean format)
public void printAll(java.io.PrintWriter pw, java.lang.String colSep)
public void printAll(java.io.PrintWriter pw, java.lang.String colSep, java.lang.String lineEnd)
public void printHTML(java.io.PrintWriter pw)
public void consume()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |