org.eclipse.rdf4j.rio.turtlestar

## Class TurtleStarWriter

- java.lang.Object
- - org.eclipse.rdf4j.rio.helpers.AbstractRDFWriter
  - - org.eclipse.rdf4j.rio.turtle.TurtleWriter
    - - org.eclipse.rdf4j.rio.turtlestar.TurtleStarWriter

- All Implemented Interfaces:
    RDFHandler, RDFWriter

      public class TurtleStarWriter
      extends TurtleWriter

  An extension of `TurtleWriter` that writes RDF* documents in the Turtle* format by including the RDF* triples.
  Author:
    Pavel Mihaylov

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.rdf4j.rio.turtle.TurtleWriter

      `baseIRI, bufferedStatements, lastWrittenPredicate, lastWrittenSubject, statementClosed, writer`

    - ### Fields inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFWriter

      `namespaceTable, statementConsumer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TurtleStarWriter(OutputStream out)` Creates a new TurtleStarWriter that will write to the supplied OutputStream.
    `TurtleStarWriter(OutputStream out, ParsedIRI baseIRI)` Creates a new TurtleStarWriter that will write to the supplied OutputStream using the supplied base IRI.
    `TurtleStarWriter(Writer writer)` Creates a new TurtleStarWriter that will write to the supplied Writer.
    `TurtleStarWriter(Writer writer, ParsedIRI baseIRI)` Creates a new TurtleStarWriter that will write to the supplied Writer using the supplied base IRI.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RDFFormat` | `getRDFFormat()` Gets the RDF format that this RDFWriter uses.
    `protected void` | `writeTriple(Triple triple, boolean canShorten)`

    - ### Methods inherited from class org.eclipse.rdf4j.rio.turtle.TurtleWriter

      `closePreviousStatement, consumeStatement, endRDF, getModelFactory, handleComment, handleNamespace, handleStatementInternal, setModelFactory, startRDF, writeBase, writeBNode, writeBNode, writeCommentLine, writeLiteral, writeNamespace, writePredicate, writeResource, writeResource, writeStatement, writeTripleRDFStar, writeURI, writeValue, writeValue`

    - ### Methods inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFWriter

      `checkWritingStarted, getOutputStream, getSupportedSettings, getWriterConfig, handleStatement, isWritingStarted, set, setWriterConfig`

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

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

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

      `getOutputStream, getSupportedSettings, getWriterConfig, set, setWriterConfig`

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

      `handleStatement`

- - ### Constructor Detail

    - #### TurtleStarWriter

          public TurtleStarWriter(OutputStream out)

      Creates a new TurtleStarWriter that will write to the supplied OutputStream.
      Parameters:
        `out` - The OutputStream to write the TurtleStar document to.

    - #### TurtleStarWriter

          public TurtleStarWriter(OutputStream out,
                                  ParsedIRI baseIRI)

      Creates a new TurtleStarWriter that will write to the supplied OutputStream using the supplied base IRI.
      Parameters:
        `out` - The OutputStream to write the TurtleStar document to.
        `baseIRI` - The base IRI to use.

    - #### TurtleStarWriter

          public TurtleStarWriter(Writer writer)

      Creates a new TurtleStarWriter that will write to the supplied Writer.
      Parameters:
        `writer` - The Writer to write the TurtleStar document to.

    - #### TurtleStarWriter

          public TurtleStarWriter(Writer writer,
                                  ParsedIRI baseIRI)

      Creates a new TurtleStarWriter that will write to the supplied Writer using the supplied base IRI.
      Parameters:
        `writer` - The Writer to write the Turtle document to.
        `baseIRI` - The base IRI to use.

  - ### Method Detail

    - #### getRDFFormat

          public RDFFormat getRDFFormat()

      Description copied from interface: `RDFWriter`
      Gets the RDF format that this RDFWriter uses.
      Specified by:
        `getRDFFormat` in interface `RDFWriter`
      Overrides:
        `getRDFFormat` in class `TurtleWriter`

    - #### writeTriple

          protected void writeTriple(Triple triple,
                                     boolean canShorten)
                              throws IOException

      Overrides:
        `writeTriple` in class `TurtleWriter`
      Throws:
        `IOException`

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