Package org.apache.jena.riot
Class RDFWriterBuilder
- java.lang.Object
-
- org.apache.jena.riot.RDFWriterBuilder
-
public class RDFWriterBuilder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringasString()Short form forbuild().asString().RDFWriterBuilderbase(java.lang.String baseURI)RDFWriterbuild()RDFWriterBuilderclone()RDFWriterBuildercontext(Context context)Set the context for the writer when built.RDFWriterBuilderformat(RDFFormat format)Set the output format to aRDFFormat.RDFWriterBuilderlang(Lang lang)Set the output language to aLang; this will set the format.voidoutput(java.io.OutputStream outputStream)Short form forbuild().output(outputStream).voidoutput(java.lang.String filename)Short form forbuild().output(filename).RDFWriterBuilderset(Symbol symbol, java.lang.Object value)Added a setting to the context for the writer when built.RDFWriterBuildersource(Graph graph)Set the source of writing to the graph argument.RDFWriterBuildersource(Dataset dataset)Set the source of writing to theDatasetGraphargument.RDFWriterBuildersource(Model model)Set the source of writing to the graph argument.RDFWriterBuildersource(DatasetGraph dataset)Set the source of writing to theDatasetGraphargument.
-
-
-
Method Detail
-
source
public RDFWriterBuilder source(Graph graph)
Set the source of writing to the graph argument.Any previous source setting is cleared.
- Parameters:
graph- AGraph.- Returns:
- this
-
source
public RDFWriterBuilder source(Model model)
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
public RDFWriterBuilder source(DatasetGraph dataset)
Set the source of writing to theDatasetGraphargument.Any previous source setting is cleared.
- Parameters:
dataset- ADatasetGraph.- Returns:
- this
-
source
public RDFWriterBuilder source(Dataset dataset)
Set the source of writing to theDatasetGraphargument.Any previous source setting is cleared.
Equivalent to
source(dataset.asDatasetGraph())- Parameters:
dataset- ADatasetGraph.- Returns:
- this
-
context
public RDFWriterBuilder context(Context context)
Set the context for the writer when built. If a context is already partly set for this builder, merge the new settings into the outstanding context.- Parameters:
context-- Returns:
- this
- See Also:
Context
-
set
public RDFWriterBuilder set(Symbol symbol, java.lang.Object value)
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:
Context
-
lang
public RDFWriterBuilder lang(Lang lang)
Set the output language to aLang; this will set the format.If
LangandRDFFormatare not set, an attempt is made to guess it from file name or URI on output.If output is to an
OutputStream,LangorRDFFormatmust be set.Any previous setting of
LangorRDFFormatis cleared.- Parameters:
lang-- Returns:
- this
-
format
public RDFWriterBuilder format(RDFFormat format)
Set the output format to aRDFFormat.If
LangandRDFFormatare not set, an attempt is made to guess it from file name or URI on output.If output is to an
OutputStream,LangorRDFFormatmust be set.Any previous setting of
LangorRDFFormatis cleared.- Parameters:
format-- Returns:
- this
-
base
public RDFWriterBuilder base(java.lang.String baseURI)
-
clone
public RDFWriterBuilder clone()
-
build
public RDFWriter build()
-
output
public void output(java.io.OutputStream outputStream)
Short form forbuild().output(outputStream).- Parameters:
outputStream-
-
output
public void output(java.lang.String filename)
Short form forbuild().output(filename).- Parameters:
filename-
-
asString
public java.lang.String asString()
Short form forbuild().asString().
-
-