Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLOntologyManager


    @Test
    public void testReflexiveObjectPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLReflexiveObjectPropertyAxiom ax = ReflexiveObjectProperty(propP);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getReflexiveObjectPropertyAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(isReflexive(propP, ont));
    }
View Full Code Here


    @Test
    public void testIrreflexiveObjectPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty propP = ObjectProperty(iri("p"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLIrreflexiveObjectPropertyAxiom ax = IrreflexiveObjectProperty(propP);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getIrreflexiveObjectPropertyAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(isIrreflexive(propP, ont));
    }
View Full Code Here

    @Test
    public void testSubDataPropertyOfAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLDataProperty propP = DataProperty(iri("p"));
        OWLDataProperty propQ = DataProperty(iri("q"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLSubDataPropertyOfAxiom ax = SubDataPropertyOf(propP, propQ);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getDataSubPropertyAxiomsForSubProperty(propP).contains(
                ax));
        assertTrue(ont.getDataSubPropertyAxiomsForSuperProperty(propQ)
                .contains(ax));
View Full Code Here

    public void testEquivalentDataPropertiesAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLDataProperty propP = DataProperty(iri("p"));
        OWLDataProperty propQ = DataProperty(iri("q"));
        OWLDataProperty propR = DataProperty(iri("r"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLEquivalentDataPropertiesAxiom ax = EquivalentDataProperties(propP,
                propQ, propR);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getEquivalentDataPropertiesAxioms(propP).contains(ax));
        assertTrue(ont.getEquivalentDataPropertiesAxioms(propQ).contains(ax));
        assertTrue(ont.getEquivalentDataPropertiesAxioms(propR).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
View Full Code Here

    public void testDisjointDataPropertiesAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLDataProperty propP = DataProperty(iri("p"));
        OWLDataProperty propQ = DataProperty(iri("q"));
        OWLDataProperty propR = DataProperty(iri("r"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLDisjointDataPropertiesAxiom ax = DisjointDataProperties(propP,
                propQ, propR);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getDisjointDataPropertiesAxioms(propP).contains(ax));
        assertTrue(ont.getDisjointDataPropertiesAxioms(propQ).contains(ax));
        assertTrue(ont.getDisjointDataPropertiesAxioms(propR).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
View Full Code Here

    @Test
    public void testDataPropertyDomainAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLDataProperty propP = DataProperty(iri("p"));
        OWLClass clsA = Class(iri("ClsA"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLDataPropertyDomainAxiom ax = DataPropertyDomain(propP, clsA);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getDataPropertyDomainAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(domain(ont.getDataPropertyDomainAxioms(propP))
                .contains(clsA));
View Full Code Here

    @Test
    public void testDataPropertyRangeAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLDataProperty propP = DataProperty(iri("p"));
        OWLDatatype dt = Datatype(iri("dt"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLDataPropertyRangeAxiom ax = DataPropertyRange(propP, dt);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getDataPropertyRangeAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(range(ont.getDataPropertyRangeAxioms(propP)).contains(dt));
    }
View Full Code Here

    @Test
    public void testFunctionalDataPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLDataProperty propP = DataProperty(iri("p"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLFunctionalDataPropertyAxiom ax = FunctionalDataProperty(propP);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getFunctionalDataPropertyAxioms(propP).contains(ax));
        assertTrue(ont.getAxioms(propP, EXCLUDED).contains(ax));
        assertTrue(isFunctional(propP, ont));
    }
View Full Code Here

    @Test
    public void testClassAssertionAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLClass clsA = Class(iri("clsA"));
        OWLNamedIndividual indA = NamedIndividual(iri("indA"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLClassAssertionAxiom ax = ClassAssertion(clsA, indA);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getClassAssertionAxioms(indA).contains(ax));
        assertTrue(ont.getClassAssertionAxioms(clsA).contains(ax));
        assertTrue(ont.getAxioms(indA, EXCLUDED).contains(ax));
        assertTrue(instances(ont.getClassAssertionAxioms(indA)).contains(indA));
View Full Code Here

    public void testObjectPropertyAxiomAccessors() {
        OWLOntology ont = getOWLOntology("ont");
        OWLObjectProperty prop = ObjectProperty(iri("prop"));
        OWLNamedIndividual indA = NamedIndividual(iri("indA"));
        OWLNamedIndividual indB = NamedIndividual(iri("indB"));
        OWLOntologyManager man = ont.getOWLOntologyManager();
        OWLObjectPropertyAssertionAxiom ax = ObjectPropertyAssertion(prop,
                indA, indB);
        man.addAxiom(ont, ax);
        performAxiomTests(ont, ax);
        assertTrue(ont.getObjectPropertyAssertionAxioms(indA).contains(ax));
        assertTrue(ont.getAxioms(indA, EXCLUDED).contains(ax));
    }
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.