Package com.stardog.stark.query.io.text

# Class TextBooleanQueryResultWriter

java.lang.Object
com.stardog.stark.query.io.text.TextBooleanQueryResultWriter

All Implemented Interfaces:
  `BooleanQueryResultHandler`, `BooleanQueryResultWriter`, `QueryResultWriter<Boolean>`, `QueryResultHandler<Boolean>`

public final class TextBooleanQueryResultWriter extends Object implements BooleanQueryResultWriter

`Writer` implementation for simple text-based `boolean results`

Since:
  1.0
Version:
  1.0
Author:
  Michael Grove

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `TextBooleanQueryResultWriter.BQRWriterFactory`
  `Factory` for `TextBooleanQueryResultWriter`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TextBooleanQueryResultWriter(OutputStream theOutput)`

- ## 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(Boolean 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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TextBooleanQueryResultWriter

    public TextBooleanQueryResultWriter(OutputStream theOutput)

- ## Method Details

  - ### format

    @Nonnull public QueryResultFormat format()
    The `format` this writer will serialize output in
    Specified by:
      `format` in interface `QueryResultWriter<Boolean>`
    Returns:
      the format

  - ### namespace

    public void namespace(@Nonnull String thePrefix, @Nonnull String theIRI) throws ResultWritingFailed
    Specified by:
      `namespace` in interface `QueryResultWriter<Boolean>`
    Throws:
      `ResultWritingFailed`

  - ### links

    public void links(@Nonnull List<String> theLinks)
    Handle the set of links from the result
    Specified by:
      `links` in interface `QueryResultHandler<Boolean>`
    Specified by:
      `links` in interface `QueryResultWriter<Boolean>`
    Parameters:
      `theLinks` - The links
    See Also:
      - "link"

  - ### handle

    public void handle(@Nonnull Boolean theResult)
    Handle a result to a query
    Specified by:
      `handle` in interface `BooleanQueryResultHandler`
    Specified by:
      `handle` in interface `QueryResultHandler<Boolean>`
    Specified by:
      `handle` in interface `QueryResultWriter<Boolean>`
    Parameters:
      `theResult` - the result

  - ### start

    public void start()
    Indicates that writing has begun.
    Specified by:
      `start` in interface `QueryResultHandler<Boolean>`
    Specified by:
      `start` in interface `QueryResultWriter<Boolean>`

  - ### end

    public void end()
    Signal that query processing has completed
    Specified by:
      `end` in interface `QueryResultHandler<Boolean>`
    Specified by:
      `end` in interface `QueryResultWriter<Boolean>`