public class QueryResults extends Iterations
| Constructor and Description |
|---|
QueryResults() |
| Modifier and Type | Method and Description |
|---|---|
static Graph |
asGraph(GraphQueryResult gqr)
Get a
Graph containing all elements obtained from the specified
query result. |
static Model |
asModel(GraphQueryResult gqr)
Get a
Model containing all elements obtained from the specified
query result. |
static boolean |
bindingSetsCompatible(BindingSet bs1,
BindingSet bs2)
Check whether two
BindingSets are compatible. |
static boolean |
equals(GraphQueryResult result1,
GraphQueryResult result2) |
static boolean |
equals(TupleQueryResult tqr1,
TupleQueryResult tqr2)
Compares the two query results by converting them to graphs and returns
true if they are equal.
|
static boolean |
isSubset(TupleQueryResult tqr1,
TupleQueryResult tqr2) |
static void |
report(GraphQueryResult gqr,
RDFHandler rdfHandler)
Reports a graph query result to an
RDFHandler. |
static void |
report(TupleQueryResult tqr,
TupleQueryResultHandler handler)
Reports a tuple query result to a
TupleQueryResultHandler. |
static Statement |
singleResult(GraphQueryResult result)
Returns a single element from the query result.
|
BindingSet |
singleResult(TupleQueryResult result)
Returns a single element from the query result.
|
addAll, asList, asSet, closeCloseable, toString, toStringpublic static Graph asGraph(GraphQueryResult gqr) throws QueryEvaluationException
Graph containing all elements obtained from the specified
query result.gqr - the GraphQueryResult to get the statements fromGraph containing all statements obtained from the
specified query result.QueryEvaluationExceptionpublic static Model asModel(GraphQueryResult gqr) throws QueryEvaluationException
Model containing all elements obtained from the specified
query result.gqr - the GraphQueryResult to get the statements fromModel containing all statements obtained from the
specified query result.QueryEvaluationExceptionpublic static Statement singleResult(GraphQueryResult result) throws QueryEvaluationException
QueryEvaluationExceptionpublic BindingSet singleResult(TupleQueryResult result) throws QueryEvaluationException
QueryEvaluationExceptionpublic static void report(TupleQueryResult tqr, TupleQueryResultHandler handler) throws TupleQueryResultHandlerException, QueryEvaluationException
TupleQueryResultHandler.tqr - The query result to report.handler - The handler to report the query result to.TupleQueryResultHandlerException - If such an exception is thrown by the used query result writer.QueryEvaluationExceptionpublic static void report(GraphQueryResult gqr, RDFHandler rdfHandler) throws RDFHandlerException, QueryEvaluationException
RDFHandler.gqr - The query result to report.rdfHandler - The handler to report the query result to.RDFHandlerException - If such an exception is thrown by the used RDF writer.QueryEvaluationExceptionpublic static boolean equals(TupleQueryResult tqr1, TupleQueryResult tqr2) throws QueryEvaluationException
QueryEvaluationExceptionpublic static boolean isSubset(TupleQueryResult tqr1, TupleQueryResult tqr2) throws QueryEvaluationException
QueryEvaluationExceptionpublic static boolean equals(GraphQueryResult result1, GraphQueryResult result2) throws QueryEvaluationException
QueryEvaluationExceptionpublic static boolean bindingSetsCompatible(BindingSet bs1, BindingSet bs2)
BindingSets are compatible. Two binding sets are
compatible if they have equal values for each binding name that occurs in
both binding sets.Copyright © 2001-2013 Aduna. All Rights Reserved.