RDF.ex v0.7.0 RDF.Serialization.Writer View Source
General functions for writing the statements of a RDF.Graph
or RDF.Dataset
to a serialization file or string.
You probably won't use these functions directly, but instead use the automatically
generated functions with same name on a RDF.Serialization.Format
, which implicitly
use the proper RDF.Serialization.Encoder
module.
Link to this section Summary
Functions
Encodes and writes a graph or dataset to a file.
Encodes and writes a graph or dataset to a file.
Encodes and writes a graph or dataset to a string.
Encodes and writes a graph or dataset to a string.
Link to this section Functions
Encodes and writes a graph or dataset to a file.
General available serialization-independent options:
:force
- If not set totrue
, an error is raised when the given file already exists (default:false
):file_mode
- A list with the ElixirFile.open
modes to be used for writing (default:[:write, :exclusive]
)
It returns :ok
if successful or {:error, reason}
if an error occurs.
Encodes and writes a graph or dataset to a file.
See write_file
for a list of available options.
As opposed to write_file
, it raises an exception if an error occurs.
Encodes and writes a graph or dataset to a string.
It returns an {:ok, string}
tuple, with string
being the serialized graph or
dataset, or {:error, reason}
if an error occurs.
Encodes and writes a graph or dataset to a string.
As opposed to write_string
, it raises an exception if an error occurs.