Interface QueryResultHandler

All Known Subinterfaces:
BooleanQueryResultHandler, BooleanQueryResultWriter, QueryResultWriter, TupleQueryResultHandler, TupleQueryResultWriter
All Known Implementing Classes:
AbstractQueryResultWriter, AbstractTupleQueryResultHandler, BackgroundTupleResult, BinaryQueryResultWriter, BooleanTextWriter, ConsoleQueryResultWriter, DAWGTestResultSetWriter, QueryResultCollector, SPARQLBooleanJSONWriter, SPARQLBooleanXMLWriter, SPARQLResultsCSVWriter, SPARQLResultsJSONWriter, SPARQLResultsTSVWriter, SPARQLResultsXMLWriter, SPARQLStarResultsJSONWriter, SPARQLStarResultsTSVWriter, SPARQLStarResultsXMLWriter, TupleQueryResultBuilder

public interface QueryResultHandler
The super class of all handlers for processing query results.

This interface contains methods for optionally processing both boolean and tuple results sets simultaneously, but there are no guarantees that an implementation will be able to process these values together. If a method is not supported then an UnsupportedOperationException will be thrown to indicate this failure. This failure may be prevented by checking for whether the class implements BooleanQueryResultHandler or TupleQueryResultHandler, for boolean and tuple results support respectively.

If both boolean and tuple results are supported but they are not able to to be processed simultaneously, then a checked exception, either BooleanQueryResultHandlerException or TupleQueryResultHandlerException, will be thrown to indicate this failure when the relevant methods are called.

Author:
Peter Ansell
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Indicates the end of a sequence of solutions.
    void
    handleBoolean(boolean value)
    Handles the specified boolean value.
    void
    handleLinks(List<String> linkUrls)
    Handles the links elements which are present in SPARQL Results JSON and SPARQL Results XML documents in the header.
    void
    Handles a solution.
    void
    startQueryResult(List<String> bindingNames)
    Indicates the start of a sequence of Solutions.