pub struct RdfsReasoner { /* private fields */ }Expand description
RDFS reasoner with forward chaining
Implementations§
Source§impl RdfsReasoner
impl RdfsReasoner
Sourcepub fn with_rules(rules: Vec<InferenceRule>) -> Self
pub fn with_rules(rules: Vec<InferenceRule>) -> Self
Create a reasoner with specific rules
Sourcepub fn materialize(&self, _store: &RdfStore) -> ReasoningResult<Vec<Triple>>
pub fn materialize(&self, _store: &RdfStore) -> ReasoningResult<Vec<Triple>>
Materialize all inferences
TODO: Implement RDFS entailment rules
- rdfs:subClassOf transitivity: (A subClassOf B) ∧ (B subClassOf C) → (A subClassOf C)
- rdfs:subPropertyOf transitivity
- rdfs:domain: (P domain C) ∧ (X P Y) → (X type C)
- rdfs:range: (P range C) ∧ (X P Y) → (Y type C)
- Type inheritance: (X type A) ∧ (A subClassOf B) → (X type B)
Sourcepub fn reason(&self, _store: &mut RdfStore) -> ReasoningResult<usize>
pub fn reason(&self, _store: &mut RdfStore) -> ReasoningResult<usize>
Apply reasoning and add inferred triples to store
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RdfsReasoner
impl RefUnwindSafe for RdfsReasoner
impl Send for RdfsReasoner
impl Sync for RdfsReasoner
impl Unpin for RdfsReasoner
impl UnsafeUnpin for RdfsReasoner
impl UnwindSafe for RdfsReasoner
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
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> 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