RDF.NTriples (RDF.ex v0.9.0) View Source

RDF.NTriples provides support for reading and writing the N-Triples serialization format.

N-Triples is a line-based plain-text format for encoding an RDF graph. It is a very restricted, explicit and well-defined subset of both Turtle and Notation3 (N3).

An example of an RDF statement in N-Triples format:

<https://hex.pm/> <http://purl.org/dc/terms/title> "Hex" .

see https://www.w3.org/TR/n-triples/

Link to this section Summary

Link to this section Functions

Link to this function

read_file(file, opts \\ [])

View Source

Specs

read_file(Path.t(), keyword()) ::
  {:ok, RDF.Graph.t() | RDF.Dataset.t()} | {:error, any()}
Link to this function

read_file!(file, opts \\ [])

View Source

Specs

read_file!(Path.t(), keyword()) :: RDF.Graph.t() | RDF.Dataset.t()
Link to this function

read_string(content, opts \\ [])

View Source

Specs

read_string(String.t(), keyword()) ::
  {:ok, RDF.Graph.t() | RDF.Dataset.t()} | {:error, any()}
Link to this function

read_string!(content, opts \\ [])

View Source

Specs

read_string!(String.t(), keyword()) :: RDF.Graph.t() | RDF.Dataset.t()
Link to this function

write_file(data, path, opts \\ [])

View Source

Specs

write_file(RDF.Graph.t() | RDF.Dataset.t(), Path.t(), keyword()) ::
  :ok | {:error, any()}
Link to this function

write_file!(data, path, opts \\ [])

View Source

Specs

write_file!(RDF.Graph.t() | RDF.Dataset.t(), Path.t(), keyword()) :: :ok
Link to this function

write_string(data, opts \\ [])

View Source

Specs

write_string(RDF.Graph.t() | RDF.Dataset.t(), keyword()) ::
  {:ok, String.t()} | {:error, any()}
Link to this function

write_string!(data, opts \\ [])

View Source

Specs

write_string!(RDF.Graph.t() | RDF.Dataset.t(), keyword()) :: String.t()