Class TrigWriter

java.lang.Object
com.stardog.stark.io.turtle.TurtleWriter
com.stardog.stark.io.trig.TrigWriter
All Implemented Interfaces:
RDFHandler, RDFWriter

public class TrigWriter extends TurtleWriter

Since:
1.0
Version:
1.0
Author:
Michael Grove
  • Constructor Details

  • Method Details

    • start

      public void start()
      Signals that the RDF writing process is starting.
      Specified by:
      start in interface RDFHandler
      Specified by:
      start in interface RDFWriter
      Overrides:
      start in class TurtleWriter
    • handle

      public void handle(@Nonnull Statement theStmt)
      Write the given Statement
      Specified by:
      handle in interface RDFHandler
      Specified by:
      handle in interface RDFWriter
      Overrides:
      handle in class TurtleWriter
      Parameters:
      theStmt - the statement to write
    • end

      public void end()
      Signals the writing process is completed. The underlying InputStream is *not* closed, but the caller should not call additional methods on this writer as that will normally yield syntax errors in the output.
      Specified by:
      end in interface RDFHandler
      Specified by:
      end in interface RDFWriter
      Overrides:
      end in class TurtleWriter
    • comment

      public void comment(@Nonnull String theComment)
      Write a comment to the output. Writing need not be started at this point; comments can be written prior to any actual serialized RDF
      Specified by:
      comment in interface RDFWriter
      Overrides:
      comment in class TurtleWriter
      Parameters:
      theComment - the comment to write
    • writeNamespace

      protected void writeNamespace(@Nonnull String thePrefix, @Nonnull String theName)
      Overrides:
      writeNamespace in class TurtleWriter
    • closeActiveContext

      protected void closeActiveContext()
    • format

      @Nonnull public RDFFormat format()
      The format this writer will serialize output in.
      Specified by:
      format in interface RDFWriter
      Overrides:
      format in class TurtleWriter
      Returns:
      the format