- All Superinterfaces:
Iterator<QuerySolution>
- All Known Subinterfaces:
ResultSetPeekable
,ResultSetRewindable
- All Known Implementing Classes:
RDFInput
,ResultSetAdapter
,ResultSetCheckCondition
,ResultSetCloseable
,ResultSetMem
,ResultSetOnClose
,ResultSetPeeking
,ResultSetStream
,ResultSetWrapper
Results from a query in a table-like manner for SELECT queries.
Each row corresponds to a set of bindings which fulfil the conditions
of the query. Access to the results is by variable name.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResultSet
void
close()
void
forEachRemaining
(Consumer<? super QuerySolution> action) org.apache.jena.rdf.model.Model
Get the model that resources are created against - may be nullGet the variable names for the projection.int
Return the "row" number for the current iterator itemboolean
hasNext()
Is there another result?default ResultSet
Return aResultSet
that is not connected to the original source.next()
Moves onto the next result.Move to the next binding (low level)Moves onto the next result (legacy - use .next()).default ResultSetRewindable
Convert this result set to aResultSetRewindable
.
-
Method Details
-
adapt
-
hasNext
boolean hasNext()Is there another result?- Specified by:
hasNext
in interfaceIterator<QuerySolution>
-
next
QuerySolution next()Moves onto the next result.- Specified by:
next
in interfaceIterator<QuerySolution>
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceIterator<QuerySolution>
-
nextSolution
QuerySolution nextSolution()Moves onto the next result (legacy - use .next()). -
nextBinding
Binding nextBinding()Move to the next binding (low level) -
getRowNumber
int getRowNumber()Return the "row" number for the current iterator item -
getResultVars
Get the variable names for the projection. Not all query solutions from a result have every variable defined. -
getResourceModel
org.apache.jena.rdf.model.Model getResourceModel()Get the model that resources are created against - may be null -
rewindable
Convert this result set to aResultSetRewindable
.Warning: this is likely a copy:
- "this" result set is consumed and not reusable.
- the copy is in-memory
Example of use:
ResultSetRewindable rs = queryExecution.execSelect().rewindable();
-
materialise
Return aResultSet
that is not connected to the original source. This consumes this ResultSet and produces another one. -
close
void close()
-