RDF.Statement.new

You're seeing just the function new, go back to RDF.Statement module for more information.

Creates a RDF.Triple or RDF.Quad with proper RDF values.

An error is raised when the given elements are not coercible to RDF values.

Note: The RDF.statement function is a shortcut to this function.

Examples

iex> RDF.Statement.new({EX.S, EX.p, 42})
{RDF.iri("http://example.com/S"), RDF.iri("http://example.com/p"), RDF.literal(42)}

iex> RDF.Statement.new({EX.S, EX.p, 42, EX.Graph})
{RDF.iri("http://example.com/S"), RDF.iri("http://example.com/p"), RDF.literal(42), RDF.iri("http://example.com/Graph")}

See RDF.Triple.new/3.

See RDF.Quad.new/4.