Class RdfNTriplesWriter


  • public class RdfNTriplesWriter
    extends GraphHandler
    Handler of RDF content according to the N-Triples notation.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.Writer writer
      The character writer.
    • Constructor Summary

      Constructors 
      Constructor Description
      RdfNTriplesWriter​(java.io.Writer writer)
      Constructor.
    • Field Detail

      • writer

        private java.io.Writer writer
        The character writer.
    • Constructor Detail

      • RdfNTriplesWriter

        public RdfNTriplesWriter​(java.io.Writer writer)
                          throws java.io.IOException
        Constructor.
        Parameters:
        writer - The character writer.
        Throws:
        java.io.IOException
    • Method Detail

      • endGraph

        public void endGraph()
                      throws java.io.IOException
        Description copied from class: GraphHandler
        Callback method used after the graph is parsed or written. Does nothing by default.
        Overrides:
        endGraph in class GraphHandler
        Throws:
        java.io.IOException
      • link

        public void link​(Graph source,
                         Reference typeRef,
                         Literal target)
        Description copied from class: GraphHandler
        Callback method used when a link is parsed or written.
        Specified by:
        link in class GraphHandler
        Parameters:
        source - The source or subject of the link.
        typeRef - The type reference of the link.
        target - The target or object of the link.
      • link

        public void link​(Graph source,
                         Reference typeRef,
                         Reference target)
        Description copied from class: GraphHandler
        Callback method used when a link is parsed or written.
        Specified by:
        link in class GraphHandler
        Parameters:
        source - The source or subject of the link.
        typeRef - The type reference of the link.
        target - The target or object of the link.
      • link

        public void link​(Reference source,
                         Reference typeRef,
                         Literal target)
        Description copied from class: GraphHandler
        Callback method used when a link is parsed or written.
        Specified by:
        link in class GraphHandler
        Parameters:
        source - The source or subject of the link.
        typeRef - The type reference of the link.
        target - The target or object of the link.
      • link

        public void link​(Reference source,
                         Reference typeRef,
                         Reference target)
        Description copied from class: GraphHandler
        Callback method used when a link is parsed or written.
        Specified by:
        link in class GraphHandler
        Parameters:
        source - The source or subject of the link.
        typeRef - The type reference of the link.
        target - The target or object of the link.
      • write

        private void write​(Literal literal)
                    throws java.io.IOException
        Writes the representation of a literal.
        Parameters:
        literal - The literal to write.
        Throws:
        java.io.IOException
      • write

        private void write​(Reference reference)
                    throws java.io.IOException
        Writes the representation of a given reference.
        Parameters:
        reference - The reference to write.
        Throws:
        java.io.IOException