[−][src]Trait grdf::Dataset
gRDF dataset.
A dataset is a collection of graphs. It is made of a default graph and a collection of named graphs.
A dataset can also be seen as a collection of Quad
s.
Associated Types
type Graph: Graph<T>
Type of graphs in the dataset.
type Graphs: Iterator<Item = (Option<&'a T>, &'a Self::Graph)>
Graph iterator.
Each graph is associated to its name (if any).
type Quads: Iterator<Item = Quad<&'a T>>
Quads iterator.
Required methods
fn graph(&self, id: Option<&T>) -> Option<&Self::Graph>
Get the graph with the given name.
Input None
to get the default graph.
Note to implementors: the default graph should always exists.
fn graphs<'a>(&'a self) -> Self::Graphs
Returns an iterator over the graphs of the dataset.
fn quads<'a>(&'a self) -> Self::Quads
Returns an iterator over the quads of the dataset.
Provided methods
fn default_graph(&self) -> &Self::Graph
Get the default graph of the dataset.
This is the same as graph(None)
.
Note to implementors: the default graph should always exists.
fn subjects<'a>(
&'a self,
id: Option<&T>
) -> Option<<<Self::Graph as Graph<T>>::Iter as Iter<'a, T>>::Subjects>
&'a self,
id: Option<&T>
) -> Option<<<Self::Graph as Graph<T>>::Iter as Iter<'a, T>>::Subjects>
Iterate through all the subjects of the given graph.
fn predicates<'a>(
&'a self,
id: Option<&T>,
subject: &T
) -> Option<<<Self::Graph as Graph<T>>::Iter as Iter<'a, T>>::Predicates>
&'a self,
id: Option<&T>,
subject: &T
) -> Option<<<Self::Graph as Graph<T>>::Iter as Iter<'a, T>>::Predicates>
Iterate through all the predicates of the given subject of the given graph.
fn objects<'a>(
&'a self,
id: Option<&T>,
subject: &T,
predicate: &T
) -> Option<<<Self::Graph as Graph<T>>::Iter as Iter<'a, T>>::Objects>
&'a self,
id: Option<&T>,
subject: &T,
predicate: &T
) -> Option<<<Self::Graph as Graph<T>>::Iter as Iter<'a, T>>::Objects>
Iterate through all the objects of the given subect and predicate of the given graph.