- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturn a string that has the result set serialized as a text tablestatic StringReturn a string that has the result set serialized as a text tablestatic StringasXMLString(boolean booleanResult) Return a string that has the result set serialized as XML (not RDF)static StringasXMLString(boolean booleanResult, String stylesheet) Return a string that has the result set serialized as XML (not RDF)static StringasXMLString(ResultSet qresults) Return a string that has the result set serialized as XML (not RDF)static StringasXMLString(ResultSet qresults, String stylesheet) Return a string that has the result set serialized as XML (not RDF) with a style sheet directive inserted into the XML.static intThis operation faithfully walks the results but does nothing with them.static voidout(boolean answer) Output an ASK answerstatic voidout(OutputStream out, boolean answer) Output an ASK answerstatic voidout(OutputStream out, ResultSet qresults) Output a result set in a text format.static voidout(OutputStream out, ResultSet resultSet, org.apache.jena.shared.PrefixMapping pmap) Output a result set in a text format.static voidout(OutputStream out, ResultSet resultSet, Prologue prologue) Output a result set in a text format.static voidOutput a result set in a text format.static voidOutput a result set in a text format.static voidOutput a result set in a text format.static voidOutput a result set in a text format.static voidstatic voidoutput(OutputStream outStream, boolean result, Lang resultFormat) static voidoutput(OutputStream outStream, Iterator<JsonObject> jsonItems) Output an iterator of JSON values.static voidoutput(OutputStream outStream, ResultSet resultSet, Lang resultFormat) static voidoutput(OutputStream outStream, ResultSet resultSet, ResultsFormat rFmt) Output a ResultSet in some format.static voidstatic voidoutput(ResultSet resultSet, ResultsFormat rFmt) Output a ResultSet in some format.static voidoutputAsCSV(boolean booleanResult) Output a boolean result in CSV formatstatic voidoutputAsCSV(OutputStream outStream, boolean booleanResult) Output a boolean result in CSV formatstatic voidoutputAsCSV(OutputStream outStream, ResultSet resultSet) Output a result set in CSV formatstatic voidoutputAsCSV(ResultSet resultSet) Output a result set in CSV formatstatic voidoutputAsJSON(boolean booleanResult) Output a result set in the JSON format Format: Serializing SPARQL Query Results in JSON JSON: http://json.org/static voidoutputAsJSON(OutputStream outStream, boolean booleanResult) Output a result set in the JSON format Format: Serializing SPARQL Query Results in JSON JSON: http://json.org/static voidoutputAsJSON(OutputStream outStream, ResultSet resultSet) Output a result set in the JSON format Format: Serializing SPARQL Query Results in JSON JSON: http://json.org/static voidoutputAsJSON(ResultSet resultSet) Output a result set in the JSON format Format: Serializing SPARQL Query Results in JSON JSON: http://json.org/static voidoutputAsSSE(boolean booleanResult) Output a boolean result in the SSE format Format: SSEstatic voidoutputAsSSE(OutputStream outStream, boolean booleanResult) Output a boolean result in the SSE format Format: SSEstatic voidoutputAsSSE(OutputStream outStream, ResultSet resultSet) Output a result set in the SSE format Format: SSEstatic voidoutputAsSSE(OutputStream outStream, ResultSet resultSet, Prologue prologue) Output a result set in the SSE format Format: SSEstatic voidoutputAsSSE(ResultSet resultSet) Output a result set in the SSE format Format: SSEstatic voidoutputAsSSE(ResultSet resultSet, Prologue prologue) Output a result set in the SSE format Format: SSEstatic voidoutputAsTSV(boolean booleanResult) Output a boolean result in TSV (tab separated values) formatstatic voidoutputAsTSV(OutputStream outStream, boolean booleanResult) Output a boolean result in TSV formatstatic voidoutputAsTSV(OutputStream outStream, ResultSet resultSet) Output a result set in TSV formatstatic voidoutputAsTSV(ResultSet resultSet) Output a result set in TSV formatstatic voidoutputAsXML(boolean booleanResult) Output a boolean result in the XML formatstatic voidoutputAsXML(boolean booleanResult, String stylesheet) Output a boolean result in the XML formatstatic voidoutputAsXML(OutputStream outStream, boolean booleanResult) Output a boolean result in the XML formatstatic voidoutputAsXML(OutputStream outStream, boolean booleanResult, String stylesheet) Output a boolean result in the XML formatstatic voidoutputAsXML(OutputStream outStream, ResultSet qresults) Output a result set in the XML formatstatic voidoutputAsXML(OutputStream outStream, ResultSet qresults, String stylesheet) Output a result set in the XML format, inserting a style sheet in the XML outputstatic voidoutputAsXML(ResultSet qresults) Output a result set in the XML formatstatic voidoutputAsXML(ResultSet qresults, String stylesheet) Output a result set in the XML format, inserting a style sheet in the XML outputstatic List<QuerySolution>Turn the result set into a java.util.List
-
Method Details
-
out
Output a result set in a text format. The result set is consumed. Use @see{ResultSetFactory.makeRewindable(ResultSet)} for a rewindable one.This caches the entire results in memory in order to determine the appropriate column widths and therefore may exhaust memory for large results
- Parameters:
qresults- result set
-
out
Output a result set in a text format. The result set is consumed. Use @see{ResultSetFactory.makeRewindable(ResultSet)} for a rewindable one.This caches the entire results in memory in order to determine the appropriate column widths and therefore may exhaust memory for large results
- Parameters:
out- OutputStreamqresults- result set
-
out
Output a result set in a text format. The result set is consumed. Use @see{ResultSetFactory.makeRewindable(ResultSet)} for a rewindable one.This caches the entire results in memory in order to determine the appropriate column widths and therefore may exhaust memory for large results
- Parameters:
qresults- result setquery- May be used to abbreviate URIs
-
out
Output a result set in a text format. The result set is consumed. Use @see{ResultSetFactory.makeRewindable(ResultSet)} for a rewindable one.This caches the entire results in memory in order to determine the appropriate column widths and therefore may exhaust memory for large results
- Parameters:
qresults- result setprologue- May be used to abbreviate URIs
-
out
Output a result set in a text format. The result set is consumed. Use @see{ResultSetFactory.makeRewindable(ResultSet)} for a rewindable one.This caches the entire results in memory in order to determine the appropriate column widths and therefore may exhaust memory for large results
- Parameters:
out- OutputStreamresultSet- result setprologue- Prologue, used to abbreviate IRIs
-
out
public static void out(boolean answer) Output an ASK answer- Parameters:
answer- The boolean answer
-
out
Output an ASK answer- Parameters:
out- OutputStreamanswer- The boolean answer
-
asText
Return a string that has the result set serialized as a text tableThis caches the entire results in memory in order to determine the appropriate column widths and therefore may exhaust memory for large results
- Parameters:
qresults- result set- Returns:
- string
-
asText
Return a string that has the result set serialized as a text tableThis caches the entire results in memory in order to determine the appropriate column widths and therefore may exhaust memory for large results
- Parameters:
qresults- result setprologue- Prologue, used to abbreviate IRIs- Returns:
- string
-
consume
This operation faithfully walks the results but does nothing with them.- Returns:
- The count of the number of solutions.
-
toList
Turn the result set into a java.util.List- Parameters:
resultSet- The result set- Returns:
- List of QuerySolutions
-
output
Output a ResultSet in some format.- Parameters:
resultSet- Result setrFmt- A format to encode the result set in
-
output
Output a ResultSet in some format. To get detailed control over each format, call the appropriate operation directly.- Parameters:
outStream- OutputresultSet- Result setrFmt- A format to encode the result set in
-
output
-
output
-
output
-
output
-
output
Output an iterator of JSON values.- Parameters:
outStream- output streamjsonItems- The JSON values
-
outputAsXML
Output a result set in the XML format- Parameters:
qresults- result set
-
outputAsXML
Output a result set in the XML format- Parameters:
outStream- output streamqresults- result set
-
outputAsXML
Output a result set in the XML format, inserting a style sheet in the XML output- Parameters:
qresults- result setstylesheet- The URL of the stylesheet
-
outputAsXML
Output a result set in the XML format, inserting a style sheet in the XML output- Parameters:
outStream- output streamqresults- result setstylesheet- The URL of the stylesheet
-
outputAsXML
public static void outputAsXML(boolean booleanResult) Output a boolean result in the XML format- Parameters:
booleanResult- The boolean result to encode
-
outputAsXML
Output a boolean result in the XML format- Parameters:
outStream- output streambooleanResult- The boolean result to encode
-
outputAsXML
Output a boolean result in the XML format- Parameters:
booleanResult-stylesheet- The URL of the stylesheet
-
outputAsXML
Output a boolean result in the XML format- Parameters:
outStream- output streambooleanResult-stylesheet- The URL of the stylesheet
-
asXMLString
Return a string that has the result set serialized as XML (not RDF)This builds the string in memory which can lead to memory exhaustion for large results. It is generally better to use the
outputAsXML(OutputStream, ResultSet)overload instead- Parameters:
qresults- result set- Returns:
- string
-
asXMLString
Return a string that has the result set serialized as XML (not RDF) with a style sheet directive inserted into the XML.This builds the string in memory which can lead to memory exhaustion for large results. It is generally better to use the
outputAsXML(OutputStream, ResultSet, String)overload instead- Parameters:
qresults- result setstylesheet-- Returns:
- string
-
asXMLString
Return a string that has the result set serialized as XML (not RDF)This builds the string in memory which can lead to memory exhaustion for large results. It is generally better to use the
outputAsXML(OutputStream, boolean)overload instead- Parameters:
booleanResult- The boolean result to encode- Returns:
- string
-
asXMLString
Return a string that has the result set serialized as XML (not RDF)This builds the string in memory which can lead to memory exhaustion for large results. It is generally better to use the
outputAsXML(OutputStream, boolean, String)overload instead- Parameters:
booleanResult- The boolean result to encodestylesheet-- Returns:
- string
-
outputAsJSON
Output a result set in the JSON format Format: Serializing SPARQL Query Results in JSON JSON: http://json.org/- Parameters:
resultSet- result set
-
outputAsJSON
Output a result set in the JSON format Format: Serializing SPARQL Query Results in JSON JSON: http://json.org/- Parameters:
outStream- output streamresultSet- result set
-
outputAsJSON
public static void outputAsJSON(boolean booleanResult) Output a result set in the JSON format Format: Serializing SPARQL Query Results in JSON JSON: http://json.org/- Parameters:
booleanResult- The boolean result to encode
-
outputAsJSON
Output a result set in the JSON format Format: Serializing SPARQL Query Results in JSON JSON: http://json.org/- Parameters:
outStream- output streambooleanResult- The boolean result to encode
-
outputAsSSE
public static void outputAsSSE(boolean booleanResult) Output a boolean result in the SSE format Format: SSE- Parameters:
booleanResult- The boolean result to encode
-
outputAsSSE
Output a boolean result in the SSE format Format: SSE- Parameters:
outStream- output streambooleanResult- The boolean result to encode
-
outputAsSSE
Output a result set in the SSE format Format: SSE- Parameters:
resultSet- result set
-
outputAsSSE
Output a result set in the SSE format Format: SSE- Parameters:
resultSet- result set
-
outputAsSSE
Output a result set in the SSE format Format: SSE- Parameters:
outStream- The output streamresultSet- The result set
-
outputAsSSE
Output a result set in the SSE format Format: SSE- Parameters:
outStream- output streamresultSet- result setprologue-
-
outputAsCSV
public static void outputAsCSV(boolean booleanResult) Output a boolean result in CSV format- Parameters:
booleanResult- The boolean result to encode
-
outputAsCSV
Output a boolean result in CSV format- Parameters:
outStream- output streambooleanResult- The boolean result to encode
-
outputAsCSV
Output a result set in CSV format- Parameters:
resultSet- result set
-
outputAsCSV
Output a result set in CSV format- Parameters:
outStream- The output streamresultSet- The result set
-
outputAsTSV
public static void outputAsTSV(boolean booleanResult) Output a boolean result in TSV (tab separated values) format- Parameters:
booleanResult- The boolean result to encode
-
outputAsTSV
Output a boolean result in TSV format- Parameters:
outStream- output streambooleanResult- The boolean result to encode
-
outputAsTSV
Output a result set in TSV format- Parameters:
resultSet- result set
-
outputAsTSV
Output a result set in TSV format- Parameters:
outStream- The output streamresultSet- The result set
-