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>
impl<B: SyncBackend + Send + Sync + 'static> StoreGraph<B>
Sourcepub fn with_union(self, union: bool) -> Self
pub fn with_union(self, union: bool) -> Self
Reads the union of all graphs instead of the default graph.
Sourcepub fn with_prefixmap(self, pm: PrefixMap) -> Self
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>
impl<B: SyncBackend + Send + Sync + 'static> Debug for StoreGraph<B>
Source§impl<B: SyncBackend + Send + Sync + 'static> NeighsRDF for StoreGraph<B>
impl<B: SyncBackend + Send + Sync + 'static> NeighsRDF for StoreGraph<B>
Source§fn triples(&self) -> Result<impl Iterator<Item = Triple>, GraphError>
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>
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>
fn contains<S, P, O>( &self, subject: &S, predicate: &P, object: &O, ) -> Result<bool, Self::Err>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
fn shacl_instances_of<O>( &self, cls: &O, ) -> Result<impl Iterator<Item = Self::Subject>, Self::Err>
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>
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>
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>
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§impl<B: SyncBackend + Send + Sync + 'static> QueryRDF for StoreGraph<B>
impl<B: SyncBackend + Send + Sync + 'static> QueryRDF for StoreGraph<B>
Source§fn query_select(&self, query: &str) -> Result<QuerySolutions<Self>, GraphError>
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>
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§impl<B: SyncBackend + Send + Sync + 'static> Rdf for StoreGraph<B>
impl<B: SyncBackend + Send + Sync + 'static> Rdf for StoreGraph<B>
Source§type Subject = NamedOrBlankNode
type Subject = NamedOrBlankNode
The subject type for this RDF implementation.
Source§fn resolve_prefix_local(
&self,
prefix: &str,
local: &str,
) -> Result<IriS, PrefixMapError>
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
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
fn qualify_subject(&self, subj: &NamedOrBlankNode) -> String
Returns the prefixed representation of a subject. Read more
Source§fn qualify_term(&self, term: &Term) -> String
fn qualify_term(&self, term: &Term) -> String
Returns the prefixed representation of a term. Read more
Source§fn prefixmap(&self) -> Option<PrefixMap>
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>
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>
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>
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>
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
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
fn triple_as_term(triple: &Self::Triple) -> Self::Term
Converts a triple to a term (RDF-star support). Read more
Source§fn term_as_iri(term: &Self::Term) -> Result<Self::IRI, RDFError>
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
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>
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>
fn term_as_iris(term: &Self::Term) -> Result<IriS, RDFError>
Converts a term to an
IriS. Read moreSource§fn term_as_object(term: &Self::Term) -> Result<Object, RDFError>
fn term_as_object(term: &Self::Term) -> Result<Object, RDFError>
Converts a term to an
Object. Read moreSource§fn subject_as_node(subject: &Self::Subject) -> Result<Object, RDFError>
fn subject_as_node(subject: &Self::Subject) -> Result<Object, RDFError>
Converts a subject to an
Object. Read moreSource§fn term_as_lang(term: &Self::Term) -> Result<Lang, RDFError>
fn term_as_lang(term: &Self::Term) -> Result<Lang, RDFError>
Extracts a language tag from a term. Read more
Auto Trait Implementations§
impl<B> Freeze for StoreGraph<B>
impl<B> RefUnwindSafe for StoreGraph<B>where
Store<B>: RefUnwindSafe,
impl<B> Send for StoreGraph<B>
impl<B> Sync for StoreGraph<B>
impl<B> Unpin for StoreGraph<B>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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