public class QueryResultCollector extends Object implements QueryResultHandler, TupleQueryResultHandler, BooleanQueryResultHandler
QueryResultHandler interface that is able to collect a single result from
either Boolean or Tuple results simultaneously.
The Lists that are returned by this interface are immutable.
| Constructor and Description |
|---|
QueryResultCollector() |
| Modifier and Type | Method and Description |
|---|---|
void |
endQueryResult() |
List<String> |
getBindingNames()
Returns a collection of binding names collected.
|
List<BindingSet> |
getBindingSets() |
boolean |
getBoolean()
If
getHandledBoolean() returns true this method returns the boolean that was last found using
handleBoolean(boolean) |
boolean |
getHandledBoolean()
Determines whether
handleBoolean(boolean) was called for this collector. |
boolean |
getHandledTuple()
Determines whether
endQueryResult() was called after the last calls to
startQueryResult(List) and optionally calls to handleSolution(BindingSet). |
List<String> |
getLinks() |
void |
handleBoolean(boolean value) |
void |
handleLinks(List<String> linkUrls) |
void |
handleSolution(BindingSet bindingSet) |
void |
startQueryResult(List<String> bindingNames) |
public void handleBoolean(boolean value)
throws QueryResultHandlerException
handleBoolean in interface QueryResultHandlerQueryResultHandlerExceptionpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException
startQueryResult in interface QueryResultHandlerTupleQueryResultHandlerExceptionpublic void handleSolution(BindingSet bindingSet) throws TupleQueryResultHandlerException
handleSolution in interface QueryResultHandlerTupleQueryResultHandlerExceptionpublic void endQueryResult()
throws TupleQueryResultHandlerException
endQueryResult in interface QueryResultHandlerTupleQueryResultHandlerExceptionpublic void handleLinks(List<String> linkUrls) throws QueryResultHandlerException
handleLinks in interface QueryResultHandlerQueryResultHandlerExceptionpublic boolean getHandledBoolean()
handleBoolean(boolean) was called for this collector.public boolean getBoolean()
throws QueryResultHandlerException
getHandledBoolean() returns true this method returns the boolean that was last found using
handleBoolean(boolean)
If getHandledBoolean() returns false this method throws a QueryResultHandlerException
indicating that a response could not be provided.
QueryResultHandlerException - If there was no boolean value collected.public boolean getHandledTuple()
endQueryResult() was called after the last calls to
startQueryResult(List) and optionally calls to handleSolution(BindingSet).endQueryResult() after the last calls to
startQueryResult(List) and handleSolution(BindingSet).public List<String> getBindingNames() throws QueryResultHandlerException
Strings that were collected as the binding names.QueryResultHandlerException - If the tuple results set was not successfully collected, as signalled by a call to
endQueryResult().public List<BindingSet> getBindingSets() throws QueryResultHandlerException
BindingSets that were collected as the tuple results.QueryResultHandlerException - If the tuple results set was not successfully collected, as signalled by a call to
endQueryResult().public List<String> getLinks()
handleLinks(List).Copyright © 2015-2018 Eclipse Foundation. All Rights Reserved.