RDF.Dataset.get

You're seeing just the function get, go back to RDF.Dataset module for more information.
Link to this function

get(dataset, graph_name, default \\ nil)

View Source

Specs

get(t(), RDF.Statement.graph_name() | nil, RDF.Graph.t() | nil) ::
  RDF.Graph.t() | nil

Fetches the RDF.Graph with the given name.

When a graph with the given name can not be found can not be found the optionally given default value or nil is returned

Examples

iex> dataset = RDF.Dataset.new([{EX.S1, EX.P1, EX.O1, EX.Graph}, {EX.S2, EX.P2, EX.O2}])
...> RDF.Dataset.get(dataset, EX.Graph)
RDF.Graph.new({EX.S1, EX.P1, EX.O1}, name: EX.Graph)
iex> RDF.Dataset.get(dataset, nil)
RDF.Graph.new({EX.S2, EX.P2, EX.O2})
iex> RDF.Dataset.get(dataset, EX.Foo)
nil
iex> RDF.Dataset.get(dataset, EX.Foo, :bar)
:bar