Package org.apache.jena.sparql.util
Class QueryExecUtils
- java.lang.Object
-
- org.apache.jena.sparql.util.QueryExecUtils
-
public class QueryExecUtils extends java.lang.ObjectSome utilities for query processing.
-
-
Constructor Summary
Constructors Constructor Description QueryExecUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidexecute(Op op, DatasetGraph dsg)static voidexecute(Op op, DatasetGraph dsg, ResultsFormat outputFormat)static voidexecute(Op op, DatasetGraph dsg, ResultsFormat outputFormat, java.io.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, java.io.PrintStream output)static java.util.List<RDFNode>getAll(QueryExecution qExec, java.lang.String varname)Execute, returning all matches, which may be zero.static RDFNodegetAtMostOne(QueryExecution qExec, java.lang.String varname)Execute, expecting the result to be one row, one column.static RDFNodegetExactlyOne(java.lang.String qs, Dataset ds)Execute a query, expecting the result to be one row, one column.static RDFNodegetExactlyOne(java.lang.String qs, Model model)Execute a query, expecting the result to be one row, one column.static RDFNodegetExactlyOne(QueryExecution qExec, java.lang.String varname)Execute, expecting the result to be one row, one column.static voidoutputResultSet(ResultSet results, Prologue prologue, ResultsFormat outputFormat, java.io.PrintStream output)
-
-
-
Method Detail
-
executeQuery
public static void executeQuery(QueryExecution queryExecution)
-
executeQuery
public static void executeQuery(Prologue prologue, QueryExecution queryExecution)
-
executeQuery
public static void executeQuery(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat)
-
executeQuery
public static void executeQuery(Prologue prologue, QueryExecution queryExecution, ResultsFormat outputFormat, java.io.PrintStream output)
-
execute
public static void execute(Op op, DatasetGraph dsg)
-
execute
public static void execute(Op op, DatasetGraph dsg, ResultsFormat outputFormat)
-
execute
public static void execute(Op op, DatasetGraph dsg, ResultsFormat outputFormat, java.io.PrintStream output)
-
outputResultSet
public static void outputResultSet(ResultSet results, Prologue prologue, ResultsFormat outputFormat, java.io.PrintStream output)
-
getExactlyOne
public static RDFNode getExactlyOne(java.lang.String qs, Model model)
Execute a query, expecting the result to be one row, one column. Return that one RDFNode
-
getExactlyOne
public static RDFNode getExactlyOne(java.lang.String qs, Dataset ds)
Execute a query, expecting the result to be one row, one column. Return that one RDFNode
-
getExactlyOne
public static RDFNode getExactlyOne(QueryExecution qExec, java.lang.String varname)
Execute, expecting the result to be one row, one column. Return that one. RDFNode or throw an exception. Use withtry ( QueryExecution qExec = ....).
-
getAtMostOne
public static RDFNode getAtMostOne(QueryExecution qExec, java.lang.String varname)
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
public static java.util.List<RDFNode> getAll(QueryExecution qExec, java.lang.String varname)
Execute, returning all matches, which may be zero.
-
-