java.lang.Object
org.apache.jena.sparql.util.QueryExecUtils
Some utilities for query processing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidexec(Query query, DatasetGraph dsg) static voidstatic voidexec(Prologue prologue, QueryExec queryExec, ResultsFormat outputFormat) static voidexec(Prologue prologue, QueryExec queryExec, ResultsFormat outputFormat, OutputStream output) static voidstatic voidexecute(Op op, DatasetGraph dsg) static voidexecute(Op op, DatasetGraph dsg, ResultsFormat outputFormat) static voidexecute(Op op, DatasetGraph dsg, ResultsFormat outputFormat, OutputStream output) static voidexecuteQuery(QueryExecution queryExecution) static voidexecuteQuery(Prologue prologue, QueryExecution queryExecution) static voidexecuteQuery(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat) static voidexecuteQuery(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat, OutputStream output) static List<org.apache.jena.rdf.model.RDFNode> getAll(QueryExecution qExec, String varname) Execute, returning all matches, which may be zero.static org.apache.jena.rdf.model.RDFNodegetAtMostOne(QueryExecution qExec, String varname) Execute, expecting the result to be one row, one column.static org.apache.jena.rdf.model.RDFNodegetExactlyOne(String qs, Dataset ds) Execute a query, expecting the result to be one row, one column.static org.apache.jena.rdf.model.RDFNodegetExactlyOne(String qs, org.apache.jena.rdf.model.Model model) Execute a query, expecting the result to be one row, one column.static org.apache.jena.rdf.model.RDFNodegetExactlyOne(QueryExecution qExec, String varname) Execute, expecting the result to be one row, one column.static voidoutput(SPARQLResult result, ResultsFormat outputFormat, OutputStream output) static voidoutputResultSet(ResultSet resultSet, Prologue prologue, ResultsFormat outputFormat, OutputStream output)
-
Constructor Details
-
QueryExecUtils
public QueryExecUtils()
-
-
Method Details
-
exec
-
exec
-
exec
-
exec
-
exec
-
exec
public static void exec(Prologue prologue, QueryExec queryExec, ResultsFormat outputFormat, OutputStream output) -
executeQuery
-
executeQuery
-
executeQuery
public static void executeQuery(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat) -
executeQuery
public static void executeQuery(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat, OutputStream output) -
execute
-
execute
-
execute
public static void execute(Op op, DatasetGraph dsg, ResultsFormat outputFormat, OutputStream output) -
output
-
outputResultSet
public static void outputResultSet(ResultSet resultSet, Prologue prologue, ResultsFormat outputFormat, OutputStream output) -
getExactlyOne
public static org.apache.jena.rdf.model.RDFNode getExactlyOne(String qs, org.apache.jena.rdf.model.Model model) Execute a query, expecting the result to be one row, one column. Return that one RDFNode -
getExactlyOne
Execute a query, expecting the result to be one row, one column. Return that one RDFNode -
getExactlyOne
Execute, expecting the result to be one row, one column. Return that one. RDFNode or throw an exception. Use withtry ( QueryExecution qExec = ....). -
getAtMostOne
Execute, expecting the result to be one row, one column. Return that one RDFNode or null. Throw exception if more than one. Use withtry ( QueryExecution qExec = ....). -
getAll
Execute, returning all matches, which may be zero.
-