Class WriterStreamRDFBase

java.lang.Object
org.apache.jena.riot.writer.WriterStreamRDFBase
All Implemented Interfaces:
StreamRDF
Direct Known Subclasses:
WriterStreamRDFBlocks, WriterStreamRDFFlat

public abstract class WriterStreamRDFBase extends Object implements StreamRDF
Core engine for output of triples / quads that is streaming. It covers Turtle and TriG "flat" and "blocks" variants.

It handles prefixes and base and node formats which is controlled by a NodeFormatterTTL.

The output is valid TriG.
If fed only triples, the output is valid Turtle.

For N-Quads and N-triples use WriterStreamRDFPlain.

  • Method Details

    • start

      public final void start()
      Description copied from interface: StreamRDF
      Start processing
      Specified by:
      start in interface StreamRDF
    • finish

      public final void finish()
      Description copied from interface: StreamRDF
      Finish processing
      Specified by:
      finish in interface StreamRDF
    • triple

      public final void triple(org.apache.jena.graph.Triple triple)
      Description copied from interface: StreamRDF
      Triple emitted
      Specified by:
      triple in interface StreamRDF
    • quad

      public final void quad(Quad quad)
      Description copied from interface: StreamRDF
      Quad emitted
      Specified by:
      quad in interface StreamRDF
    • base

      public final void base(String base)
      Description copied from interface: StreamRDF
      base declaration seen
      Specified by:
      base in interface StreamRDF
    • prefix

      public final void prefix(String prefix, String iri)
      Description copied from interface: StreamRDF
      prefix declaration seen
      Specified by:
      prefix in interface StreamRDF