RDF.ex v0.6.1 RDF View Source
The top-level module of RDF.ex.
RDF.ex consists of:
modules for the nodes of an RDF graph
- a facility for the mapping of URIs of a vocabulary to Elixir modules and
functions:
RDF.Vocabulary.Namespace modules for the construction of statements
modules for collections of statements
- functions for working with RDF serializations:
RDF.Serialization behaviours for the definition of RDF serialization formats
and the implementation of various RDF serialization formats
This top-level module provides shortcut functions for the construction of the basic elements and structures of RDF and some general helper functions.
For a general introduction you may refer to the guides on the homepage.
Link to this section Summary
Functions
Checks if the given value is a blank node.
A user-defined RDF.PrefixMap of prefixes to IRI namespaces.
Returns the default_prefixes/0 with additional prefix mappings.
See RDF.Boolean.Value.false/0.
See RDF.NS.RDF.first/3.
See RDF.NS.RDF.first/4.
See RDF.NS.RDF.first/5.
See RDF.NS.RDF.first/6.
See RDF.Graph.new/0.
See RDF.IRI.new/1.
See RDF.NS.RDF.nil/0.
See RDF.NS.RDF.object/3.
See RDF.NS.RDF.object/4.
See RDF.NS.RDF.object/5.
See RDF.NS.RDF.object/6.
See RDF.NS.RDF.predicate/3.
See RDF.NS.RDF.predicate/4.
See RDF.NS.RDF.predicate/5.
See RDF.NS.RDF.predicate/6.
Checks if the given value is a RDF resource.
See RDF.NS.RDF.rest/0.
See RDF.NS.RDF.rest/3.
See RDF.NS.RDF.rest/4.
See RDF.NS.RDF.rest/5.
See RDF.NS.RDF.rest/6.
A fixed set prefixes that will always be part of the default_prefixes/0.
See RDF.NS.RDF.subject/3.
See RDF.NS.RDF.subject/4.
See RDF.NS.RDF.subject/5.
See RDF.NS.RDF.subject/6.
Checks if the given value is a RDF term.
See RDF.Boolean.Value.true/0.
See RDF.NS.RDF.type/0.
See RDF.NS.RDF.type/3.
See RDF.NS.RDF.type/4.
See RDF.NS.RDF.type/5.
See RDF.NS.RDF.type/6.
See RDF.IRI.new/1.
See RDF.NS.RDF.value/3.
See RDF.NS.RDF.value/4.
See RDF.NS.RDF.value/5.
See RDF.NS.RDF.value/6.
Link to this section Functions
bnode() View Source
See RDF.BlankNode.new/0.
bnode(id) View Source
See RDF.BlankNode.new/1.
bnode?(arg1) View Source
Checks if the given value is a blank node.
Examples
iex> RDF.bnode?(RDF.bnode)
true
iex> RDF.bnode?(RDF.iri("http://example.com/resource"))
false
iex> RDF.bnode?(42)
false
boolean(value) View Source
See RDF.Boolean.new/1.
boolean(value, opts) View Source
See RDF.Boolean.new/2.
dataset() View Source
See RDF.Dataset.new/0.
dataset(arg) View Source
See RDF.Dataset.new/1.
dataset(arg1, arg2) View Source
See RDF.Dataset.new/2.
date(value) View Source
See RDF.Date.new/1.
date(value, opts) View Source
See RDF.Date.new/2.
dateTime(value) View Source
See RDF.DateTime.new/1.
dateTime(value, opts) View Source
See RDF.DateTime.new/2.
date_time(value) View Source
See RDF.DateTime.new/1.
date_time(value, opts) View Source
See RDF.DateTime.new/2.
datetime(value) View Source
See RDF.DateTime.new/1.
datetime(value, opts) View Source
See RDF.DateTime.new/2.
decimal(value) View Source
See RDF.Decimal.new/1.
decimal(value, opts) View Source
See RDF.Decimal.new/2.
default_prefixes() View Source
A user-defined RDF.PrefixMap of prefixes to IRI namespaces.
This prefix map will be used implicitly wherever a prefix map is expected, but not provided. For example, when you don't pass a prefix map to the Turtle serializer, this prefix map will be used.
By default the standard_prefixes/0 are part of this prefix map, but you can
define additional default prefixes via the default_prefixes compile-time
configuration.
For example:
config :rdf,
default_prefixes: %{
ex: "http://example.com/"
}
If you don't want the standard_prefixes/0 to be part of the default prefixes,
or you want to map the standard prefixes to different namespaces (strongly discouraged!),
you can set the use_standard_prefixes compile-time configuration flag to false.
config :rdf,
use_standard_prefixes: false
default_prefixes(prefix_mappings) View Source
Returns the default_prefixes/0 with additional prefix mappings.
The prefix_mappings can be given in any format accepted by RDF.PrefixMap.new/1.
description(arg) View Source
description(arg1, arg2) View Source
description(arg1, arg2, arg3) View Source
double(value) View Source
See RDF.Double.new/1.
double(value, opts) View Source
See RDF.Double.new/2.
false() View Source
See RDF.Boolean.Value.false/0.
first() View Source
See RDF.NS.RDF.first/0.
first(s, o) View Source
See RDF.NS.RDF.first/2.
first(s, o1, o2) View Source
See RDF.NS.RDF.first/3.
first(s, o1, o2, o3) View Source
See RDF.NS.RDF.first/4.
first(s, o1, o2, o3, o4) View Source
See RDF.NS.RDF.first/5.
first(s, o1, o2, o3, o4, o5) View Source
See RDF.NS.RDF.first/6.
graph() View Source
See RDF.Graph.new/0.
graph(arg) View Source
See RDF.Graph.new/1.
graph(arg1, arg2) View Source
See RDF.Graph.new/2.
graph(arg1, arg2, arg3) View Source
See RDF.Graph.new/3.
graph(arg1, arg2, arg3, arg4) View Source
See RDF.Graph.new/4.
integer(value) View Source
See RDF.Integer.new/1.
integer(value, opts) View Source
See RDF.Integer.new/2.
iri(value) View Source
See RDF.IRI.new/1.
iri!(value) View Source
See RDF.IRI.new!/1.
iri?(value) View Source
See RDF.IRI.valid?/1.
langString() View Source
langString(value) View Source
See RDF.LangString.new/1.
langString(value, opts) View Source
See RDF.LangString.new/2.
lang_string(value) View Source
See RDF.LangString.new/1.
lang_string(value, opts) View Source
See RDF.LangString.new/2.
list(native_list) View Source
list(head, graph) View Source
list?(description) View Source
See RDF.List.node?/1.
list?(resource, graph) View Source
See RDF.List.node?/2.
literal(value) View Source
See RDF.Literal.new/1.
literal(value, opts) View Source
See RDF.Literal.new/2.
See RDF.NS.RDF.nil/0.
object() View Source
See RDF.NS.RDF.object/0.
object(s, o) View Source
See RDF.NS.RDF.object/2.
object(s, o1, o2) View Source
See RDF.NS.RDF.object/3.
object(s, o1, o2, o3) View Source
See RDF.NS.RDF.object/4.
object(s, o1, o2, o3, o4) View Source
See RDF.NS.RDF.object/5.
object(s, o1, o2, o3, o4, o5) View Source
See RDF.NS.RDF.object/6.
predicate() View Source
predicate(s, o) View Source
predicate(s, o1, o2) View Source
See RDF.NS.RDF.predicate/3.
predicate(s, o1, o2, o3) View Source
See RDF.NS.RDF.predicate/4.
predicate(s, o1, o2, o3, o4) View Source
See RDF.NS.RDF.predicate/5.
predicate(s, o1, o2, o3, o4, o5) View Source
See RDF.NS.RDF.predicate/6.
prefix_map(prefixes) View Source
See RDF.PrefixMap.new/1.
quad(tuple) View Source
See RDF.Quad.new/1.
quad(s, p, o, g) View Source
See RDF.Quad.new/4.
read_file(filename, opts \\ []) View Source
read_file!(filename, opts \\ []) View Source
read_string(content, opts) View Source
read_string!(content, opts) View Source
resource?(value) View Source
Checks if the given value is a RDF resource.
Examples
Supposed EX is a RDF.Vocabulary.Namespace and Foo is not.
iex> RDF.resource?(RDF.iri("http://example.com/resource"))
true
iex> RDF.resource?(EX.resource)
true
iex> RDF.resource?(EX.Resource)
true
iex> RDF.resource?(Foo.Resource)
false
iex> RDF.resource?(RDF.bnode)
true
iex> RDF.resource?(RDF.integer(42))
false
iex> RDF.resource?(42)
false
rest() View Source
See RDF.NS.RDF.rest/0.
rest(s, o) View Source
See RDF.NS.RDF.rest/2.
rest(s, o1, o2) View Source
See RDF.NS.RDF.rest/3.
rest(s, o1, o2, o3) View Source
See RDF.NS.RDF.rest/4.
rest(s, o1, o2, o3, o4) View Source
See RDF.NS.RDF.rest/5.
rest(s, o1, o2, o3, o4, o5) View Source
See RDF.NS.RDF.rest/6.
standard_prefixes() View Source
A fixed set prefixes that will always be part of the default_prefixes/0.
%RDF.PrefixMap{
map: %{
rdf: ~I<http://www.w3.org/1999/02/22-rdf-syntax-ns#>,
rdfs: ~I<http://www.w3.org/2000/01/rdf-schema#>,
xsd: ~I<http://www.w3.org/2001/XMLSchema#>
}
}
See default_prefixes/0, if you don't want these standard prefixes to be part
of the default prefixes.
string(value) View Source
See RDF.String.new/1.
string(value, opts) View Source
See RDF.String.new/2.
subject() View Source
See RDF.NS.RDF.subject/0.
subject(s, o) View Source
See RDF.NS.RDF.subject/2.
subject(s, o1, o2) View Source
See RDF.NS.RDF.subject/3.
subject(s, o1, o2, o3) View Source
See RDF.NS.RDF.subject/4.
subject(s, o1, o2, o3, o4) View Source
See RDF.NS.RDF.subject/5.
subject(s, o1, o2, o3, o4, o5) View Source
See RDF.NS.RDF.subject/6.
term?(value) View Source
Checks if the given value is a RDF term.
Examples
Supposed EX is a RDF.Vocabulary.Namespace and Foo is not.
iex> RDF.term?(RDF.iri("http://example.com/resource"))
true
iex> RDF.term?(EX.resource)
true
iex> RDF.term?(EX.Resource)
true
iex> RDF.term?(Foo.Resource)
false
iex> RDF.term?(RDF.bnode)
true
iex> RDF.term?(RDF.integer(42))
true
iex> RDF.term?(42)
false
time(value) View Source
See RDF.Time.new/1.
time(value, opts) View Source
See RDF.Time.new/2.
triple(tuple) View Source
See RDF.Triple.new/1.
triple(s, p, o) View Source
See RDF.Triple.new/3.
true() View Source
See RDF.Boolean.Value.true/0.
type() View Source
See RDF.NS.RDF.type/0.
type(s, o) View Source
See RDF.NS.RDF.type/2.
type(s, o1, o2) View Source
See RDF.NS.RDF.type/3.
type(s, o1, o2, o3) View Source
See RDF.NS.RDF.type/4.
type(s, o1, o2, o3, o4) View Source
See RDF.NS.RDF.type/5.
type(s, o1, o2, o3, o4, o5) View Source
See RDF.NS.RDF.type/6.
uri(value) View Source
See RDF.IRI.new/1.
uri!(value) View Source
See RDF.IRI.new!/1.
uri?(value) View Source
See RDF.IRI.valid?/1.
value() View Source
See RDF.NS.RDF.value/0.
value(s, o) View Source
See RDF.NS.RDF.value/2.
value(s, o1, o2) View Source
See RDF.NS.RDF.value/3.
value(s, o1, o2, o3) View Source
See RDF.NS.RDF.value/4.
value(s, o1, o2, o3, o4) View Source
See RDF.NS.RDF.value/5.
value(s, o1, o2, o3, o4, o5) View Source
See RDF.NS.RDF.value/6.