RDF.ex v0.7.0 RDF.Data protocol View Source
An abstraction over the different data structures for collections of RDF statements.
Link to this section Summary
Functions
Deletes statements from a RDF data structure.
Checks if a RDF data structure contains statements about the given resource.
Returns a RDF.Description
of the given subject.
Returns all RDF.Description
s within a RDF data structure.
Checks if two RDF data structures are equal.
Checks if the given statement exists within a RDF data structure.
Adds statements to a RDF data structure.
Returns the set of all resources used in the objects within the statements of a RDF data structure.
Deletes one statement from a RDF data structure and returns a tuple with deleted statement and the changed data structure.
Returns the set of all properties used within the statements of RDF data structure.
Returns the set of all resources used within the statements of a RDF data structure
Returns the count of all statements of a RDF data structure.
Returns the list of all statements of a RDF data structure.
Returns the count of all resources which are subject of the statements of a RDF data structure.
Returns the set of all resources which are subject of the statements of a RDF data structure.
Returns a nested map of the native Elixir values of a RDF data structure.
Returns a nested map of the native Elixir values of a RDF data structure with values mapped with the given function.
Link to this section Types
Link to this section Functions
Deletes statements from a RDF data structure.
As opposed to the delete
functions on RDF data structures directly, this
function only deletes exactly matching structures.
TODO: rename this function to make the different semantics explicit
Checks if a RDF data structure contains statements about the given resource.
Returns a RDF.Description
of the given subject.
Note: On a RDF.Dataset
this will return an aggregated RDF.Description
with
the statements about this subject from all graphs.
Returns all RDF.Description
s within a RDF data structure.
Note: On a RDF.Dataset
this will return aggregated RDF.Description
s about
the same subject from all graphs.
Checks if two RDF data structures are equal.
Two RDF data structures are considered to be equal if they contain the same triples.
- comparing two
RDF.Description
s it's just the same asRDF.Description.equal?/2
- comparing two
RDF.Graph
s differs inRDF.Graph.equal?/2
in that the graph name is ignored - comparing two
RDF.Dataset
s differs inRDF.Dataset.equal?/2
in that the dataset name is ignored - a
RDF.Description
is equal to aRDF.Graph
, if the graph has just one description which equals the given description - a
RDF.Description
is equal to aRDF.Dataset
, if the dataset has just one graph which contains only the given description - a
RDF.Graph
is equal to aRDF.Dataset
, if the dataset has just one graph which equals the given graph; note that in this case the graph names must match
Checks if the given statement exists within a RDF data structure.
Adds statements to a RDF data structure.
As opposed to the specific add
functions on the RDF data structures, which
always return the same structure type than the first argument, merge
might
result in another RDF data structure, eg. merging two RDF.Description
with
different subjects results in a RDF.Graph
or adding a quad to a RDF.Graph
with a different name than the graph context of the quad results in a
RDF.Dataset
. But it is always guaranteed that the resulting structure has
a RDF.Data
implementation.
Returns the set of all resources used in the objects within the statements of a RDF data structure.
Deletes one statement from a RDF data structure and returns a tuple with deleted statement and the changed data structure.
Returns the set of all properties used within the statements of RDF data structure.
Returns the set of all resources used within the statements of a RDF data structure
Returns the count of all statements of a RDF data structure.
Returns the list of all statements of a RDF data structure.
Returns the count of all resources which are subject of the statements of a RDF data structure.
Returns the set of all resources which are subject of the statements of a RDF data structure.
Returns a nested map of the native Elixir values of a RDF data structure.
Returns a nested map of the native Elixir values of a RDF data structure with values mapped with the given function.