Package org.eclipse.rdf4j.rio

## Interface RDFWriter

- All Superinterfaces:
    `RDFHandler`
  All Known Implementing Classes:
    `AbstractRDFWriter`, `ArrangedWriter`, `BinaryRDFWriter`, `ConsoleRDFWriter`, `JSONLDWriter`, `N3Writer`, `NDJSONLDWriter`, `NQuadsWriter`, `NTriplesWriter`, `RDFJSONWriter`, `RDFXMLPrettyWriter`, `RDFXMLWriter`, `TriGStarWriter`, `TriGWriter`, `TriXWriter`, `TurtleStarWriter`, `TurtleWriter`

      public interface RDFWriter
      extends RDFHandler

  An interface for RDF document writers. To allow RDF document writers to be created through reflection, all implementing classes should define at least two public constructors: one with an `OutputStream` argument and one with an `Writer` argument.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `RDFFormat` | `getRDFFormat()` | Gets the RDF format that this RDFWriter uses.
    `Collection<RioSetting<?>>` | `getSupportedSettings()` |
    `WriterConfig` | `getWriterConfig()` | Retrieves the current writer configuration as a single object.
    `<T> RDFWriter` | `set​(RioSetting<T> setting, T value)` | Set a setting on the writer, and return this writer object to allow chaining.
    `RDFWriter` | `setWriterConfig​(WriterConfig config)` | Sets all supplied writer configuration options.

    - ### Methods inherited from interface org.eclipse.rdf4j.rio.RDFHandler

      `endRDF, handleComment, handleNamespace, handleStatement, startRDF`

- - ### Method Detail

    - #### getRDFFormat

          RDFFormat getRDFFormat()

      Gets the RDF format that this RDFWriter uses.

    - #### setWriterConfig

          RDFWriter setWriterConfig​(WriterConfig config)

      Sets all supplied writer configuration options.
      Parameters:
        `config` - a writer configuration object.
      Returns:
        Either a copy of this writer, if it is immutable, or this object, to allow chaining of method calls.

    - #### getWriterConfig

          WriterConfig getWriterConfig()

      Retrieves the current writer configuration as a single object.
      Returns:
        a writer configuration object representing the current configuration of the writer.

    - #### getSupportedSettings

          Collection<RioSetting<?>> getSupportedSettings()

      Returns:
        A collection of `RioSetting`s that are supported by this RDFWriter.

    - #### set

          <T> RDFWriter set​(RioSetting<T> setting,
                            T value)

      Set a setting on the writer, and return this writer object to allow chaining.
      Parameters:
        `setting` - The setting to change.
        `value` - The value to change.
      Returns:
        Either a copy of this writer, if it is immutable, or this object, to allow chaining of method calls.