Class RDFWriterBuilder


  • public class RDFWriterBuilder
    extends java.lang.Object
    • 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 - A Graph.
        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 - A Model.
        Returns:
        this
      • source

        public RDFWriterBuilder source​(DatasetGraph dataset)
        Set the source of writing to the DatasetGraph argument.

        Any previous source setting is cleared.

        Parameters:
        dataset - A DatasetGraph.
        Returns:
        this
      • source

        public RDFWriterBuilder source​(Dataset dataset)
        Set the source of writing to the DatasetGraph argument.

        Any previous source setting is cleared.

        Equivalent to source(dataset.asDatasetGraph())

        Parameters:
        dataset - A DatasetGraph.
        Returns:
        this
      • context

        public RDFWriterBuilder context​(Context context)
        Set the context for the writer when built.
        Parameters:
        context -
        Returns:
        this
        See Also:
        Context
      • set

        public RDFWriterBuilder set​(Symbol symbol,
                                    boolean value)
        Add a setting to the context for the writer when built.
        Parameters:
        symbol -
        value -
        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 a Lang; this will set the format.

        If Lang and RDFFormat are not set, an attempt is made to guess it from file name or URI on output.

        If output is to an OutputStream, Lang or RDFFormat must be set.

        Any previous setting of Lang or RDFFormat is cleared.

        Parameters:
        lang -
        Returns:
        this
      • format

        public RDFWriterBuilder format​(RDFFormat format)
        Set the output format to a RDFFormat.

        If Lang and RDFFormat are not set, an attempt is made to guess it from file name or URI on output.

        If output is to an OutputStream, Lang or RDFFormat must be set.

        Any previous setting of Lang or RDFFormat is cleared.

        Parameters:
        format -
        Returns:
        this
      • output

        public void output​(java.io.OutputStream outputStream)
        Short form for build().output(outputStream).
        Parameters:
        outputStream -
      • output

        public void output​(java.lang.String filename)
        Short form for build().output(filename).
        Parameters:
        filename -
      • asString

        public java.lang.String asString()
        Short form for build().asString().