java.lang.Object
org.apache.jena.sparql.util.QueryExecUtils
Some utilities for query processing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidexec(Query query, DatasetGraph dsg) static voidstatic voidexec(Prologue prologue, QueryExec queryExec, ResultsFormat outputFormat) static voidexec(Prologue prologue, QueryExec queryExec, ResultsFormat outputFormat, PrintStream output) static voidstatic voidexecute(Op op, DatasetGraph dsg) static voidexecute(Op op, DatasetGraph dsg, ResultsFormat outputFormat) static voidexecute(Op op, DatasetGraph dsg, ResultsFormat outputFormat, PrintStream 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, PrintStream output) getAll(QueryExecution qExec, String varname) Execute, returning all matches, which may be zero.static RDFNodegetAtMostOne(QueryExecution qExec, String varname) Execute, expecting the result to be one row, one column.static RDFNodegetExactlyOne(String qs, Dataset ds) Execute a query, expecting the result to be one row, one column.static RDFNodegetExactlyOne(String qs, Model model) Execute a query, expecting the result to be one row, one column.static RDFNodegetExactlyOne(QueryExecution qExec, String varname) Execute, expecting the result to be one row, one column.static voidoutputResultSet(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
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.
-