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
public class TupleQueryResultBuilder extends AbstractTupleQueryResultHandler
A TupleQueryResultHandler that can be used to create a TupleQueryResult object.
-
-
Constructor Summary
Constructors Constructor Description TupleQueryResultBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TupleQueryResultgetQueryResult()voidhandleSolution(BindingSet bindingSet)Handles a solution.voidstartQueryResult(List<String> bindingNames)Indicates the start of a sequence of Solutions.-
Methods inherited from class org.eclipse.rdf4j.query.AbstractTupleQueryResultHandler
endQueryResult, handleBoolean, handleLinks
-
-
-
-
Method Detail
-
startQueryResult
public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException
Description copied from interface:QueryResultHandlerIndicates 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:
startQueryResultin interfaceQueryResultHandler- Overrides:
startQueryResultin 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
public void handleSolution(BindingSet bindingSet) throws TupleQueryResultHandlerException
Description copied from interface:QueryResultHandlerHandles a solution.- Specified by:
handleSolutionin interfaceQueryResultHandler- Overrides:
handleSolutionin 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
public TupleQueryResult getQueryResult()
-
-