RDF.Sigils (RDF.ex v0.8.2) 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

Link to this macro

sigil_B(arg, list)

View Source (macro)

Handles the sigil ~B for blank nodes.

Examples

iex> import RDF.Sigils
iex> ~B<foo>
RDF.bnode("foo")
Link to this macro

sigil_I(arg, list)

View Source (macro)

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")
Link to this macro

sigil_L(value, language)

View Source (macro)

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")