Struct SRDFSparql

Source
pub struct SRDFSparql { /* private fields */ }
Expand description

Implements SRDF interface as a SPARQL endpoint

Implementations§

Trait Implementations§

Source§

impl AsyncSRDF for SRDFSparql

Source§

type IRI = NamedNode

Source§

type BNode = BlankNode

Source§

type Literal = Literal

Source§

type Subject = Subject

Source§

type Term = Term

Source§

type Err = SRDFSparqlError

Source§

fn get_predicates_subject<'life0, 'life1, 'async_trait>( &'life0 self, subject: &'life1 OxSubject, ) -> Pin<Box<dyn Future<Output = Result<HashSet<OxNamedNode>, SRDFSparqlError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_objects_for_subject_predicate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _subject: &'life1 OxSubject, _pred: &'life2 OxNamedNode, ) -> Pin<Box<dyn Future<Output = Result<HashSet<OxTerm>, SRDFSparqlError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_subjects_for_object_predicate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _object: &'life1 OxTerm, _pred: &'life2 OxNamedNode, ) -> Pin<Box<dyn Future<Output = Result<HashSet<OxSubject>, SRDFSparqlError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

impl Clone for SRDFSparql

Source§

fn clone(&self) -> SRDFSparql

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SRDFSparql

Source§

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

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

impl FromStr for SRDFSparql

Source§

type Err = SRDFSparqlError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Query for SRDFSparql

Source§

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

Source§

fn triples_matching<S, P, O>( &self, subject: S, predicate: P, object: O, ) -> Result<impl Iterator<Item = Self::Triple>, SRDFSparqlError>
where S: Matcher<Self::Subject>, P: Matcher<Self::IRI>, O: Matcher<Self::Term>,

Note to implementors: this function needs to retrieve all the triples of the graph. Therefore, for use-cases where the graph is large, this function should be implemented in a way that it does not retrieve all triples at once. As an example, for implementations of SPARQL, this function should be implemented to retrieve just the triples that match the given subject, predicate and object.
Source§

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

Source§

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

Source§

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

Source§

fn incoming_arcs( &self, object: Self::Term, ) -> Result<IncomingArcs<Self>, Self::Err>

Source§

fn outgoing_arcs( &self, subject: Self::Subject, ) -> Result<OutgoingArcs<Self>, Self::Err>

get all outgoing arcs from a subject
Source§

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

get outgoing arcs from a node taking into account only a controlled list of preds It returns a HashMap with the outgoing arcs and their values and a list of the predicates that have values and are not in the controlled list.
Source§

impl Rdf for SRDFSparql

Source§

type IRI = NamedNode

Source§

type BNode = BlankNode

Source§

type Literal = Literal

Source§

type Subject = Subject

Source§

type Term = Term

Source§

type Triple = Triple

Source§

type Err = SRDFSparqlError

Source§

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

Resolves a a prefix and a local name and obtains the corresponding full IriS
Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl Sparql for SRDFSparql

Auto Trait Implementations§

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T