Package org.eclipse.rdf4j.query.impl
Class TupleQueryResultBuilder
java.lang.Object
org.eclipse.rdf4j.query.AbstractTupleQueryResultHandler
org.eclipse.rdf4j.query.impl.TupleQueryResultBuilder
- All Implemented Interfaces:
QueryResultHandler
,TupleQueryResultHandler
A TupleQueryResultHandler that can be used to create a TupleQueryResult object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleSolution
(BindingSet bindingSet) Handles a solution.void
startQueryResult
(List<String> bindingNames) Indicates the start of a sequence of Solutions.Methods inherited from class org.eclipse.rdf4j.query.AbstractTupleQueryResultHandler
endQueryResult, handleBoolean, handleLinks
-
Constructor Details
-
TupleQueryResultBuilder
public TupleQueryResultBuilder()
-
-
Method Details
-
startQueryResult
Description copied from interface:QueryResultHandler
Indicates the start of a sequence of Solutions. The supplied bindingNames are an indication of the values that are in the Solutions. For example, a SPARQL query like select ?X ?Y where { ?X ?P ?Y } will have binding names X and Y.- Specified by:
startQueryResult
in interfaceQueryResultHandler
- Overrides:
startQueryResult
in classAbstractTupleQueryResultHandler
- Parameters:
bindingNames
- An ordered set of binding names.- Throws:
TupleQueryResultHandlerException
- If there was an error during the starting of the query result handler. This exception may be thrown if theQueryResultHandler.handleBoolean(boolean)
method was called before this method and the handler cannot process both boolean and tuple results simultaneously.
-
handleSolution
Description copied from interface:QueryResultHandler
Handles a solution.- Specified by:
handleSolution
in interfaceQueryResultHandler
- Overrides:
handleSolution
in classAbstractTupleQueryResultHandler
- Parameters:
bindingSet
- A single set of tuple results, with binding names bound to values. Each of the binding names in the solution must have previously been registered with theQueryResultHandler.startQueryResult(List)
method.- Throws:
TupleQueryResultHandlerException
- If there was an error during the handling of the query solution. This exception may be thrown if theQueryResultHandler.handleBoolean(boolean)
method was called before this method and the handler cannot process both boolean and tuple results simultaneously.
-
getQueryResult
-