java.lang.Object
org.apache.jena.sparql.util.QueryExecUtils
Some utilities for query processing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
exec
(Query query, DatasetGraph dsg) static void
static void
exec
(Prologue prologue, QueryExec queryExec, ResultsFormat outputFormat) static void
exec
(Prologue prologue, QueryExec queryExec, ResultsFormat outputFormat, PrintStream output) static void
static void
execute
(Op op, DatasetGraph dsg) static void
execute
(Op op, DatasetGraph dsg, ResultsFormat outputFormat) static void
execute
(Op op, DatasetGraph dsg, ResultsFormat outputFormat, PrintStream output) static void
executeQuery
(QueryExecution queryExecution) static void
executeQuery
(Prologue prologue, QueryExecution queryExecution) static void
executeQuery
(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat) static void
executeQuery
(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat, PrintStream 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.RDFNode
getAtMostOne
(QueryExecution qExec, String varname) Execute, expecting the result to be one row, one column.static org.apache.jena.rdf.model.RDFNode
getExactlyOne
(String qs, Dataset ds) Execute a query, expecting the result to be one row, one column.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.static org.apache.jena.rdf.model.RDFNode
getExactlyOne
(QueryExecution qExec, String varname) Execute, expecting the result to be one row, one column.static void
outputResultSet
(ResultSet results, Prologue prologue, ResultsFormat outputFormat, PrintStream output)
-
Constructor Details
-
QueryExecUtils
public QueryExecUtils()
-
-
Method Details
-
exec
-
exec
-
exec
-
exec
-
exec
public static void exec(Prologue prologue, QueryExec queryExec, ResultsFormat outputFormat, PrintStream 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, PrintStream output) -
execute
-
execute
-
execute
-
outputResultSet
public static void outputResultSet(ResultSet results, Prologue prologue, ResultsFormat outputFormat, PrintStream 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.
-