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§

source

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.

source

fn take(&mut self, ax: &AnnotatedAxiom<A>) -> Option<AnnotatedAxiom<A>>

Provided Methods§

source

fn remove(&mut self, ax: &AnnotatedAxiom<A>) -> bool

source

fn declare<N>(&mut self, ne: N) -> boolwhere
    A: ForIRI,
    N: Into<NamedEntity<A>>,

Declare an NamedEntity for the ontology.

Examples
let mut o = SetOntology::new_rc();
let b = Build::new();
o.declare(b.class("http://www.example.com/a"));
o.declare(b.object_property("http://www.example.com/r"));

Implementors§

source§

impl<A: ForIRI> MutableOntology<A> for SetOntology<A>

source§

impl<A: ForIRI, AA: ForIndex<A>> MutableOntology<A> for RDFOntology<A, AA>

source§

impl<A: ForIRI, AA: ForIndex<A>> MutableOntology<A> for AxiomMappedOntology<A, AA>

source§

impl<A: ForIRI, AA: ForIndex<A>> MutableOntology<A> for IRIMappedOntology<A, AA>

source§

impl<A: ForIRI, AA: ForIndex<A>, I: OntologyIndex<A, AA>> MutableOntology<A> for OneIndexedOntology<A, AA, I>

source§

impl<A: ForIRI, AA: ForIndex<A>, I: OntologyIndex<A, AA>, J: OntologyIndex<A, AA>> MutableOntology<A> for TwoIndexedOntology<A, AA, I, J>

source§

impl<A: ForIRI, AA: ForIndex<A>, I: OntologyIndex<A, AA>, J: OntologyIndex<A, AA>, K: OntologyIndex<A, AA>> MutableOntology<A> for ThreeIndexedOntology<A, AA, I, J, K>

source§

impl<A: ForIRI, AA: ForIndex<A>, I: OntologyIndex<A, AA>, J: OntologyIndex<A, AA>, K: OntologyIndex<A, AA>, L: OntologyIndex<A, AA>> MutableOntology<A> for FourIndexedOntology<A, AA, I, J, K, L>