Package com.stardog.stark.query.io.json

# Class SPARQLJSONBooleanResultWriter

java.lang.Object
com.stardog.stark.query.io.json.AbstractSPARQLJSONWriter<Boolean>
com.stardog.stark.query.io.json.SPARQLJSONBooleanResultWriter

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

public final class SPARQLJSONBooleanResultWriter extends AbstractSPARQLJSONWriter<Boolean> implements BooleanQueryResultWriter

`Writer` for `boolean results` in SPARQL/JSON.

Since:
  1.0
Version:
  1.0
Author:
  Michael Grove

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `SPARQLJSONBooleanResultWriter.SPARQLJSONBooleanResultWriterFactory`
  `QueryResultWriterFactory` for `SPARQLJSONBooleanResultWriter`

- ## Field Summary

  ### Fields inherited from class com.stardog.stark.query.io.json.AbstractSPARQLJSONWriter

  `documentOpen, firstTupleWritten, headerComplete, headerOpen, jg, linksFound, mOptions, tupleVariablesFound`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SPARQLJSONBooleanResultWriter(OutputStream theOutput, Options theOptions)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `QueryResultFormat`
  `format()`
  The `format` this writer will serialize output in
  `void`
  `handle(Boolean theResult)`
  Handle a result to a query

  ### Methods inherited from class com.stardog.stark.query.io.json.AbstractSPARQLJSONWriter

  `end, endHeader, links, namespace, start, startHeader, writeHeaderFields, writeValue`

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

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

  ### Methods inherited from interface com.stardog.stark.query.io.QueryResultWriter

  `end, links, namespace, start`

- ## Constructor Details

  - ### SPARQLJSONBooleanResultWriter

    public SPARQLJSONBooleanResultWriter(@Nonnull OutputStream theOutput, @Nonnull Options theOptions)

- ## Method Details

  - ### handle

    public void handle(@Nonnull Boolean theResult) throws ResultWritingFailed
    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
    Throws:
      `ResultWritingFailed`

  - ### format

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