Interface TripleWriter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Releases resources associated with this TripleWriter, and flushes (but by default does not close) any underlying OutputStreams.
      void writeNamespace​(String prefix, String uri)
      Writes a prefix-namespace mapping.
      void writeTriple​(org.eclipse.rdf4j.model.Resource s, org.eclipse.rdf4j.model.IRI p, org.eclipse.rdf4j.model.Value o, org.eclipse.rdf4j.model.Resource g)
      Writes a triple and, optionally, a graph resource name.
    • Method Detail

      • writeTriple

        void writeTriple​(org.eclipse.rdf4j.model.Resource s,
                         org.eclipse.rdf4j.model.IRI p,
                         org.eclipse.rdf4j.model.Value o,
                         org.eclipse.rdf4j.model.Resource g)
                  throws TripleHandlerException
        Writes a triple and, optionally, a graph resource name.
        s - the subject to write
        p - the predicate to write
        o - the object to write
        g - the graph name to write, or null
        TripleHandlerException - if there is an error writing the triple
      • writeNamespace

        void writeNamespace​(String prefix,
                            String uri)
                     throws TripleHandlerException
        Writes a prefix-namespace mapping.
        NOTE: this method should be called before writing out any triples. Calling this method after writing out a triple may result in the prefix-namespace mapping being ignored.
        prefix - the namespace prefix
        uri - the namespace uri
        TripleHandlerException - if there was an error writing out the prefix-namespace mapping