Struct sophia_api::dataset::adapter::GraphAsDataset
source · [−]pub struct GraphAsDataset<G: ?Sized, H = G>(_, _);
Expand description
The adapter returned by
Implementations
Wrap a graph as a dataset
Trait Implementations
type Quad = FromTriple<G::Triple>
type Quad = FromTriple<G::Triple>
Determine the type of Quad
s
that the methods of this dataset will yield
(see streaming_mode
). Read more
An iterator visiting all quads of this dataset in arbitrary order. Read more
fn quads_with_s<'s, TS>(&'s self, s: &'s TS) -> DQuadSource<'s, Self> where
TS: TTerm + ?Sized,
fn quads_with_s<'s, TS>(&'s self, s: &'s TS) -> DQuadSource<'s, Self> where
TS: TTerm + ?Sized,
An iterator visiting all quads with the given subject. Read more
fn quads_with_p<'s, TP>(&'s self, p: &'s TP) -> DQuadSource<'s, Self> where
TP: TTerm + ?Sized,
fn quads_with_p<'s, TP>(&'s self, p: &'s TP) -> DQuadSource<'s, Self> where
TP: TTerm + ?Sized,
An iterator visiting all quads with the given predicate. Read more
fn quads_with_o<'s, TO>(&'s self, o: &'s TO) -> DQuadSource<'s, Self> where
TO: TTerm + ?Sized,
fn quads_with_o<'s, TO>(&'s self, o: &'s TO) -> DQuadSource<'s, Self> where
TO: TTerm + ?Sized,
An iterator visiting add quads with the given object. Read more
fn quads_with_g<'s, TG>(&'s self, g: Option<&'s TG>) -> DQuadSource<'s, Self> where
TG: TTerm + ?Sized,
fn quads_with_g<'s, TG>(&'s self, g: Option<&'s TG>) -> DQuadSource<'s, Self> where
TG: TTerm + ?Sized,
An iterator visiting add quads with the given graph name. Read more
fn quads_with_sp<'s, TS, TP>(
&'s self,
s: &'s TS,
p: &'s TP
) -> DQuadSource<'s, Self> where
TS: TTerm + ?Sized,
TP: TTerm + ?Sized,
fn quads_with_sp<'s, TS, TP>(
&'s self,
s: &'s TS,
p: &'s TP
) -> DQuadSource<'s, Self> where
TS: TTerm + ?Sized,
TP: TTerm + ?Sized,
An iterator visiting add quads with the given subject and predicate. Read more
fn quads_with_so<'s, TS, TO>(
&'s self,
s: &'s TS,
o: &'s TO
) -> DQuadSource<'s, Self> where
TS: TTerm + ?Sized,
TO: TTerm + ?Sized,
fn quads_with_so<'s, TS, TO>(
&'s self,
s: &'s TS,
o: &'s TO
) -> DQuadSource<'s, Self> where
TS: TTerm + ?Sized,
TO: TTerm + ?Sized,
An iterator visiting add quads with the given subject and object. Read more
fn quads_with_sg<'s, TS, TG>(
&'s self,
s: &'s TS,
g: Option<&'s TG>
) -> DQuadSource<'s, Self> where
TS: TTerm + ?Sized,
TG: TTerm + ?Sized,
fn quads_with_sg<'s, TS, TG>(
&'s self,
s: &'s TS,
g: Option<&'s TG>
) -> DQuadSource<'s, Self> where
TS: TTerm + ?Sized,
TG: TTerm + ?Sized,
An iterator visiting add quads with the given subject and graph name. Read more
fn quads_with_po<'s, TP, TO>(
&'s self,
p: &'s TP,
o: &'s TO
) -> DQuadSource<'s, Self> where
TP: TTerm + ?Sized,
TO: TTerm + ?Sized,
fn quads_with_po<'s, TP, TO>(
&'s self,
p: &'s TP,
o: &'s TO
) -> DQuadSource<'s, Self> where
TP: TTerm + ?Sized,
TO: TTerm + ?Sized,
An iterator visiting add quads with the given predicate and object. Read more
fn quads_with_pg<'s, TP, TG>(
&'s self,
p: &'s TP,
g: Option<&'s TG>
) -> DQuadSource<'s, Self> where
TP: TTerm + ?Sized,
TG: TTerm + ?Sized,
fn quads_with_pg<'s, TP, TG>(
&'s self,
p: &'s TP,
g: Option<&'s TG>
) -> DQuadSource<'s, Self> where
TP: TTerm + ?Sized,
TG: TTerm + ?Sized,
An iterator visiting add quads with the given predicate and graph name. Read more
fn quads_with_og<'s, TO, TG>(
&'s self,
o: &'s TO,
g: Option<&'s TG>
) -> DQuadSource<'s, Self> where
TO: TTerm + ?Sized,
TG: TTerm + ?Sized,
fn quads_with_og<'s, TO, TG>(
&'s self,
o: &'s TO,
g: Option<&'s TG>
) -> DQuadSource<'s, Self> where
TO: TTerm + ?Sized,
TG: TTerm + ?Sized,
An iterator visiting add quads with the given object and graph name. Read more
An iterator visiting add quads with the given subject, predicate and object. Read more
An iterator visiting add quads with the given subject, predicate and graph name. Read more
An iterator visiting add quads with the given subject, object and graph name. Read more
An iterator visiting add quads with the given predicate, object and graph name. Read more
An iterator visiting add quads with the given subject, predicate, object and graph name. Read more
Return true
if this dataset contains the given quad.
Build a Hashset of all the terms used as subject in this Dataset.
Build a Hashset of all the terms used as predicate in this Dataset.
Build a Hashset of all the terms used as object in this Dataset.
Build a Hashset of all the terms used as graph names in this Dataset.
Build a Hashset of all the IRIs used in this Dataset.
Build a Hashset of all the BNodes used in this Dataset.
Build a Hashset of all the Literals used in this Dataset.
Build a Hashset of all the variables used in this Dataset.
fn quads_matching<'s, S, P, O, G>(
&'s self,
ms: &'s S,
mp: &'s P,
mo: &'s O,
mg: &'s G
) -> DQuadSource<'s, Self> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
G: GraphNameMatcher + ?Sized,
fn quads_matching<'s, S, P, O, G>(
&'s self,
ms: &'s S,
mp: &'s P,
mo: &'s O,
mg: &'s G
) -> DQuadSource<'s, Self> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
G: GraphNameMatcher + ?Sized,
An iterator visiting add quads matching the given subject, predicate, object and graph name. Read more
Borrows one of the graphs of this dataset
Borrows mutably one of the graphs of this dataset
fn union_graph<'s, T>(&'s self, gmatcher: T) -> DatasetGraph<Self, &'s Self, T> where
T: GraphNameMatcher + 's,
type MutationError = GraphAsDatasetError<G::MutationError>
type MutationError = GraphAsDatasetError<G::MutationError>
The error type that this dataset may raise during mutations.
Insert the given quad in this dataset. Read more
Remove the given quad from this dataset. Read more
fn insert_all<QS>(
&mut self,
src: QS
) -> StreamResult<usize, QS::Error, <Self as MutableDataset>::MutationError> where
QS: QuadSource,
fn insert_all<QS>(
&mut self,
src: QS
) -> StreamResult<usize, QS::Error, <Self as MutableDataset>::MutationError> where
QS: QuadSource,
Insert into this dataset all quads from the given source. Read more
fn remove_all<QS>(
&mut self,
src: QS
) -> StreamResult<usize, QS::Error, <Self as MutableDataset>::MutationError> where
QS: QuadSource,
fn remove_all<QS>(
&mut self,
src: QS
) -> StreamResult<usize, QS::Error, <Self as MutableDataset>::MutationError> where
QS: QuadSource,
Remove from this dataset all quads from the given source. Read more
fn remove_matching<S, P, O, G>(
&mut self,
ms: &S,
mp: &P,
mo: &O,
mg: &G
) -> MdResult<Self, usize> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
G: GraphNameMatcher + ?Sized,
DTerm<Self>: Clone,
<Self as Dataset>::Error: Into<Self::MutationError>,
fn remove_matching<S, P, O, G>(
&mut self,
ms: &S,
mp: &P,
mo: &O,
mg: &G
) -> MdResult<Self, usize> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
G: GraphNameMatcher + ?Sized,
DTerm<Self>: Clone,
<Self as Dataset>::Error: Into<Self::MutationError>,
Remove all quads matching the given matchers. Read more
fn retain_matching<S, P, O, G>(
&mut self,
ms: &S,
mp: &P,
mo: &O,
mg: &G
) -> Result<(), Self::MutationError> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
G: GraphNameMatcher + ?Sized,
DTerm<Self>: Clone,
<Self as Dataset>::Error: Into<Self::MutationError>,
fn retain_matching<S, P, O, G>(
&mut self,
ms: &S,
mp: &P,
mo: &O,
mg: &G
) -> Result<(), Self::MutationError> where
S: TermMatcher + ?Sized,
P: TermMatcher + ?Sized,
O: TermMatcher + ?Sized,
G: GraphNameMatcher + ?Sized,
DTerm<Self>: Clone,
<Self as Dataset>::Error: Into<Self::MutationError>,
Keep only the quads matching the given matchers. Read more