RDF.ex v0.1.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 convertible_graph_name() View Source
convertible_graph_name() :: graph_name | atom | String.t
Link to this type convertible_object() View Source
convertible_object() :: object | atom | String.t
Link to this type convertible_predicate() View Source
convertible_predicate() :: predicate | atom | String.t
Link to this type convertible_subject() View Source
convertible_subject() :: subject | atom | String.t
Link to this type predicate() View Source
predicate() :: URI.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 convertible 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>}