pub struct QueryEngine<'a> { /* private fields */ }Expand description
Query handle over a classified ontology taxonomy.
Implementations§
Source§impl<'a> QueryEngine<'a>
impl<'a> QueryEngine<'a>
Sourcepub fn new(ontology: &'a Ontology, taxonomy: &'a Taxonomy) -> Self
pub fn new(ontology: &'a Ontology, taxonomy: &'a Taxonomy) -> Self
Create a query engine over ontology and its taxonomy.
Sourcepub fn direct_subclasses(&self, class: EntityId) -> Result<Vec<EntityId>>
pub fn direct_subclasses(&self, class: EntityId) -> Result<Vec<EntityId>>
Return direct subclasses of the given class in the reduced taxonomy.
Sourcepub fn direct_superclasses(&self, class: EntityId) -> Result<Vec<EntityId>>
pub fn direct_superclasses(&self, class: EntityId) -> Result<Vec<EntityId>>
Return direct superclasses of the given class in the reduced taxonomy.
Sourcepub fn is_subsumed(&self, sub: EntityId, sup: EntityId) -> Result<bool>
pub fn is_subsumed(&self, sub: EntityId, sup: EntityId) -> Result<bool>
Whether sub is subsumed by sup in the taxonomy.
Sourcepub fn equivalent_classes(
&self,
class: EntityId,
) -> Result<Option<Vec<EntityId>>>
pub fn equivalent_classes( &self, class: EntityId, ) -> Result<Option<Vec<EntityId>>>
Return the equivalence cluster containing class, if any.
Sourcepub fn unsatisfiable_classes(&self) -> Vec<EntityId>
pub fn unsatisfiable_classes(&self) -> Vec<EntityId>
List classes inferred unsatisfiable (⊥).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for QueryEngine<'a>
impl<'a> RefUnwindSafe for QueryEngine<'a>
impl<'a> Send for QueryEngine<'a>
impl<'a> Sync for QueryEngine<'a>
impl<'a> Unpin for QueryEngine<'a>
impl<'a> UnsafeUnpin for QueryEngine<'a>
impl<'a> UnwindSafe for QueryEngine<'a>
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