Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLOntology.containsAxiom()


                df.getOWLTopObjectProperty(), annotations);
        OWLOntology o = m.createOntology();
        // when
        builder.applyChanges(o);
        // then
        assertTrue(o.containsAxiom(expected));
    }

    @Test
    public void shouldBuildSWRLRule() throws OWLOntologyCreationException {
        // given
View Full Code Here


        OWLAxiom expected = df.getSWRLRule(body, head);
        OWLOntology o = m.createOntology();
        // when
        builder.applyChanges(o);
        // then
        assertTrue(o.containsAxiom(expected));
    }

    @Test
    public void shouldBuildSymmetricObjectProperty()
            throws OWLOntologyCreationException {
View Full Code Here

                annotations);
        OWLOntology o = m.createOntology();
        // when
        builder.applyChanges(o);
        // then
        assertTrue(o.containsAxiom(expected));
    }

    @Test
    public void shouldBuildTransitiveObjectProperty()
            throws OWLOntologyCreationException {
View Full Code Here

                annotations);
        OWLOntology o = m.createOntology();
        // when
        builder.applyChanges(o);
        // then
        assertTrue(o.containsAxiom(expected));
    }
}
View Full Code Here

        assertNotNull(src);
        assertNull(src.getOrigin());
        OWLOntology o = src.getRootOntology();
        assertNotNull(o);
        OWLAxiom ax = df.getOWLClassAssertionAxiom(FOAF_PERSON, ALEX);
        assertTrue(o.containsAxiom(ax));
        ax = df.getOWLClassAssertionAxiom(FOAF_PERSON, BEGONA);
        assertTrue(o.containsAxiom(ax));

        // Not knowing how the foaf:knows assertion is interpreted, we check for either (but not both!).
        ax = df.getOWLObjectPropertyAssertionAxiom(FOAF_KNOWS, ALEX, BEGONA);
View Full Code Here

        OWLOntology o = src.getRootOntology();
        assertNotNull(o);
        OWLAxiom ax = df.getOWLClassAssertionAxiom(FOAF_PERSON, ALEX);
        assertTrue(o.containsAxiom(ax));
        ax = df.getOWLClassAssertionAxiom(FOAF_PERSON, BEGONA);
        assertTrue(o.containsAxiom(ax));

        // Not knowing how the foaf:knows assertion is interpreted, we check for either (but not both!).
        ax = df.getOWLObjectPropertyAssertionAxiom(FOAF_KNOWS, ALEX, BEGONA);
        OWLAxiom ann = df.getOWLAnnotationAssertionAxiom(FOAF_KNOWS_AP, ALEX.getIRI(), BEGONA.getIRI());
        assertTrue(o.containsAxiom(ann) || o.containsAxiom(ax));
View Full Code Here

        assertTrue(o.containsAxiom(ax));

        // Not knowing how the foaf:knows assertion is interpreted, we check for either (but not both!).
        ax = df.getOWLObjectPropertyAssertionAxiom(FOAF_KNOWS, ALEX, BEGONA);
        OWLAxiom ann = df.getOWLAnnotationAssertionAxiom(FOAF_KNOWS_AP, ALEX.getIRI(), BEGONA.getIRI());
        assertTrue(o.containsAxiom(ann) || o.containsAxiom(ax));
        assertFalse(o.containsAxiom(ann) && o.containsAxiom(ax));

        assertSame(3, o.getAxiomCount()); // No other axioms exist.
    }
View Full Code Here

        assertTrue(o.containsAxiom(ax));

        // Not knowing how the foaf:knows assertion is interpreted, we check for either (but not both!).
        ax = df.getOWLObjectPropertyAssertionAxiom(FOAF_KNOWS, ALEX, BEGONA);
        OWLAxiom ann = df.getOWLAnnotationAssertionAxiom(FOAF_KNOWS_AP, ALEX.getIRI(), BEGONA.getIRI());
        assertTrue(o.containsAxiom(ann) || o.containsAxiom(ax));
        assertFalse(o.containsAxiom(ann) && o.containsAxiom(ax));

        assertSame(3, o.getAxiomCount()); // No other axioms exist.
    }
View Full Code Here

        // Not knowing how the foaf:knows assertion is interpreted, we check for either (but not both!).
        ax = df.getOWLObjectPropertyAssertionAxiom(FOAF_KNOWS, ALEX, BEGONA);
        OWLAxiom ann = df.getOWLAnnotationAssertionAxiom(FOAF_KNOWS_AP, ALEX.getIRI(), BEGONA.getIRI());
        assertTrue(o.containsAxiom(ann) || o.containsAxiom(ax));
        assertFalse(o.containsAxiom(ann) && o.containsAxiom(ax));

        assertSame(3, o.getAxiomCount()); // No other axioms exist.
    }

    @Test
View Full Code Here

        // Not knowing how the foaf:knows assertion is interpreted, we check for either (but not both!).
        ax = df.getOWLObjectPropertyAssertionAxiom(FOAF_KNOWS, ALEX, BEGONA);
        OWLAxiom ann = df.getOWLAnnotationAssertionAxiom(FOAF_KNOWS_AP, ALEX.getIRI(), BEGONA.getIRI());
        assertTrue(o.containsAxiom(ann) || o.containsAxiom(ax));
        assertFalse(o.containsAxiom(ann) && o.containsAxiom(ax));

        assertSame(3, o.getAxiomCount()); // No other axioms exist.
    }

    @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.