Trait horned_owl::model::MutableOntology
source · pub trait MutableOntology<A> {
fn insert<AA>(&mut self, ax: AA) -> bool
where
AA: Into<AnnotatedAxiom<A>>;
fn take(&mut self, ax: &AnnotatedAxiom<A>) -> Option<AnnotatedAxiom<A>>;
fn remove(&mut self, ax: &AnnotatedAxiom<A>) -> bool { ... }
fn declare<N>(&mut self, ne: N) -> bool
where
A: ForIRI,
N: Into<NamedEntity<A>>,
{ ... }
}
Expand description
Add or remove axioms to an MutableOntology
Required Methods§
sourcefn insert<AA>(&mut self, ax: AA) -> boolwhere
AA: Into<AnnotatedAxiom<A>>,
fn insert<AA>(&mut self, ax: AA) -> boolwhere
AA: Into<AnnotatedAxiom<A>>,
Insert an axiom into the ontology.
Examples
let mut o = SetOntology::new_rc();
let b = Build::new();
o.insert(DeclareClass(b.class("http://www.example.com/a")));
o.insert(DeclareObjectProperty(b.object_property("http://www.example.com/r")));
See declare
for an easier way to declare named entities.