Package org.apache.jena.riot
Class ResultSetMgr
- java.lang.Object
-
- org.apache.jena.riot.ResultSetMgr
-
public class ResultSetMgr extends java.lang.ObjectReading and writing of Result Sets.ResultSetFormatterprovides output to text.- See Also:
ResultSetFactory,ResultSetFormatter
-
-
Constructor Summary
Constructors Constructor Description ResultSetMgr()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringasString(boolean result, Lang lang)Generate a string in the specified language/syntax for a SPARQL boolean result.static java.lang.StringasString(ResultSet resultSet, Lang lang)Generate a string in the specified language/syntax for a SPARQL result set.static ResultSetparse(java.lang.String uri, Lang hintLang, Context context)Read ResultSet.static ResultSetread(java.io.InputStream input)Read from aURL(including filenames) and produce aResultSet.static ResultSetread(java.io.InputStream input, Lang lang)static ResultSetread(java.lang.String urlOrFilename)Read from aURL(including filenames) and produce aResultSet.static ResultSetread(java.lang.String urlOrFilename, Lang lang)Read from aURL(including filenames) and produce aResultSet; the stream is expect to use syntaxlang.static booleanreadBoolean(java.io.InputStream input)Read a boolean result from the URIstatic booleanreadBoolean(java.io.InputStream input, Lang lang)Read a boolean result from the URI; the input is expect to use syntaxlangstatic booleanreadBoolean(java.lang.String urlOrFilename)Read a boolean result from the URIstatic booleanreadBoolean(java.lang.String urlOrFilename, Lang lang)Read a boolean result from the URI; the input is expect to use syntaxlangstatic voidwrite(java.io.OutputStream output, boolean result, Lang lang)Write a SPARQL boolean result to the output stream in the specified language/syntax.static voidwrite(java.io.OutputStream output, ResultSet resultSet, Lang lang)Write a SPARQL result set to the output stream in the specified language/syntax.
-
-
-
Method Detail
-
read
public static ResultSet read(java.lang.String urlOrFilename)
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
public static ResultSet read(java.lang.String urlOrFilename, Lang lang)
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
public static ResultSet read(java.io.InputStream input)
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
public static ResultSet read(java.io.InputStream input, Lang lang)
Read from anInputStreamand 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
public static boolean readBoolean(java.lang.String urlOrFilename)
Read a boolean result from the URI- Parameters:
urlOrFilename-- Returns:
- boolean
-
readBoolean
public static boolean readBoolean(java.lang.String urlOrFilename, Lang lang)Read a boolean result from the URI; the input is expect to use syntaxlang- Parameters:
urlOrFilename-lang-- Returns:
- boolean
-
readBoolean
public static boolean readBoolean(java.io.InputStream input)
Read a boolean result from the URI- Parameters:
input-- Returns:
- boolean
-
readBoolean
public static boolean readBoolean(java.io.InputStream input, Lang lang)Read a boolean result from the URI; the input is expect to use syntaxlang- Parameters:
input-lang-- Returns:
- boolean
-
parse
public static ResultSet parse(java.lang.String uri, Lang hintLang, Context context)
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
public static void write(java.io.OutputStream output, ResultSet resultSet, Lang lang)Write a SPARQL result set to the output stream in the specified language/syntax.- Parameters:
output-resultSet-lang-
-
write
public static void write(java.io.OutputStream output, boolean result, Lang lang)Write a SPARQL boolean result to the output stream in the specified language/syntax.- Parameters:
output-result-lang-
-
asString
public static java.lang.String asString(ResultSet resultSet, Lang lang)
Generate a string in the specified language/syntax for a SPARQL result set.- Parameters:
resultSet-lang-
-
asString
public static java.lang.String asString(boolean result, Lang lang)Generate a string in the specified language/syntax for a SPARQL boolean result.- Parameters:
result-lang-
-
-