Examples of containsAxiom()


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

        addAxioms(wrongAxiom, validAxiom);
        OWLOntology reloaded = saveAndReload();
        // then
        assertNotNull(reloaded);
        assertTrue(reloaded.containsAxiom(validAxiom));
        assertFalse(reloaded.containsAxiom(wrongAxiom));
        assertEquals(1, reloaded.getLogicalAxiomCount());
    }
}
View Full Code Here

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

    public void testCorrectAxioms() throws OWLOntologyCreationException {
        OWLOntology ont = createOntology();
        IRI clsIRI = IRI("http://owlapi.sourceforge.net/ontology#ClsA");
        OWLClass cls = Class(clsIRI);
        OWLDeclarationAxiom ax = Declaration(cls);
        assertTrue(ont.containsAxiom(ax));
    }

    @Nonnull
    @Override
    protected String getFileName() {
View Full Code Here

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

        OWLAxiom ax2 = SubClassOf(
                Class(IRI("urn:test.owl#ContactInformation")),
                DataMaxCardinality(1, DataProperty(IRI("urn:test.owl#city")),
                        Datatype(OWL2Datatype.XSD_STRING.getIRI())));
        OWLAxiom ax3 = Declaration(Class(IRI("urn:test.owl#ContactInformation")));
        assertTrue(o.containsAxiom(ax1));
        assertTrue(o.containsAxiom(ax2));
        assertTrue(o.containsAxiom(ax3));
    }
}
View Full Code Here

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

                Class(IRI("urn:test.owl#ContactInformation")),
                DataMaxCardinality(1, DataProperty(IRI("urn:test.owl#city")),
                        Datatype(OWL2Datatype.XSD_STRING.getIRI())));
        OWLAxiom ax3 = Declaration(Class(IRI("urn:test.owl#ContactInformation")));
        assertTrue(o.containsAxiom(ax1));
        assertTrue(o.containsAxiom(ax2));
        assertTrue(o.containsAxiom(ax3));
    }
}
View Full Code Here

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

                DataMaxCardinality(1, DataProperty(IRI("urn:test.owl#city")),
                        Datatype(OWL2Datatype.XSD_STRING.getIRI())));
        OWLAxiom ax3 = Declaration(Class(IRI("urn:test.owl#ContactInformation")));
        assertTrue(o.containsAxiom(ax1));
        assertTrue(o.containsAxiom(ax2));
        assertTrue(o.containsAxiom(ax3));
    }
}
View Full Code Here

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @Test
    public void shouldBuildDataPropertyAssertion()
            throws OWLOntologyCreationException {
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.