RDF.Statement.values
You're seeing just the function
values
, go back to RDF.Statement module for more information.
Specs
values(t(), keyword()) :: RDF.Triple.t_values() | RDF.Quad.t_values() | nil
Returns a tuple of native Elixir values from a RDF.Statement
of RDF terms.
When a :context
option is given with a RDF.PropertyMap
, predicates will
be mapped to the terms defined in the RDF.PropertyMap
, if present.
Returns nil
if one of the components of the given tuple is not convertible via RDF.Term.value/1
.
Examples
iex> RDF.Statement.values {~I<http://example.com/S>, ~I<http://example.com/p>, RDF.literal(42)}
{"http://example.com/S", "http://example.com/p", 42}
iex> RDF.Statement.values {~I<http://example.com/S>, ~I<http://example.com/p>, RDF.literal(42), ~I<http://example.com/Graph>}
{"http://example.com/S", "http://example.com/p", 42, "http://example.com/Graph"}
iex> {~I<http://example.com/S>, ~I<http://example.com/p>, RDF.literal(42)}
...> |> RDF.Statement.values(context: %{p: ~I<http://example.com/p>})
{"http://example.com/S", :p, 42}