RDF.ex v0.1.0 RDF View Source
The top-level module of RDF.ex.
RDF.ex consists of:
modules for the nodes of an RDF graph
- URIs are (currently) represented via Elixirs
URI
struct and should be constructed withRDF.uri/1
RDF.BlankNode
RDF.Literal
- URIs are (currently) represented via Elixirs
- 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
the foundations for the definition of RDF serialization formats
and the implementation of two basic 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 README.
Link to this section Summary
Functions
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.NS.RDF./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/3
See RDF.NS.RDF.rest/4
See RDF.NS.RDF.rest/5
See RDF.NS.RDF.rest/6
See RDF.NS.RDF.subject/3
See RDF.NS.RDF.subject/4
See RDF.NS.RDF.subject/5
See RDF.NS.RDF.subject/6
See RDF.NS.RDF.type/3
See RDF.NS.RDF.type/4
See RDF.NS.RDF.type/5
See RDF.NS.RDF.type/6
Generator function for URIs from strings or term atoms of a RDF.Namespace
Checks if the given value is an URI
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
See RDF.BlankNode.new/0
.
See RDF.BlankNode.new/1
.
See RDF.Dataset.new/0
.
See RDF.Dataset.new/1
.
See RDF.Dataset.new/2
.
See RDF.NS.RDF.first/0
.
See RDF.NS.RDF.first/2
.
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.Graph.new/1
.
See RDF.Graph.new/2
.
See RDF.Graph.new/3
.
See RDF.Graph.new/4
.
See RDF.Literal.new/1
.
See RDF.Literal.new/2
.
See RDF.NS.RDF./0
.
See RDF.NS.RDF.object/0
.
See RDF.NS.RDF.object/2
.
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
.
See RDF.Quad.new/1
.
See RDF.Quad.new/4
.
Checks if the given value is a RDF resource.
Examples
iex> RDF.resource?(RDF.uri("http://example.com/resource"))
true
iex> RDF.resource?(EX.resource)
true
iex> RDF.resource?(RDF.bnode)
true
iex> RDF.resource?(42)
false
See RDF.NS.RDF.rest/0
.
See RDF.NS.RDF.rest/2
.
See RDF.NS.RDF.rest/3
.
See RDF.NS.RDF.rest/4
.
See RDF.NS.RDF.rest/5
.
See RDF.NS.RDF.rest/6
.
See RDF.NS.RDF.subject/0
.
See RDF.NS.RDF.subject/2
.
See RDF.NS.RDF.subject/3
.
See RDF.NS.RDF.subject/4
.
See RDF.NS.RDF.subject/5
.
See RDF.NS.RDF.subject/6
.
See RDF.Triple.new/1
.
See RDF.Triple.new/3
.
See RDF.NS.RDF.type/0
.
See RDF.NS.RDF.type/2
.
See RDF.NS.RDF.type/3
.
See RDF.NS.RDF.type/4
.
See RDF.NS.RDF.type/5
.
See RDF.NS.RDF.type/6
.
Generator function for URIs from strings or term atoms of a RDF.Namespace
.
This function is used for the ~I
sigil.
Examples
iex> RDF.uri("http://www.example.com/foo")
%URI{authority: "www.example.com", fragment: nil, host: "www.example.com",
path: "/foo", port: 80, query: nil, scheme: "http", userinfo: nil}
iex> RDF.uri(RDF.NS.RDFS.Class)
%URI{authority: "www.w3.org", fragment: "Class", host: "www.w3.org",
path: "/2000/01/rdf-schema", port: 80, query: nil, scheme: "http",
userinfo: nil}
iex> RDF.uri("not a uri")
** (RDF.InvalidURIError) string "not a uri" is not a valid URI
Checks if the given value is an URI.
Examples
iex> RDF.uri?("http://www.example.com/foo")
true
iex> RDF.uri?("not a uri")
false
See RDF.NS.RDF.value/0
.
See RDF.NS.RDF.value/2
.
See RDF.NS.RDF.value/3
.
See RDF.NS.RDF.value/4
.
See RDF.NS.RDF.value/5
.
See RDF.NS.RDF.value/6
.