Package com.stardog.stark.io

# Class WriterOptions

java.lang.Object
com.stardog.stark.io.WriterOptions

public final class WriterOptions extends Object

Options to control the `RDF writing process`

Since:
  1.0
Version:
  1.0
Author:
  Michael Grove

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Option<Integer>`
  `BUFFER_SIZE`
  Maximum number of triples that will be buffered during printing.
  `static final Option<Iterable<Namespace>>`
  `NAMESPACES`
  Declare any default namespaces to be used for writing
  `static final Option<Boolean>`
  `NORMALIZE_DATATYPES`
  Boolean setting for writer to determine whether pretty printing is preferred.
  `static final Option<Boolean>`
  `PRETTY_PRINT`
  Boolean setting for writer to determine whether pretty printing is preferred.
  `static final Option<Boolean>`
  `XSD_STRING_TO_PLAIN_LITERAL`
  Boolean setting for writer to determine whether it should remove the xsd:string datatype from literals and represent them as RDF-1.0 Plain Literals.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Options`
  `defaults()`
  Return the default options for `writing`
  `static Options`
  `namespaces(Iterable<Namespace> theNamespaces)`
  Return the `default options` with the `NAMESPACES` option set
  `static <T> Options`
  `of(Option<T> theOption, T theValue)`
  Return the `default options` with the additional specified option set

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

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

- ## Field Details

  - ### PRETTY_PRINT

    public static final Option<Boolean> PRETTY_PRINT
    Boolean setting for writer to determine whether pretty printing is preferred.

    Defaults to `true`.

  - ### BUFFER_SIZE

    public static final Option<Integer> BUFFER_SIZE
    Maximum number of triples that will be buffered during printing. Writers might buffer triples to group triples by subject, predicate or named graph but the nature of buffering depends on the RDF format and the writer.

    Defaults to 10K.

  - ### NORMALIZE_DATATYPES

    public static final Option<Boolean> NORMALIZE_DATATYPES
    Boolean setting for writer to determine whether pretty printing is preferred.

    Defaults to `false`.

  - ### XSD_STRING_TO_PLAIN_LITERAL

    public static final Option<Boolean> XSD_STRING_TO_PLAIN_LITERAL
    Boolean setting for writer to determine whether it should remove the xsd:string datatype from literals and represent them as RDF-1.0 Plain Literals.

    In RDF-1.1, all literals that would have been Plain Literals in RDF-1.0 will be typed as xsd:string internally.

    Defaults to `true` to allow for backwards compatibility without enforcing it.

  - ### NAMESPACES

    public static final Option<Iterable<Namespace>> NAMESPACES
    Declare any default namespaces to be used for writing

- ## Method Details

  - ### of

    @Nonnull public static <T> Options of(@Nonnull Option<T> theOption, @Nonnull T theValue)
    Return the `default options` with the additional specified option set
    Parameters:
      `theOption` - the option
      `theValue` - the value
    Returns:
      the writer options

  - ### namespaces

    @Nonnull public static Options namespaces(@Nonnull Iterable<Namespace> theNamespaces)
    Return the `default options` with the `NAMESPACES` option set
    Parameters:
      `theNamespaces` - the value
    Returns:
      the writer options

  - ### defaults

    @Nonnull public static Options defaults()
    Return the default options for `writing`
    Returns:
      the defaults