Class StreamRDFLib


  • public class StreamRDFLib
    extends java.lang.Object
    Various Common StreamRDF setups
    • Constructor Detail

      • StreamRDFLib

        public StreamRDFLib()
    • Method Detail

      • sinkNull

        public static StreamRDF sinkNull()
        Send everything to nowhere ... efficiently
      • print

        public static StreamRDF print​(java.io.OutputStream out)
        Create a StreamRDF that prints to an OutputStream. This is debug output.
      • writer

        public static StreamRDF writer​(org.apache.jena.atlas.io.AWriter out)
        Create a StreamRDF that outputs to an AWriter.
      • writer

        public static StreamRDF writer​(java.io.OutputStream out,
                                       org.apache.jena.atlas.lib.CharSpace charSpace)
        Create a StreamRDF that outputs to an OutputStream with a specific CharSpace (ASCII or UTF-8).

        It is important to call StreamRDF.start() and StreamRDF.finish() because the output is buffered.

      • writer

        public static StreamRDF writer​(org.apache.jena.atlas.io.AWriter out,
                                       org.apache.jena.atlas.lib.CharSpace charSpace)
        Create a StreamRDF that outputs to an OutputStream with a specific CharSpace (ASCII or UTF-8).

        It is important to call StreamRDF.start() and StreamRDF.finish() because the output is buffered.

      • writer

        public static StreamRDF writer​(java.io.Writer out,
                                       org.apache.jena.atlas.lib.CharSpace charSpace)
        Create a StreamRDF that outputs to an Writer with a specific CharSpace (ASCII or UTF-8) writing out-of-range codepoints (if ASCII) as "\ uXXXX".

        It is important to call StreamRDF.start() and StreamRDF.finish() because the output is buffered.

      • sinkTriples

        public static StreamRDF sinkTriples​(org.apache.jena.atlas.lib.Sink<Triple> sink)
        Output to a sink; prefix and base handled only within the parser. Unfortunately, Java needs different names for the triples and quads versions because of type erasure.
      • sinkQuads

        public static StreamRDF sinkQuads​(org.apache.jena.atlas.lib.Sink<Quad> sink)
        Output to a sink; prefix and base handled only within the parser. Unfortunately, Java needs different names for the triples and quads versions because of type erasure.
      • extendTriplesToQuads

        public static StreamRDF extendTriplesToQuads​(Node graphNode,
                                                     StreamRDF base)
        Convert any triples seen to a quads, adding the specified graph node