RDF.ex v0.4.0 RDF.Statement View Source
Helper functions for RDF statements.
A RDF statement is either a RDF.Triple
or a RDF.Quad
.
Link to this section Summary
Functions
Creates a RDF.Statement
tuple with proper RDF values
Link to this section Types
Link to this type
coercible_graph_name()
View Source
coercible_graph_name() :: graph_name | atom | String.t
Link to this section Functions
Creates a RDF.Statement
tuple with proper RDF values.
An error is raised when the given elements are not coercible to RDF values.
Examples
iex> RDF.Statement.new {"http://example.com/S", "http://example.com/p", 42}
{~I<http://example.com/S>, ~I<http://example.com/p>, RDF.literal(42)}
iex> RDF.Statement.new {"http://example.com/S", "http://example.com/p", 42, "http://example.com/Graph"}
{~I<http://example.com/S>, ~I<http://example.com/p>, RDF.literal(42), ~I<http://example.com/Graph>}