public class ResultSetFactory extends Object
Constructor and Description |
---|
ResultSetFactory() |
Modifier and Type | Method and Description |
---|---|
static ResultSetRewindable |
copyResults(ResultSet results)
Take a copy of a result set - the result set returns is an in-memory copy.
|
static ResultSet |
create(QueryIterator queryIterator,
List<String> vars)
Build a result set from one of ARQ's lower level query iterator.
|
static ResultSet |
fromJSON(InputStream in)
Read from an input stream which is the format of the SPARQL result set format in JSON.
|
static ResultSet |
fromRDF(Model model)
Turns an RDF model, with properties and classses from the
result set vocabulary, into a SPARQL result set.
|
static ResultSet |
fromSSE(InputStream in)
Read from an input stream which is the format of the SPARQL result set format in SSE.
|
static ResultSet |
fromTSV(InputStream in)
Read from an input stream which is the format of the SPARQL result set format in TSV.
|
static ResultSet |
fromXML(InputStream in)
Read XML which is the format of the SPARQL result set format.
|
static ResultSet |
fromXML(String str)
Read XML which is the format of the SPARQL result set format.
|
static ResultSet |
load(InputStream input,
ResultsFormat format)
Load a result set from input stream into a result set (memory backed).
|
static ResultSet |
load(String filenameOrURI)
Load a result set from file or URL into a result set (memory backed).
|
static ResultSet |
load(String filenameOrURI,
ResultsFormat format)
Load a result set from file or URL into a result set (memory backed).
|
static Model |
loadAsModel(Model model,
String filenameOrURI)
Load a result set (or any other model) from file or URL
|
static Model |
loadAsModel(Model model,
String filenameOrURI,
ResultsFormat format)
Load a result set (or any other model) from file or URL.
|
static Model |
loadAsModel(String filenameOrURI)
Load a result set (or any other model) from file or URL
|
static Model |
loadAsModel(String filenameOrURI,
ResultsFormat format)
Load a result set (or any other model) from file or URL
|
static ResultSet |
makeResults(Model model)
Turns an RDF model, with properties and classses from the
result set vocabulary, into a SPARQL result set.
|
static ResultSetRewindable |
makeRewindable(Model model)
Turns an RDF model, with properties and classses from the
result set vocabulary, into a SPARQL result set which is rewindable
(has a .reset()operation).
|
static ResultSetRewindable |
makeRewindable(ResultSet resultSet)
Turn an existing result set into a rewindable one.
|
static ResultSet |
makeSorted(ResultSet resultSet,
List<SortCondition> conditions)
Sort an existing result set.
|
static SPARQLResult |
result(String filenameOrURI)
Read in any kind of result kind (result set, boolean, graph)
Guess the syntax based on filename/URL extension.
|
static SPARQLResult |
result(String filenameOrURI,
ResultsFormat format)
Read in any kind of result kind (result set, boolean, graph)
|
public static ResultSet load(String filenameOrURI)
filenameOrURI
- public static ResultSet load(String filenameOrURI, ResultsFormat format)
filenameOrURI
- format
- public static ResultSet load(InputStream input, ResultsFormat format)
input
- format
- public static Model loadAsModel(String filenameOrURI)
filenameOrURI
- public static Model loadAsModel(Model model, String filenameOrURI)
model
- Load into this model (returned)filenameOrURI
- public static Model loadAsModel(String filenameOrURI, ResultsFormat format)
filenameOrURI
- format
- public static Model loadAsModel(Model model, String filenameOrURI, ResultsFormat format)
model
- Load into this model (returned)filenameOrURI
- format
- public static SPARQLResult result(String filenameOrURI)
public static SPARQLResult result(String filenameOrURI, ResultsFormat format)
public static ResultSet fromXML(InputStream in)
in
- InputStreampublic static ResultSet fromXML(String str)
str
- String to processpublic static ResultSet fromRDF(Model model)
model
- public static ResultSet fromJSON(InputStream in)
in
- InputStreampublic static ResultSet fromTSV(InputStream in)
in
- InputStreampublic static ResultSet fromSSE(InputStream in)
in
- InputStreampublic static ResultSet makeResults(Model model)
model
- public static ResultSetRewindable makeRewindable(Model model)
model
- public static ResultSetRewindable makeRewindable(ResultSet resultSet)
resultSet
- public static ResultSet makeSorted(ResultSet resultSet, List<SortCondition> conditions)
resultSet
- conditions
- public static ResultSetRewindable copyResults(ResultSet results)
results
- public static ResultSet create(QueryIterator queryIterator, List<String> vars)
queryIterator
- vars
- List of variables, by name, for the result setLicenced under the Apache License, Version 2.0