pub struct RdfsInferenceEngine {
pub graph: Graph,
pub inferred: Graph,
/* private fields */
}Expand description
RDFS inference engine that materializes entailed triples
Fields§
§graph: GraphOriginal graph
inferred: GraphInferred triples (materialized)
Implementations§
Source§impl RdfsInferenceEngine
impl RdfsInferenceEngine
Sourcepub fn materialize(&mut self) -> Result<()>
pub fn materialize(&mut self) -> Result<()>
Run all RDFS inference rules and materialize entailed triples
Sourcepub fn get_complete_graph(&self) -> Graph
pub fn get_complete_graph(&self) -> Graph
Get the complete graph (original + inferred triples)
Sourcepub fn get_inferred_triples(&self) -> &Graph
pub fn get_inferred_triples(&self) -> &Graph
Get only the inferred triples
Sourcepub fn get_all_superclasses(&self, class_iri: &str) -> HashSet<String>
pub fn get_all_superclasses(&self, class_iri: &str) -> HashSet<String>
Get all superclasses of a given class (including transitive)
Sourcepub fn get_all_superproperties(&self, prop_iri: &str) -> HashSet<String>
pub fn get_all_superproperties(&self, prop_iri: &str) -> HashSet<String>
Get all superproperties of a given property (including transitive)
Sourcepub fn is_subclass_of(&self, class_a: &str, class_b: &str) -> bool
pub fn is_subclass_of(&self, class_a: &str, class_b: &str) -> bool
Check if class A is a subclass of class B (direct or transitive)
Sourcepub fn is_subproperty_of(&self, prop_a: &str, prop_b: &str) -> bool
pub fn is_subproperty_of(&self, prop_a: &str, prop_b: &str) -> bool
Check if property A is a subproperty of property B (direct or transitive)
Sourcepub fn get_inference_stats(&self) -> InferenceStats
pub fn get_inference_stats(&self) -> InferenceStats
Get statistics about inferred triples
Auto Trait Implementations§
impl Freeze for RdfsInferenceEngine
impl RefUnwindSafe for RdfsInferenceEngine
impl Send for RdfsInferenceEngine
impl Sync for RdfsInferenceEngine
impl Unpin for RdfsInferenceEngine
impl UnwindSafe for RdfsInferenceEngine
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> 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