org.eclipse.rdf4j.rio

## Interface RDFWriterFactory

- All Known Implementing Classes:
    BinaryRDFWriterFactory, JSONLDWriterFactory, N3WriterFactory, NQuadsWriterFactory, NTriplesWriterFactory, RDFJSONWriterFactory, RDFXMLPrettyWriterFactory, RDFXMLWriterFactory, TriGStarWriterFactory, TriGWriterFactory, TriXWriterFactory, TurtleStarWriterFactory, TurtleWriterFactory

      public interface RDFWriterFactory

  A RDFWriterFactory returns `RDFWriter`s for a specific RDF format.
  Author:
    Arjohn Kampman

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `RDFFormat` | `getRDFFormat()` Returns the RDF format for this factory.
    `RDFWriter` | `getWriter(OutputStream out)` Returns an RDFWriter instance that will write to the supplied output stream.
    `RDFWriter` | `getWriter(OutputStream out, String baseURI)` Returns an RDFWriter instance that will write to the supplied output stream.
    `RDFWriter` | `getWriter(Writer writer)` Returns an RDFWriter instance that will write to the supplied writer.
    `RDFWriter` | `getWriter(Writer writer, String baseURI)` Returns an RDFWriter instance that will write to the supplied writer.

- - ### Method Detail

    - #### getRDFFormat

          RDFFormat getRDFFormat()

      Returns the RDF format for this factory.

    - #### getWriter

          RDFWriter getWriter(OutputStream out)

      Returns an RDFWriter instance that will write to the supplied output stream.
      Parameters:
        `out` - The OutputStream to write the RDF to.

    - #### getWriter

          RDFWriter getWriter(OutputStream out,
                              String baseURI)
                       throws URISyntaxException

      Returns an RDFWriter instance that will write to the supplied output stream. Using the supplied baseURI to relativize IRIs to relative IRIs.
      Parameters:
        `out` - The OutputStream to write the RDF to.
        `baseURI` - The URI associated with the data in the InputStream.
      Throws:
        `URISyntaxException`

    - #### getWriter

          RDFWriter getWriter(Writer writer)

      Returns an RDFWriter instance that will write to the supplied writer. (Optional operation)
      Parameters:
        `writer` - The Writer to write the RDF to.
      Throws:
        `UnsupportedOperationException` - if the RDFWriter the specific format does not support writing to a `Writer`

    - #### getWriter

          RDFWriter getWriter(Writer writer,
                              String baseURI)
                       throws URISyntaxException

      Returns an RDFWriter instance that will write to the supplied writer. Using the supplied baseURI to relativize IRIs to relative IRIs. (Optional operation)
      Parameters:
        `writer` - The Writer to write the RDF to.
        `baseURI` - The URI associated with the data in the InputStream.
      Throws:
        `URISyntaxException`
        `UnsupportedOperationException` - if the RDFWriter the specific format does not support writing to a `Writer`

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.