Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLOntologyManager


    @Test
    public void testSubObjectPropertyOfAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLObjectProperty propQ = ObjectProperty(iri("q"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLSubObjectPropertyOfAxiom ax = SubObjectPropertyOf(propP, propQ);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getObjectSubPropertyAxiomsForSubProperty(propP)
                .contains(ax));
        assertTrue(ont.getObjectSubPropertyAxiomsForSuperProperty(propQ)
                .contains(ax));
View Full Code Here


    public void testEquivalentObjectPropertiesAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLObjectProperty propQ = ObjectProperty(iri("q"));
        OWLObjectProperty propR = ObjectProperty(iri("r"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLEquivalentObjectPropertiesAxiom ax = EquivalentObjectProperties(
                propP, propQ, propR);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getEquivalentObjectPropertiesAxioms(propP).contains(ax));
        assertTrue(ont.getEquivalentObjectPropertiesAxioms(propQ).contains(ax));
        assertTrue(ont.getEquivalentObjectPropertiesAxioms(propR).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
View Full Code Here

    public void testDisjointObjectPropertiesAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLObjectProperty propQ = ObjectProperty(iri("q"));
        OWLObjectProperty propR = ObjectProperty(iri("r"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLDisjointObjectPropertiesAxiom ax = DisjointObjectProperties(propP,
                propQ, propR);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getDisjointObjectPropertiesAxioms(propP).contains(ax));
        assertTrue(ont.getDisjointObjectPropertiesAxioms(propQ).contains(ax));
        assertTrue(ont.getDisjointObjectPropertiesAxioms(propR).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
View Full Code Here

    @Test
    public void testObjectPropertyDomainAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLClass clsA = Class(iri("ClsA"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLObjectPropertyDomainAxiom ax = ObjectPropertyDomain(propP, clsA);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getObjectPropertyDomainAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(domain(ont.getObjectPropertyDomainAxioms(propP)).contains(
                clsA));
View Full Code Here

    @Test
    public void testObjectPropertyRangeAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLClass clsA = Class(iri("ClsA"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLObjectPropertyRangeAxiom ax = ObjectPropertyRange(propP, clsA);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getObjectPropertyRangeAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(range(ont.getObjectPropertyRangeAxioms(propP))
                .contains(clsA));
View Full Code Here

    @Test
    public void testFunctionalObjectPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLFunctionalObjectPropertyAxiom ax = FunctionalObjectProperty(propP);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getFunctionalObjectPropertyAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(isFunctional(propP, ont));
    }
View Full Code Here

    @Test
    public void testInverseFunctionalObjectPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLInverseFunctionalObjectPropertyAxiom ax = InverseFunctionalObjectProperty(propP);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getInverseFunctionalObjectPropertyAxioms(propP)
                .contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(isInverseFunctional(propP, ont));
View Full Code Here

    @Test
    public void testTransitiveObjectPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLTransitiveObjectPropertyAxiom ax = TransitiveObjectProperty(propP);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getTransitiveObjectPropertyAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(isTransitive(propP, ont));
    }
View Full Code Here

    @Test
    public void testSymmetricObjectPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLSymmetricObjectPropertyAxiom ax = SymmetricObjectProperty(propP);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getSymmetricObjectPropertyAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(isSymmetric(propP, ont));
    }
View Full Code Here

    @Test
    public void testAsymmetricObjectPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLAsymmetricObjectPropertyAxiom ax = AsymmetricObjectProperty(propP);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getAsymmetricObjectPropertyAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(isAsymmetric(propP, ont));
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.OWLOntologyManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.