java.lang.Object
org.apache.jena.riot.ResultSetMgr
Reading and writing of Result Sets.
ResultSetFormatter
provides output to text.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Generate a string in the specified language/syntax for a SPARQL boolean result.static String
Generate a string in the specified language/syntax for a SPARQL result set.static ResultSet
Read ResultSet.static ResultSet
read
(InputStream input) Read from aURL
(including filenames) and produce aResultSet
.static ResultSet
read
(InputStream input, Lang lang) static ResultSet
Read from aURL
(including filenames) and produce aResultSet
.static ResultSet
Read from aURL
(including filenames) and produce aResultSet
; the stream is expect to use syntaxlang
.static boolean
readBoolean
(InputStream input) Read a boolean result from the URIstatic boolean
readBoolean
(InputStream input, Lang lang) Read a boolean result from the URI; the input is expect to use syntaxlang
static boolean
readBoolean
(String urlOrFilename) Read a boolean result from the URIstatic boolean
readBoolean
(String urlOrFilename, Lang lang) Read a boolean result from the URI; the input is expect to use syntaxlang
static void
write
(OutputStream output, boolean result, Lang lang) Write a SPARQL boolean result to the output stream in the specified language/syntax.static void
write
(OutputStream output, ResultSet resultSet, Lang lang) Write a SPARQL result set to the output stream in the specified language/syntax.
-
Constructor Details
-
ResultSetMgr
public ResultSetMgr()
-
-
Method Details
-
read
Read from aURL
(including filenames) and produce aResultSet
. Note that returned result set may stream and so the input stream be read while the ResultSet is used.See
ResultSetFactory.copyResults(ResultSet)
for a ResultSet that is detached from theInputStream
.- Parameters:
urlOrFilename
-- Returns:
- ResultSet
-
read
Read from aURL
(including filenames) and produce aResultSet
; the stream is expect to use syntaxlang
. Note that returned result set may stream and so the input stream be read while the ResultSet is used. SeeResultSetFactory.copyResults(ResultSet)
for a ResultSet that is detached from theInputStream
.- Parameters:
urlOrFilename
-lang
-- Returns:
- ResultSet
-
read
Read from aURL
(including filenames) and produce aResultSet
. Note that returned result set may stream and so the input stream be read while the ResultSet is used.See
ResultSetFactory.copyResults(ResultSet)
for a ResultSet that is detached from theInputStream
.- Parameters:
input
-- Returns:
- ResultSet
-
read
Read from anInputStream
and produce aResultSet
; the stream is expect to use syntaxlang
. Note that returned result set may stream and so the input stream be read while the ResultSet is used. SeeResultSetFactory.copyResults(ResultSet)
for a ResultSet that is detached from theInputStream
.- Parameters:
input
-lang
-- Returns:
- ResultSet
-
readBoolean
Read a boolean result from the URI- Parameters:
urlOrFilename
-- Returns:
- boolean
-
readBoolean
Read a boolean result from the URI; the input is expect to use syntaxlang
- Parameters:
urlOrFilename
-lang
-- Returns:
- boolean
-
readBoolean
Read a boolean result from the URI- Parameters:
input
-- Returns:
- boolean
-
readBoolean
Read a boolean result from the URI; the input is expect to use syntaxlang
- Parameters:
input
-lang
-- Returns:
- boolean
-
parse
Read ResultSet.- Parameters:
uri
- URI to read from (includes file: and a plain file name).hintLang
- Hint for the syntaxcontext
- Content object to control reading process.
-
write
Write a SPARQL result set to the output stream in the specified language/syntax.- Parameters:
output
-resultSet
-lang
-
-
write
Write a SPARQL boolean result to the output stream in the specified language/syntax.- Parameters:
output
-result
-lang
-
-
asString
Generate a string in the specified language/syntax for a SPARQL result set.- Parameters:
resultSet
-lang
-
-
asString
Generate a string in the specified language/syntax for a SPARQL boolean result.- Parameters:
result
-lang
-
-