Package org.apache.jena.riot.system
Class StreamRDFLib
- java.lang.Object
-
- org.apache.jena.riot.system.StreamRDFLib
-
public class StreamRDFLib extends java.lang.ObjectVarious Common StreamRDF setups
-
-
Constructor Summary
Constructors Constructor Description StreamRDFLib()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StreamRDFCountingcount()static StreamRDFCountingcount(StreamRDF other)static StreamRDFdataset(DatasetGraph dataset)static StreamRDFextendTriplesToQuads(Node graphNode, StreamRDF base)Convert any triples seen to a quads, adding the specified graph nodestatic StreamRDFextendTriplesToQuads(StreamRDF base)Convert any triples seen to a quads, adding a graph node ofQuad.tripleInQuadstatic StreamRDFgraph(Graph graph)static StreamRDFprint(java.io.OutputStream out)Create aStreamRDFthat prints to anOutputStream.static StreamRDFsinkNull()Send everything to nowhere ...static StreamRDFsinkQuads(org.apache.jena.atlas.lib.Sink<Quad> sink)Output to a sink; prefix and base handled only within the parser.static StreamRDFsinkTriples(org.apache.jena.atlas.lib.Sink<Triple> sink)Output to a sink; prefix and base handled only within the parser.static StreamRDFwriter(java.io.OutputStream out)Create aStreamRDFthat outputs to anOutputStream.static StreamRDFwriter(java.io.OutputStream out, org.apache.jena.atlas.lib.CharSpace charSpace)static StreamRDFwriter(java.io.Writer out)Create aStreamRDFthat outputs to anWriter.static StreamRDFwriter(java.io.Writer out, org.apache.jena.atlas.lib.CharSpace charSpace)Create aStreamRDFthat outputs to anWriterwith a specificCharSpace(ASCII or UTF-8) writing out-of-range codepoints (if ASCII) as "\ uXXXX".static StreamRDFwriter(org.apache.jena.atlas.io.AWriter out)Create aStreamRDFthat outputs to anAWriter.static StreamRDFwriter(org.apache.jena.atlas.io.AWriter out, org.apache.jena.atlas.lib.CharSpace charSpace)
-
-
-
Method Detail
-
sinkNull
public static StreamRDF sinkNull()
Send everything to nowhere ... efficiently
-
print
public static StreamRDF print(java.io.OutputStream out)
Create aStreamRDFthat prints to anOutputStream. This is debug output.
-
writer
public static StreamRDF writer(java.io.OutputStream out)
Create aStreamRDFthat outputs to anOutputStream. It is important to callStreamRDF.start()andStreamRDF.finish()because the output is buffered.
-
writer
public static StreamRDF writer(org.apache.jena.atlas.io.AWriter out)
Create aStreamRDFthat outputs to anAWriter.
-
writer
public static StreamRDF writer(java.io.Writer out)
Create aStreamRDFthat outputs to anWriter. It is important to callStreamRDF.start()andStreamRDF.finish()because the output is buffered.
-
writer
public static StreamRDF writer(java.io.OutputStream out, org.apache.jena.atlas.lib.CharSpace charSpace)
Create aStreamRDFthat outputs to anOutputStreamwith a specificCharSpace(ASCII or UTF-8).It is important to call
StreamRDF.start()andStreamRDF.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 aStreamRDFthat outputs to anOutputStreamwith a specificCharSpace(ASCII or UTF-8).It is important to call
StreamRDF.start()andStreamRDF.finish()because the output is buffered.
-
writer
public static StreamRDF writer(java.io.Writer out, org.apache.jena.atlas.lib.CharSpace charSpace)
Create aStreamRDFthat outputs to anWriterwith a specificCharSpace(ASCII or UTF-8) writing out-of-range codepoints (if ASCII) as "\ uXXXX".It is important to call
StreamRDF.start()andStreamRDF.finish()because the output is buffered.
-
dataset
public static StreamRDF dataset(DatasetGraph dataset)
-
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(StreamRDF base)
Convert any triples seen to a quads, adding a graph node ofQuad.tripleInQuad
-
extendTriplesToQuads
public static StreamRDF extendTriplesToQuads(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)
-
-