Class TriGWriter

    • Field Detail

      • inActiveContext

        private boolean inActiveContext
      • currentContext

        private Resource currentContext
    • Constructor Detail

      • TriGWriter

        public TriGWriter​(java.io.OutputStream out)
        Creates a new TriGWriter that will write to the supplied OutputStream.
        Parameters:
        out - The OutputStream to write the TriG document to.
      • TriGWriter

        public TriGWriter​(java.io.OutputStream out,
                          ParsedIRI baseIRI)
        Creates a new TriGWriter that will write to the supplied OutputStream.
        Parameters:
        out - The OutputStream to write the TriG document to.
        baseIRI -
      • TriGWriter

        public TriGWriter​(java.io.Writer writer)
        Creates a new TriGWriter that will write to the supplied Writer.
        Parameters:
        writer - The Writer to write the TriG document to.
      • TriGWriter

        public TriGWriter​(java.io.Writer writer,
                          ParsedIRI baseIRI)
        Creates a new TriGWriter that will write to the supplied Writer.
        Parameters:
        writer - The Writer to write the TriG document to.
        baseIRI -
    • Method Detail

      • writeStatement

        protected void writeStatement​(Resource subj,
                                      IRI pred,
                                      Value obj,
                                      Resource context,
                                      boolean canShortenSubject,
                                      boolean canShortenObject)
                               throws java.io.IOException
        Overrides:
        writeStatement in class TurtleWriter
        Throws:
        java.io.IOException
      • writeNamespace

        protected void writeNamespace​(java.lang.String prefix,
                                      java.lang.String name)
                               throws java.io.IOException
        Overrides:
        writeNamespace in class TurtleWriter
        Throws:
        java.io.IOException
      • closeActiveContext

        protected void closeActiveContext()
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • contextsEquals

        private static boolean contextsEquals​(Resource context1,
                                              Resource context2)