Package com.stardog.stark.query.io

# Interface QueryResultWriter<T>

All Superinterfaces:
  `QueryResultHandler<T>`

All Known Subinterfaces:
  `BooleanQueryResultWriter`, `PathQueryResultWriter`, `SelectQueryResultWriter`

All Known Implementing Classes:
  `AbstractDataExporterQueryResultWriter`, `AbstractSPARQLJSONWriter`, `AbstractSPARQLXMLWriter`, `BinarySelectQueryResultWriter`, `HTMLQueryResultWriter`, `SPARQLCSVResultWriter`, `SPARQLJSONBooleanResultWriter`, `SPARQLJSONSelectResultWriter`, `SPARQLTSVResultWriter`, `SPARQLXMLBooleanResultWriter`, `SPARQLXMLSelectResultWriter`, `TextBooleanQueryResultWriter`, `TextPathQueryResultWriter`, `TextTablePathQueryResultWriter`, `TextTableQueryResultWriter`

public interface QueryResultWriter<T> extends QueryResultHandler<T>

Since:
  1.0
Version:
  1.0
Author:
  Michael Grove

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `end()`
  Signal that query processing has completed
  `QueryResultFormat`
  `format()`
  The `format` this writer will serialize output in
  `void`
  `handle(T theResult)`
  Handle a result to a query
  `void`
  `links(List<String> theLinks)`
  Handle the set of links from the result
  `void`
  `namespace(String thePrefix, String theIRI)`
  `void`
  `start()`
  Indicates that writing has begun.

- ## Method Details

  - ### end

    void end() throws ResultWritingFailed
    Description copied from interface: `QueryResultHandler`
    Signal that query processing has completed
    Specified by:
      `end` in interface `QueryResultHandler<T>`
    Throws:
      `ResultWritingFailed`

  - ### links

    void links(@Nonnull List<String> theLinks) throws ResultWritingFailed
    Description copied from interface: `QueryResultHandler`
    Handle the set of links from the result
    Specified by:
      `links` in interface `QueryResultHandler<T>`
    Parameters:
      `theLinks` - The links
    Throws:
      `ResultWritingFailed`
    See Also:
      - "link"

  - ### start

    void start() throws ResultWritingFailed
    Indicates that writing has begun.
    Specified by:
      `start` in interface `QueryResultHandler<T>`
    Throws:
      `ResultWritingFailed` - if writing failed.
    Implementation Requirements:
      This method can only be called once

  - ### handle

    void handle(@Nonnull T theResult) throws ResultWritingFailed
    Description copied from interface: `QueryResultHandler`
    Handle a result to a query
    Specified by:
      `handle` in interface `QueryResultHandler<T>`
    Parameters:
      `theResult` - the result
    Throws:
      `ResultWritingFailed`

  - ### namespace

    void namespace(@Nonnull String thePrefix, @Nonnull String theIRI) throws ResultWritingFailed
    Throws:
      `ResultWritingFailed`

  - ### format

    @Nonnull QueryResultFormat format()
    The `format` this writer will serialize output in
    Returns:
      the format