RDF.Sigils (RDF.ex v0.9.0) View Source
Sigils for the most common types of RDF nodes.
Link to this section Summary
Functions
Handles the sigil ~B
for blank nodes.
Handles the sigil ~I
for IRIs.
Handles the sigil ~L
for plain Literals.
Link to this section Functions
Handles the sigil ~B
for blank nodes.
Examples
iex> import RDF.Sigils
iex> ~B<foo>
RDF.bnode("foo")
Handles the sigil ~I
for IRIs.
Note: The given IRI string is precompiled into an RDF.IRI
struct.
Examples
iex> import RDF.Sigils
iex> ~I<http://example.com>
RDF.iri("http://example.com")
Handles the sigil ~L
for plain Literals.
The sigil modifier can be used to specify a language tag.
Note: Languages with subtags are not supported.
Examples
iex> import RDF.Sigils
iex> ~L"foo"
RDF.literal("foo")
iex> ~L"foo"en
RDF.literal("foo", language: "en")