[][src]Struct sophia::dataset::inmem::OgpsWrapper

pub struct OgpsWrapper<T> where
    T: IndexedDataset
{ /* fields omitted */ }

A DatasetWrapper indexing quads by object, then by graph name, then by predicate, then by subject.

Compared to its wrapped dataset, it overrides the methods that can efficiently be implemented using this index.

Since it must be able to produce quads instead of the underlying datasets, it is limited to wrapping datasets whose quads are ([&Term<H>;3], Option<&Term<H>>).

Methods

impl<T> OgpsWrapper<T> where
    T: IndexedDataset + Default,
    T::Index: Default
[src]

pub fn new() -> Self[src]

Trait Implementations

impl<T> IndexedDataset for OgpsWrapper<T> where
    T: IndexedDataset + for<'a> Dataset<'a, Quad = ([&'a Term<<T as IndexedDataset>::TermData>; 3], Option<&'a Term<<T as IndexedDataset>::TermData>>)>, 
[src]

type Index = T::Index

The type used to represent terms internally.

type TermData = T::TermData

impl<'a, T> DatasetWrapper<'a> for OgpsWrapper<T> where
    T: IndexedDataset + Dataset<'a, Quad = ([&'a Term<<T as IndexedDataset>::TermData>; 3], Option<&'a Term<<T as IndexedDataset>::TermData>>)>, 
[src]

type Wrapped = T

The type of the wrapped dataset.

fn dw_quads(&'a self) -> DQuadSource<'a, Self::Wrapped>[src]

Mimmic the iter method.

fn dw_quads_with_s<T>(
    &'a self,
    s: &'a Term<T>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData
[src]

Mimmic the quads_with_s method.

fn dw_quads_with_p<T>(
    &'a self,
    p: &'a Term<T>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData
[src]

Mimmic the quads_with_p method.

fn dw_quads_with_g<T>(
    &'a self,
    g: Option<&'a Term<T>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData
[src]

Mimmic the quads_with_g method.

fn dw_quads_with_sp<T, U>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData
[src]

Mimmic the quads_with_sp method.

fn dw_quads_with_so<T, U>(
    &'a self,
    s: &'a Term<T>,
    o: &'a Term<U>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData
[src]

Mimmic the quads_with_so method.

fn dw_quads_with_sg<T, U>(
    &'a self,
    s: &'a Term<T>,
    g: Option<&'a Term<U>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData
[src]

Mimmic the quads_with_sg method.

fn dw_quads_with_po<T, U>(
    &'a self,
    p: &'a Term<T>,
    o: &'a Term<U>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData
[src]

Mimmic the quads_with_po method.

fn dw_quads_with_pg<T, U>(
    &'a self,
    p: &'a Term<T>,
    g: Option<&'a Term<U>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData
[src]

Mimmic the quads_with_pg method.

fn dw_quads_with_spo<T, U, V>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>,
    o: &'a Term<V>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData,
    V: TermData
[src]

Mimmic the quads_with_spo method.

fn dw_quads_with_spg<T, U, V>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>,
    g: Option<&'a Term<V>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData,
    V: TermData
[src]

Mimmic the quads_with_spg method.

fn dw_quads_with_sog<T, U, V>(
    &'a self,
    s: &'a Term<T>,
    o: &'a Term<U>,
    g: Option<&'a Term<V>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData,
    V: TermData
[src]

Mimmic the quads_with_sog method.

fn dw_quads_with_spog<T, U, V, W>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>,
    o: &'a Term<V>,
    g: Option<&'a Term<W>>
) -> DQuadSource<'a, Self::Wrapped> where
    T: TermData,
    U: TermData,
    V: TermData,
    W: TermData
[src]

Mimmic the quads_with_spog method.

fn dw_contains<T, U, V, W>(
    &'a self,
    s: &'a Term<T>,
    p: &'a Term<U>,
    o: &'a Term<V>,
    g: Option<&'a Term<W>>
) -> DResult<'a, Self::Wrapped, bool> where
    T: TermData,
    U: TermData,
    V: TermData,
    W: TermData
[src]

Mimmic the contains method.

fn dw_subjects(&'a self) -> DResultTermSet<'a, Self::Wrapped>[src]

Mimmic the subjects method.

fn dw_predicates(&'a self) -> DResultTermSet<'a, Self::Wrapped>[src]

Mimmic the predicates method.

fn dw_graph_names(&'a self) -> DResultTermSet<'a, Self::Wrapped>[src]

Mimmic the graph_names method.

fn dw_iris(&'a self) -> DResultTermSet<'a, Self::Wrapped>[src]

Mimmic the iris method.

fn dw_bnodes(&'a self) -> DResultTermSet<'a, Self::Wrapped>[src]

Mimmic the bnodes method.

fn dw_literals(&'a self) -> DResultTermSet<'a, Self::Wrapped>[src]

Mimmic the literals method.

fn dw_variables(&'a self) -> DResultTermSet<'a, Self::Wrapped>[src]

Mimmic the variables method.

impl<T> IndexedDatasetWrapper<T> for OgpsWrapper<T> where
    T: IndexedDataset
[src]

impl<'a, T> Dataset<'a> for OgpsWrapper<T> where
    T: IndexedDataset + Dataset<'a, Quad = ([&'a Term<<T as IndexedDataset>::TermData>; 3], Option<&'a Term<<T as IndexedDataset>::TermData>>)>, 
[src]

type Quad = <Self::Wrapped as Dataset<'a>>::Quad

The type of Quads that the methods of this dataset will yield. Read more

type Error = <Self::Wrapped as Dataset<'a>>::Error

The error type that this dataset may raise. Read more

fn quads_matching<S: ?Sized, P: ?Sized, O: ?Sized, G: ?Sized>(
    &'a self,
    ms: &'a S,
    mp: &'a P,
    mo: &'a O,
    mg: &'a G
) -> DQuadSource<'a, Self> where
    S: TermMatcher,
    P: TermMatcher,
    O: TermMatcher,
    G: GraphNameMatcher
[src]

An iterator visiting add quads matching the given subject, predicate, object and graph name. Read more

fn graph_names(&'a self) -> DResultTermSet<'a, Self>[src]

Build a Hashset of all the terms used as graph names in this Dataset.

fn graph<T>(
    &self,
    graph_name: Option<&Term<T>>
) -> DatasetGraph<Self, &Self, Option<BoxTerm>> where
    T: TermData
[src]

Borrows one of the graphs of this dataset

fn graph_mut<T>(
    &mut self,
    graph_name: Option<&Term<T>>
) -> DatasetGraph<Self, &mut Self, Option<BoxTerm>> where
    T: TermData
[src]

Borrows mutably one of the graphs of this dataset

fn union_graph<T>(&'a self, gmatcher: T) -> DatasetGraph<Self, &Self, T> where
    T: GraphNameMatcher
[src]

Borrows a graph containing the union of all graphs matched by gmatcher

impl<T> MutableDataset for OgpsWrapper<T> where
    T: IndexedDataset + for<'a> Dataset<'a, Quad = ([&'a Term<<T as IndexedDataset>::TermData>; 3], Option<&'a Term<<T as IndexedDataset>::TermData>>)>, 
[src]

type MutationError = Never

The error type that this dataset may raise during mutations. Read more

fn inserter(&mut self) -> Inserter<Self>[src]

Return a QuadSink that will insert into this dataset all the quads it receives. Read more

fn insert_all<'a, TS>(
    &mut self,
    src: &mut TS
) -> CoercedResult<usize, TS::Error, Self::MutationError> where
    TS: QuadSource<'a>,
    TS::Error: CoercibleWith<Self::MutationError>, 
[src]

Insert into this dataset all quads from the given source.

fn remover(&mut self) -> Remover<Self>[src]

Return a QuadSink that will remove from this dataset all the quads it receives. Read more

fn remove_all<'a, TS>(
    &mut self,
    src: &mut TS
) -> CoercedResult<usize, TS::Error, Self::MutationError> where
    TS: QuadSource<'a>,
    TS::Error: CoercibleWith<Self::MutationError>, 
[src]

Remove from this dataset all quads from the given source.

fn remove_matching<S: ?Sized, P: ?Sized, O: ?Sized, G: ?Sized>(
    &mut self,
    ms: &S,
    mp: &P,
    mo: &O,
    mg: &G
) -> MDResult<Self, usize> where
    S: TermMatcher,
    P: TermMatcher,
    O: TermMatcher,
    G: GraphNameMatcher,
    Self::Error: Into<Self::MutationError>,
    Never: CoercibleWith<Self::MutationError>,
    Self::MutationError: From<CoercedError<Never, Self::MutationError>>, 
[src]

Remove all quads matching the given matchers. Read more

fn retain<S: ?Sized, P: ?Sized, O: ?Sized, G: ?Sized>(
    &mut self,
    ms: &S,
    mp: &P,
    mo: &O,
    mg: &G
) -> MDResult<Self, ()> where
    S: TermMatcher,
    P: TermMatcher,
    O: TermMatcher,
    G: GraphNameMatcher,
    Self::Error: Into<Self::MutationError>,
    Never: CoercibleWith<Self::MutationError>,
    Self::MutationError: From<CoercedError<Never, Self::MutationError>>, 
[src]

Keep only the quads matching the given matchers. Read more

impl<T> SetDataset for OgpsWrapper<T> where
    T: IndexedDataset + SetDataset
[src]

impl<T: Default> Default for OgpsWrapper<T> where
    T: IndexedDataset,
    T::Index: Default,
    T::Index: Default,
    T::Index: Default,
    T::Index: Default,
    T::Index: Default,
    T::Index: Default
[src]

Auto Trait Implementations

impl<T> Sync for OgpsWrapper<T> where
    T: Sync,
    <T as IndexedDataset>::Index: Sync

impl<T> Send for OgpsWrapper<T> where
    T: Send,
    <T as IndexedDataset>::Index: Send

impl<T> Unpin for OgpsWrapper<T> where
    T: Unpin,
    <T as IndexedDataset>::Index: Unpin

impl<T> RefUnwindSafe for OgpsWrapper<T> where
    T: RefUnwindSafe,
    <T as IndexedDataset>::Index: RefUnwindSafe

impl<T> UnwindSafe for OgpsWrapper<T> where
    T: UnwindSafe,
    <T as IndexedDataset>::Index: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]