Struct sophia_api::dataset::adapter::DatasetGraph
source · [−]pub struct DatasetGraph<D: ?Sized, E, M: GraphNameMatcher> { /* private fields */ }
Expand description
The adapter returned by
Dataset::graph
,
Dataset::graph_mut
, and
Dataset::union_graph
.
Implementations
Wrap a dataset as a graph
Trait Implementations
impl<D, E, M> Graph for DatasetGraph<D, E, M> where
D: Dataset + ?Sized,
E: Borrow<D>,
M: GraphNameMatcher,
impl<D, E, M> Graph for DatasetGraph<D, E, M> where
D: Dataset + ?Sized,
E: Borrow<D>,
M: GraphNameMatcher,
Determine the type of Triple
s
that the methods of this graph will yield
(see streaming_mode
) Read more
An iterator visiting all triples of this graph in arbitrary order. Read more
fn triples_with_s<'s, TS>(&'s self, s: &'s TS) -> GTripleSource<'s, Self> where
TS: TTerm + ?Sized,
fn triples_with_s<'s, TS>(&'s self, s: &'s TS) -> GTripleSource<'s, Self> where
TS: TTerm + ?Sized,
An iterator visiting all triples with the given subject. Read more
fn triples_with_p<'s, TP>(&'s self, p: &'s TP) -> GTripleSource<'s, Self> where
TP: TTerm + ?Sized,
fn triples_with_p<'s, TP>(&'s self, p: &'s TP) -> GTripleSource<'s, Self> where
TP: TTerm + ?Sized,
An iterator visiting all triples with the given predicate. Read more
fn triples_with_o<'s, TO>(&'s self, o: &'s TO) -> GTripleSource<'s, Self> where
TO: TTerm + ?Sized,
fn triples_with_o<'s, TO>(&'s self, o: &'s TO) -> GTripleSource<'s, Self> where
TO: TTerm + ?Sized,
An iterator visiting all triples with the given object. Read more
fn triples_with_sp<'s, TS, TP>(
&'s self,
s: &'s TS,
p: &'s TP
) -> GTripleSource<'s, Self> where
TS: TTerm + ?Sized,
TP: TTerm + ?Sized,
fn triples_with_sp<'s, TS, TP>(
&'s self,
s: &'s TS,
p: &'s TP
) -> GTripleSource<'s, Self> where
TS: TTerm + ?Sized,
TP: TTerm + ?Sized,
An iterator visiting all triples with the given subject and predicate. Read more
fn triples_with_so<'s, TS, TO>(
&'s self,
s: &'s TS,
o: &'s TO
) -> GTripleSource<'s, Self> where
TS: TTerm + ?Sized,
TO: TTerm + ?Sized,
fn triples_with_so<'s, TS, TO>(
&'s self,
s: &'s TS,
o: &'s TO
) -> GTripleSource<'s, Self> where
TS: TTerm + ?Sized,
TO: TTerm + ?Sized,
An iterator visiting all triples with the given subject and object. Read more
fn triples_with_po<'s, TP, TO>(
&'s self,
p: &'s TP,
o: &'s TO
) -> GTripleSource<'s, Self> where
TP: TTerm + ?Sized,
TO: TTerm + ?Sized,
fn triples_with_po<'s, TP, TO>(
&'s self,
p: &'s TP,
o: &'s TO
) -> GTripleSource<'s, Self> where
TP: TTerm + ?Sized,
TO: TTerm + ?Sized,
An iterator visiting all triples with the given predicate and object. Read more
An iterator visiting all triples with the given subject, predicate and object. Read more
Return true
if this graph contains the given triple.
fn triples_matching<'s, S, P, O>(
&'s self,
ms: &'s S,
mp: &'s P,
mo: &'s O
) -> GTripleSource<'s, Self> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
fn triples_matching<'s, S, P, O>(
&'s self,
ms: &'s S,
mp: &'s P,
mo: &'s O
) -> GTripleSource<'s, Self> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
An iterator visiting all triples matching the given subject, predicate and object. Read more
Build a Hashset of all the terms used as subject in this Graph.
Build a Hashset of all the terms used as predicate in this Graph.
Build a Hashset of all the terms used as object in this Graph.
Build a Hashset of all the IRIs used in this Graph.
Build a Hashset of all the BNodes used in this Graph.
Build a Hashset of all the Literals used in this Graph.
Build a Hashset of all the variables used in this Graph.
Dataset
adapter borrowing this graph
Dataset
adapter borrowing this graph mutably
Dataset
adapter taking ownership of this graph
impl<D, E, T> MutableGraph for DatasetGraph<D, E, Option<&T>> where
D: MutableDataset,
E: BorrowMut<D>,
T: TTerm + ?Sized,
impl<D, E, T> MutableGraph for DatasetGraph<D, E, Option<&T>> where
D: MutableDataset,
E: BorrowMut<D>,
T: TTerm + ?Sized,
type MutationError = D::MutationError
type MutationError = D::MutationError
The error type that this graph may raise during mutations.
Insert the given triple in this graph. Read more
Remove the given triple from this graph. Read more
fn insert_all<TS>(
&mut self,
src: TS
) -> StreamResult<usize, TS::Error, <Self as MutableGraph>::MutationError> where
TS: TripleSource,
fn insert_all<TS>(
&mut self,
src: TS
) -> StreamResult<usize, TS::Error, <Self as MutableGraph>::MutationError> where
TS: TripleSource,
Insert into this graph all triples from the given source. Read more
fn remove_all<TS>(
&mut self,
src: TS
) -> StreamResult<usize, TS::Error, <Self as MutableGraph>::MutationError> where
TS: TripleSource,
fn remove_all<TS>(
&mut self,
src: TS
) -> StreamResult<usize, TS::Error, <Self as MutableGraph>::MutationError> where
TS: TripleSource,
Remove from this graph all triples from the given source. Read more
fn remove_matching<'s, S, P, O>(
&'s mut self,
ms: &S,
mp: &P,
mo: &O
) -> Result<usize, Self::MutationError> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
GTerm<Self>: Clone,
<Self as Graph>::Error: Into<Self::MutationError>,
fn remove_matching<'s, S, P, O>(
&'s mut self,
ms: &S,
mp: &P,
mo: &O
) -> Result<usize, Self::MutationError> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
GTerm<Self>: Clone,
<Self as Graph>::Error: Into<Self::MutationError>,
Remove all triples matching the given matchers. Read more
fn retain_matching<'s, S, P, O>(
&'s mut self,
ms: &S,
mp: &P,
mo: &O
) -> Result<(), Self::MutationError> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
GTerm<Self>: Clone,
<Self as Graph>::Error: Into<Self::MutationError>,
fn retain_matching<'s, S, P, O>(
&'s mut self,
ms: &S,
mp: &P,
mo: &O
) -> Result<(), Self::MutationError> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
GTerm<Self>: Clone,
<Self as Graph>::Error: Into<Self::MutationError>,
Keep only the triples matching the given matchers. Read more