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) 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 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
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.
-