public class ResultSetMgr extends Object
ResultSetFormatter provides output to text.ResultSetFactory,
ResultSetFormatter| Constructor and Description |
|---|
ResultSetMgr() |
| Modifier and Type | Method and Description |
|---|---|
static String |
asString(boolean result,
Lang lang)
Generate a string in the specified language/syntax for a SPARQL boolean result.
|
static String |
asString(ResultSet resultSet,
Lang lang)
Generate a string in the specified language/syntax for a SPARQL result set.
|
static ResultSet |
parse(String uri,
Lang hintLang,
Context context)
Read ResultSet.
|
static ResultSet |
read(InputStream input)
Read from a
URL (including filenames) and produce a ResultSet. |
static ResultSet |
read(InputStream input,
Lang lang)
|
static ResultSet |
read(String urlOrFilename)
Read from a
URL (including filenames) and produce a ResultSet. |
static ResultSet |
read(String urlOrFilename,
Lang lang)
Read from a
URL (including filenames) and produce a ResultSet;
the stream is expect to use syntax lang. |
static boolean |
readBoolean(InputStream input)
Read a boolean result from the URI
|
static boolean |
readBoolean(InputStream input,
Lang lang)
Read a boolean result from the URI;
the input is expect to use syntax
lang |
static boolean |
readBoolean(String urlOrFilename)
Read a boolean result from the URI
|
static boolean |
readBoolean(String urlOrFilename,
Lang lang)
Read a boolean result from the URI;
the input is expect to use syntax
lang |
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.
|
public static ResultSet read(String urlOrFilename)
URL (including filenames) and produce a ResultSet.
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 the InputStream.
urlOrFilename - public static ResultSet read(String urlOrFilename, Lang lang)
URL (including filenames) and produce a ResultSet;
the stream is expect to use syntax lang. 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 the InputStream.urlOrFilename - lang - public static ResultSet read(InputStream input)
URL (including filenames) and produce a ResultSet.
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 the InputStream.
input - public static ResultSet read(InputStream input, Lang lang)
InputStream and produce a ResultSet;
the stream is expect to use syntax lang. 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 the InputStream.input - lang - public static boolean readBoolean(String urlOrFilename)
urlOrFilename - public static boolean readBoolean(String urlOrFilename, Lang lang)
langurlOrFilename - lang - public static boolean readBoolean(InputStream input)
input - public static boolean readBoolean(InputStream input, Lang lang)
langinput - lang - public static ResultSet parse(String uri, Lang hintLang, Context context)
uri - URI to read from (includes file: and a plain file name).hintLang - Hint for the syntaxcontext - Content object to control reading process.public static void write(OutputStream output, ResultSet resultSet, Lang lang)
output - resultSet - lang - public static void write(OutputStream output, boolean result, Lang lang)
output - result - lang - public static String asString(ResultSet resultSet, Lang lang)
resultSet - lang - Licenced under the Apache License, Version 2.0