Package org.eclipse.rdf4j.query.resultio
Class RDFStarDecodingQueryResultHandler
- java.lang.Object
-
- org.eclipse.rdf4j.query.resultio.RDFStarDecodingQueryResultHandler
-
- All Implemented Interfaces:
BooleanQueryResultHandler
,QueryResultHandler
,TupleQueryResultHandler
class RDFStarDecodingQueryResultHandler extends java.lang.Object implements TupleQueryResultHandler, BooleanQueryResultHandler
AQueryResultHandler
that delegates all results to another handler and processes RDF-star triples encoded as special IRIs back to RDF-star triple values.
-
-
Field Summary
Fields Modifier and Type Field Description private QueryResultHandler
delegate
-
Constructor Summary
Constructors Constructor Description RDFStarDecodingQueryResultHandler(QueryResultHandler delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endQueryResult()
Indicates the end of a sequence of solutions.void
handleBoolean(boolean value)
Handles the specified boolean value.void
handleLinks(java.util.List<java.lang.String> linkUrls)
Handles the links elements which are present in SPARQL Results JSON and SPARQL Results XML documents in the header.void
handleSolution(BindingSet bindingSet)
Handles a solution.void
startQueryResult(java.util.List<java.lang.String> bindingNames)
Indicates the start of a sequence of Solutions.
-
-
-
Field Detail
-
delegate
private final QueryResultHandler delegate
-
-
Constructor Detail
-
RDFStarDecodingQueryResultHandler
RDFStarDecodingQueryResultHandler(QueryResultHandler delegate)
-
-
Method Detail
-
handleBoolean
public void handleBoolean(boolean value) throws QueryResultHandlerException
Description copied from interface:QueryResultHandler
Handles the specified boolean value.- Specified by:
handleBoolean
in interfaceQueryResultHandler
- Parameters:
value
- The boolean value to handle.- Throws:
QueryResultHandlerException
- If there was an error during the handling of this value. This exception may be thrown if theQueryResultHandler.startQueryResult(List)
,QueryResultHandler.handleSolution(BindingSet)
orQueryResultHandler.endQueryResult()
methods were called before this method was called, and the handler cannot process both boolean and tuple results simultaneously.
-
handleLinks
public void handleLinks(java.util.List<java.lang.String> linkUrls) throws QueryResultHandlerException
Description copied from interface:QueryResultHandler
Handles the links elements which are present in SPARQL Results JSON and SPARQL Results XML documents in the header.NOTE: If the format does not support links, it must silently ignore a call to this method.
An accumulating handler should accumulate these links.
- Specified by:
handleLinks
in interfaceQueryResultHandler
- Parameters:
linkUrls
- The URLs of the links to handle.- Throws:
QueryResultHandlerException
- If there was an error handling the set of link URLs. This error is not thrown in cases where links are not supported.- See Also:
- "link"
-
startQueryResult
public void startQueryResult(java.util.List<java.lang.String> bindingNames) throws TupleQueryResultHandlerException
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
- 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.
-
endQueryResult
public void endQueryResult() throws TupleQueryResultHandlerException
Description copied from interface:QueryResultHandler
Indicates the end of a sequence of solutions.- Specified by:
endQueryResult
in interfaceQueryResultHandler
- Throws:
TupleQueryResultHandlerException
- If there was an error during the ending 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:QueryResultHandler
Handles a solution.- Specified by:
handleSolution
in interfaceQueryResultHandler
- 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.
-
-