java.lang.Object
org.apache.jena.riot.system.StreamRDFWriter
Write RDF in a streaming fashion.
RDFDataMgr
operations do not provide this guarantee.
See RDFWriterRegistry
for general purpose writers.
StreamRDFWriter
returns the same writer as RDFWriterRegistry
if the RDFFormat
is a streaming format.- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RDFFormat
defaultSerialization
(Lang lang) Return the format registered as the default for the languagestatic StreamRDF
getWriterStream
(OutputStream output, Lang lang) Get a StreamRDF destination that will output in syntaxLang
and is guaranteed to do so in a scaling, streaming fashion.static StreamRDF
getWriterStream
(OutputStream output, Lang lang, Context context) Get a StreamRDF destination that will output in syntaxLang
and is guaranteed to do so in a scaling, streaming fashion.static StreamRDF
getWriterStream
(OutputStream output, RDFFormat format) Get a StreamRDF destination that will output in syntaxRDFFormat
and is guaranteed to do so in a scaling, streaming fashion.static StreamRDF
getWriterStream
(OutputStream output, RDFFormat format, Context context) Get a StreamRDF destination that will output in syntaxRDFFormat
and is guaranteed to do so in a scaling, streaming fashion.static void
Register the default serialization for the language (replace any existing registration).static void
register
(RDFFormat serialization, StreamRDFWriterFactory streamWriterFactory) Register the serialization for datasets and it's associated factorystatic Collection<RDFFormat>
static boolean
registered
(Lang lang) static boolean
registered
(RDFFormat format) static void
write
(OutputStream output, org.apache.jena.graph.Graph graph, Lang lang, Context context) Write a Graph in streaming fashionstatic void
write
(OutputStream output, org.apache.jena.graph.Graph graph, RDFFormat format) Write a Graph in streaming fashionstatic void
write
(OutputStream output, org.apache.jena.graph.Graph graph, RDFFormat format, Context context) Write a Graph in streaming fashionstatic void
write
(OutputStream output, DatasetGraph datasetGraph, Lang lang) Write a DatasetGraph in streaming fashionstatic void
write
(OutputStream output, DatasetGraph datasetGraph, Lang lang, Context context) Write a DatasetGraph in streaming fashionstatic void
write
(OutputStream output, DatasetGraph datasetGraph, RDFFormat format, Context context) Write a DatasetGraph in streaming fashion
-
Constructor Details
-
StreamRDFWriter
public StreamRDFWriter()
-
-
Method Details
-
register
Register the default serialization for the language (replace any existing registration).- Parameters:
lang
- Languagesformat
- The serialization format to use when the language is used for writing.
-
register
Register the serialization for datasets and it's associated factory- Parameters:
serialization
- RDFFormat for the output format.streamWriterFactory
- Source of writer engines
-
defaultSerialization
Return the format registered as the default for the language -
getWriterStream
Get a StreamRDF destination that will output in syntaxLang
and is guaranteed to do so in a scaling, streaming fashion.- Parameters:
output
- OutputStreamlang
- The syntax- Returns:
- StreamRDF, or null if Lang does not have a streaming format.
- See Also:
-
getWriterStream
Get a StreamRDF destination that will output in syntaxLang
and is guaranteed to do so in a scaling, streaming fashion.- Parameters:
output
- OutputStreamlang
- The syntaxcontext
-- Returns:
- StreamRDF, or null if Lang does not have a streaming format.
- See Also:
-
getWriterStream
Get a StreamRDF destination that will output in syntaxRDFFormat
and is guaranteed to do so in a scaling, streaming fashion.- Parameters:
output
- OutputStreamformat
- The syntax (as anRDFFormat
)- Returns:
- StreamRDF, or null if format is not registered for streaming.
- See Also:
-
getWriterStream
Get a StreamRDF destination that will output in syntaxRDFFormat
and is guaranteed to do so in a scaling, streaming fashion.- Parameters:
output
- OutputStreamformat
- The syntax (as anRDFFormat
)context
- Context- Returns:
- StreamRDF, or null if format is not registered for streaming.
- See Also:
-
registered
-
registered
-
registered
-
write
public static void write(OutputStream output, org.apache.jena.graph.Graph graph, Lang lang, Context context) Write a Graph in streaming fashion- Parameters:
output
- OutputStreamgraph
- Graph to writelang
- Syntaxcontext
- Context
-
write
Write a Graph in streaming fashion- Parameters:
output
- OutputStreamgraph
- Graph to writeformat
- Syntax
-
write
public static void write(OutputStream output, org.apache.jena.graph.Graph graph, RDFFormat format, Context context) Write a Graph in streaming fashion- Parameters:
output
- OutputStreamgraph
- Graph to writeformat
- Syntaxcontext
- Context
-
write
Write a DatasetGraph in streaming fashion- Parameters:
output
- OutputStreamdatasetGraph
- DatasetGraph to writelang
- Syntax
-
write
public static void write(OutputStream output, DatasetGraph datasetGraph, Lang lang, Context context) Write a DatasetGraph in streaming fashion- Parameters:
output
- OutputStreamdatasetGraph
- DatasetGraph to writelang
- Syntaxcontext
- Context
-
write
public static void write(OutputStream output, DatasetGraph datasetGraph, RDFFormat format, Context context) Write a DatasetGraph in streaming fashion- Parameters:
output
- OutputStreamdatasetGraph
- DatasetGraph to writeformat
- Syntaxcontext
- Context
-