java.lang.Object
org.apache.jena.riot.RDFWriterBuilder
-
Method Summary
Modifier and TypeMethodDescriptionasString()
Write and return the output as a string.build()
clone()
Set the context for the writer when built.static RDFWriterBuilder
create()
Set the output format to aRDFFormat
.Set the output language to aLang
; this will set the format.void
output
(OutputStream outputStream) Write output to a file.void
Write output to a file.Add a setting to the context for the writer when built.Added a setting to the context for the writer when built.source
(org.apache.jena.graph.Graph graph) Set the source of writing to the graph argument.Set the source of writing to theDatasetGraph
argument.source
(org.apache.jena.rdf.model.Model model) Set the source of writing to the graph argument.source
(DatasetGraph dataset) Set the source of writing to theDatasetGraph
argument.toString()
Write and return the output as a string.
-
Method Details
-
create
-
source
Set the source of writing to the graph argument.Any previous source setting is cleared.
- Parameters:
graph
- AGraph
.- Returns:
- this
-
source
Set the source of writing to the graph argument.Any previous source setting is cleared.
Equivalent to
source(model.getGraph()(s)
- Parameters:
model
- AModel
.- Returns:
- this
-
source
Set the source of writing to theDatasetGraph
argument.Any previous source setting is cleared.
- Parameters:
dataset
- ADatasetGraph
.- Returns:
- this
-
source
Set the source of writing to theDatasetGraph
argument.Any previous source setting is cleared.
Equivalent to
source(dataset.asDatasetGraph())
- Parameters:
dataset
- ADatasetGraph
.- Returns:
- this
-
context
Set the context for the writer when built.- Parameters:
context
-- Returns:
- this
- See Also:
-
set
Add a setting to the context for the writer when built.- Parameters:
symbol
-value
-- Returns:
- this
- See Also:
-
set
Added a setting to the context for the writer when built. A value of "null" removes a previous setting.- Parameters:
symbol
-value
-- Returns:
- this
- See Also:
-
lang
Set the output language to aLang
; this will set the format.If
Lang
andRDFFormat
are not set, an attempt is made to guess it from file name or URI on output.If output is to an
OutputStream
,Lang
orRDFFormat
must be set.Any previous setting of
Lang
orRDFFormat
is cleared.- Parameters:
lang
-- Returns:
- this
-
format
Set the output format to aRDFFormat
.If
Lang
andRDFFormat
are not set, an attempt is made to guess it from file name or URI on output.If output is to an
OutputStream
,Lang
orRDFFormat
must be set.Any previous setting of
Lang
orRDFFormat
is cleared.- Parameters:
format
-- Returns:
- this
-
base
-
clone
-
build
-
output
Write output to a file. This is a short form forbuild().output(OutputStream)
.- Parameters:
outputStream
-
-
output
Write output to a file. This is a short form forbuild().output(String)
.- Parameters:
filename
-
-
asString
Write and return the output as a string. This is a short form forbuild().asString()
. -
toString
Write and return the output as a string. This is a short form forbuild().toString()
.
-