Skip to main content

StoreGraph

Struct StoreGraph 

Source
pub struct StoreGraph<B: SyncBackend + Send + Sync + 'static> { /* private fields */ }
Expand description

An oxilite store seen as a rudof graph: its default graph, or every graph merged.

Implementations§

Source§

impl<B: SyncBackend + Send + Sync + 'static> StoreGraph<B>

Source

pub fn new(store: Store<B>) -> Self

The default graph of store.

Source

pub fn with_union(self, union: bool) -> Self

Reads the union of all graphs instead of the default graph.

Source

pub fn with_prefixmap(self, pm: PrefixMap) -> Self

Prefixes used to show nodes in reports.

Trait Implementations§

Source§

impl<B: SyncBackend + Send + Sync + 'static> Debug for StoreGraph<B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B: SyncBackend + Send + Sync + 'static> NeighsRDF for StoreGraph<B>

Source§

fn triples(&self) -> Result<impl Iterator<Item = Triple>, GraphError>

Returns an iterator over all triples in the RDF graph. Read more
Source§

fn triples_matching<S, P, O>( &self, subject: &S, predicate: &P, object: &O, ) -> Result<impl Iterator<Item = Triple> + '_, GraphError>

Returns an iterator over triples matching the given pattern. Read more
Source§

fn contains<S, P, O>( &self, subject: &S, predicate: &P, object: &O, ) -> Result<bool, Self::Err>
where S: Matcher<Self::Subject>, P: Matcher<Self::IRI>, O: Matcher<Self::Term>,

Checks whether the graph contains at least one triple matching the pattern. Read more
Source§

fn triples_with_subject( &self, subject: &Self::Subject, ) -> Result<impl Iterator<Item = Self::Triple>, Self::Err>

Returns all triples with the specified subject. Read more
Source§

fn triples_with_subject_predicate( &self, subject: &Self::Subject, predicate: &Self::IRI, ) -> Result<impl Iterator<Item = Self::Triple>, Self::Err>

Returns all triples with the specified subject and predicate. Read more
Source§

fn triples_with_predicate( &self, predicate: &Self::IRI, ) -> Result<impl Iterator<Item = Self::Triple>, Self::Err>

Returns all triples with the specified predicate. Read more
Source§

fn triples_with_predicate_object( &self, predicate: &Self::IRI, object: &Self::Term, ) -> Result<impl Iterator<Item = Self::Triple>, Self::Err>

Returns all triples with the specified predicate and object. Read more
Source§

fn triples_with_object( &self, object: &Self::Term, ) -> Result<impl Iterator<Item = Self::Triple>, Self::Err>

Returns all triples with the specified object. Read more
Source§

fn incoming_arcs( &self, object: &Self::Term, ) -> Result<HashMap<Self::IRI, HashSet<Self::Subject>>, Self::Err>

Returns all incoming arcs (predicates and subjects) pointing to an object. Read more
Source§

fn outgoing_arcs( &self, subject: &Self::Subject, ) -> Result<HashMap<Self::IRI, HashSet<Self::Term>>, Self::Err>

Returns all outgoing arcs (predicates and objects) from a subject. Read more
Source§

fn outgoing_arcs_from_list( &self, subject: &Self::Subject, preds: &[Self::IRI], ) -> Result<(HashMap<Self::IRI, HashSet<Self::Term>>, Vec<Self::IRI>), Self::Err>

Returns filtered outgoing arcs and remainder predicates. Read more
Source§

fn incoming_arcs_from_list( &self, object: &Self::Term, preds: &[Self::IRI], ) -> Result<HashMap<Self::IRI, HashSet<Self::Subject>>, Self::Err>

Returns filtered incoming arcs for a given object node. Read more
Source§

fn shacl_instances_of<O>( &self, cls: &O, ) -> Result<impl Iterator<Item = Self::Subject>, Self::Err>
where O: Matcher<Self::Term>,

Returns all subjects that are instances of the specified class. Read more
Source§

fn reifiers_of_triple( &self, triple: &Self::Triple, ) -> Result<impl Iterator<Item = Self::Subject>, Self::Err>

Returns all subjects that reify the specified triple. Read more
Source§

fn object_for( &self, subject: &Self::Term, predicate: &Self::IRI, ) -> Result<Option<Object>, RDFError>

Returns the first object for the given subject-predicate pair. Read more
Source§

fn objects_for_shacl_path( &self, subject: &Self::Term, path: &SHACLPath, ) -> Result<HashSet<Self::Term>, RDFError>

Returns all objects reachable by following a SHACL property path. Read more
Source§

fn objects_for( &self, subject: &Self::Term, predicate: &Self::IRI, ) -> Result<HashSet<Self::Term>, RDFError>

Returns all objects for the given subject-predicate pair. Read more
Source§

fn subjects_for( &self, predicate: &Self::IRI, object: &Self::Term, ) -> Result<HashSet<Self::Term>, RDFError>

Returns all subjects for the given predicate-object pair. Read more
Source§

impl<B: SyncBackend + Send + Sync + 'static> QueryRDF for StoreGraph<B>

Source§

fn query_select(&self, query: &str) -> Result<QuerySolutions<Self>, GraphError>

Executes a SPARQL SELECT query and returns variable bindings. Read more
Source§

fn query_construct( &self, query: &str, _format: &QueryResultFormat, ) -> Result<String, GraphError>

Executes a SPARQL CONSTRUCT query and returns a serialized RDF graph. Read more
Source§

fn query_ask(&self, query: &str) -> Result<bool, GraphError>

Executes a SPARQL ASK query and returns a boolean result. Read more
Source§

impl<B: SyncBackend + Send + Sync + 'static> Rdf for StoreGraph<B>

Source§

type IRI = NamedNode

The IRI type for this RDF implementation.
Source§

type BNode = BlankNode

The blank node type for this RDF implementation.
Source§

type Literal = Literal

The literal type for representing data values.
Source§

type Subject = NamedOrBlankNode

The subject type for this RDF implementation.
Source§

type Term = Term

The term type representing any RDF component.
Source§

type Triple = Triple

The triple type representing RDF statements.
Source§

type Err = GraphError

The error type for fallible operations.
Source§

fn resolve_prefix_local( &self, prefix: &str, local: &str, ) -> Result<IriS, PrefixMapError>

Resolves a prefix and local name to obtain the full IRI. Read more
Source§

fn qualify_iri(&self, node: &NamedNode) -> String

Returns the prefixed name corresponding to an IRI. Read more
Source§

fn qualify_subject(&self, subj: &NamedOrBlankNode) -> String

Returns the prefixed representation of a subject. Read more
Source§

fn qualify_term(&self, term: &Term) -> String

Returns the prefixed representation of a term. Read more
Source§

fn prefixmap(&self) -> Option<PrefixMap>

Returns the prefix map used by this RDF implementation. Read more
Source§

fn numeric_value(&self, term: &Self::Term) -> Option<Decimal>

Extracts the numeric value from a term, if it represents a number. Read more
Source§

fn term_as_literal(term: &Self::Term) -> Result<Self::Literal, RDFError>

Converts a term to a literal. Read more
Source§

fn term_as_sliteral(term: &Self::Term) -> Result<ConcreteLiteral, RDFError>

Attempts to convert a term into a concrete literal. Read more
Source§

fn term_as_subject(term: &Self::Term) -> Result<Self::Subject, RDFError>

Converts a term to a subject. Read more
Source§

fn subject_as_term(subj: &Self::Subject) -> Self::Term

Converts a subject to a term. Read more
Source§

fn triple_as_term(triple: &Self::Triple) -> Self::Term

Converts a triple to a term (RDF-star support). Read more
Source§

fn iris_as_term(iri: &IriS) -> Self::Term

Converts an IriS to a term. Read more
Source§

fn term_as_iri(term: &Self::Term) -> Result<Self::IRI, RDFError>

Converts a term to an IRI. Read more
Source§

fn iri_or_bnode_as_term(ib: &IriOrBlankNode) -> Self::Term

Converts an IRI or blank node to a term. Read more
Source§

fn term_as_bnode(term: &Self::Term) -> Result<Self::BNode, RDFError>

Converts a term to a blank node. Read more
Source§

fn term_as_iris(term: &Self::Term) -> Result<IriS, RDFError>

Converts a term to an IriS. Read more
Source§

fn term_as_object(term: &Self::Term) -> Result<Object, RDFError>

Converts a term to an Object. Read more
Source§

fn object_as_term(object: &Object) -> Self::Term

Converts an Object to a term. Read more
Source§

fn subject_as_node(subject: &Self::Subject) -> Result<Object, RDFError>

Converts a subject to an Object. Read more
Source§

fn term_as_lang(term: &Self::Term) -> Result<Lang, RDFError>

Extracts a language tag from a term. Read more
Source§

fn compare( &self, term1: &Self::Term, term2: &Self::Term, ) -> Result<Ordering, RDFError>

Compares two terms according to SPARQL ordering semantics. Read more
Source§

fn equals(&self, term1: &Self::Term, term2: &Self::Term) -> bool

Checks if two terms are equal according to SPARQL semantics. Read more

Auto Trait Implementations§

§

impl<B> Freeze for StoreGraph<B>
where Store<B>: Freeze,

§

impl<B> RefUnwindSafe for StoreGraph<B>
where Store<B>: RefUnwindSafe,

§

impl<B> Send for StoreGraph<B>
where Store<B>: Send,

§

impl<B> Sync for StoreGraph<B>
where Store<B>: Sync,

§

impl<B> Unpin for StoreGraph<B>
where Store<B>: Unpin,

§

impl<B> UnsafeUnpin for StoreGraph<B>
where Store<B>: UnsafeUnpin,

§

impl<B> UnwindSafe for StoreGraph<B>
where Store<B>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more