Class StreamRDFLib

java.lang.Object
org.apache.jena.riot.system.StreamRDFLib

public class StreamRDFLib extends Object
Various Common StreamRDF setups
  • Constructor Details

    • StreamRDFLib

      public StreamRDFLib()
  • Method Details

    • sinkNull

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

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

      public static StreamRDF print(org.apache.jena.atlas.io.AWriter out)
      Create a StreamRDF that prints to an AWriter. This is debug output.
    • writer

      public static StreamRDF writer(OutputStream out)
      Create a StreamRDF that outputs to an OutputStream. 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)
      Create a StreamRDF that outputs to an AWriter.
    • writer

      public static StreamRDF writer(Writer out)
      Create a StreamRDF that outputs to an Writer. It is important to call StreamRDF.start() and StreamRDF.finish() because the output is buffered.
    • writer

      public static StreamRDF writer(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(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.

    • graph

      public static StreamRDF graph(org.apache.jena.graph.Graph graph)
    • dataset

      public static StreamRDF dataset(DatasetGraph dataset)
    • sinkTriples

      public static StreamRDF sinkTriples(org.apache.jena.atlas.lib.Sink<org.apache.jena.graph.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(StreamRDF base)
      Convert any triples seen to a quads, adding a graph node of Quad.tripleInQuad
    • extendTriplesToQuads

      public static StreamRDF extendTriplesToQuads(org.apache.jena.graph.Node graphNode, StreamRDF base)
      Convert any triples seen to a quads, adding the specified graph node
    • count

      public static StreamRDFCounting count()
    • count

      public static StreamRDFCounting count(StreamRDF other)