Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLClass


        equal(ontology, onto2);
    }

    @Test
    public void shouldDoCompleteRoundtripManchesterOWLSyntax() throws Exception {
        OWLClass a = Class(IRI(NS + "#A"));
        OWLDataProperty p = df.getOWLDataProperty(IRI(NS + "#P"));
        SWRLVariable x = df.getSWRLVariable(IRI(NS + "#X"));
        SWRLVariable y = df.getSWRLVariable(IRI(NS + "#Y"));
        OWLOntology ontology = m.createOntology(IRI(NS));
        Set<SWRLAtom> body = new TreeSet<>();
View Full Code Here


     * @return
     * @throws OWLOntologyCreationException
     */
    @Nonnull
    OWLOntology prepareOntology() throws OWLOntologyCreationException {
        OWLClass a = Class(IRI(NS + "#A"));
        OWLDataProperty p = df.getOWLDataProperty(IRI(NS + "#P"));
        SWRLVariable x = df.getSWRLVariable(IRI(NS + "#X"));
        SWRLVariable y = df.getSWRLVariable(IRI(NS + "#Y"));
        OWLOntology ontology = m.createOntology(IRI(NS));
        Set<SWRLAtom> body = new TreeSet<>();
View Full Code Here

public class OntologyChangeListenerTestCase extends TestBase {

    @Test
    public void testOntologyChangeListener() {
        OWLOntology ont = getOWLOntology("ont");
        OWLClass clsA = Class(iri("ClsA"));
        OWLClass clsB = Class(iri("ClsB"));
        OWLSubClassOfAxiom ax = SubClassOf(clsA, clsB);
        final Set<OWLAxiom> impendingAdditions = new HashSet<>();
        final Set<OWLAxiom> impendingRemovals = new HashSet<>();
        final Set<OWLAxiom> additions = new HashSet<>();
        final Set<OWLAxiom> removals = new HashSet<>();
View Full Code Here

public class RenameEntityTestCase extends TestBase {

    @Test
    public void testRenameClass() {
        OWLOntology ont = getOWLOntology("testont");
        OWLClass clsAIRI1 = Class(iri("ClsA1"));
        OWLClass clsAIRI2 = Class(iri("ClsA2"));
        OWLClass clsB = Class(iri("ClsB"));
        OWLClass clsC = Class(iri("ClsC"));
        OWLObjectPropertyExpression propA = ObjectProperty(iri("propA"));
        OWLDataPropertyExpression propB = DataProperty(iri("propA"));
        OWLIndividual indA = NamedIndividual(iri("indA"));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
        Set<OWLAxiom> axioms1 = new HashSet<>();
View Full Code Here

    }

    @Test
    public void testRenameObjectProperty() {
        OWLOntology ont = getOWLOntology("testont");
        OWLClass clsA = Class(iri("ClsA"));
        OWLObjectProperty propA = ObjectProperty(iri("propA"));
        OWLObjectProperty propA2 = ObjectProperty(iri("propA2"));
        OWLObjectPropertyExpression propB = ObjectProperty(iri("propB"))
                .getInverseProperty();
        OWLIndividual indA = NamedIndividual(iri("indA"));
View Full Code Here

    }

    @Test
    public void testRenameDataProperty() {
        OWLOntology ont = getOWLOntology("testont");
        OWLClass clsA = Class(iri("ClsA"));
        OWLDataProperty propA = DataProperty(iri("propA"));
        OWLDataProperty propA2 = DataProperty(iri("propA2"));
        OWLDataPropertyExpression propB = DataProperty(iri("propB"));
        OWLIndividual indA = NamedIndividual(iri("indA"));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
View Full Code Here

    }

    @Test
    public void testRenameIndividual() {
        OWLOntology ont = getOWLOntology("testont");
        OWLClass clsA = Class(iri("ClsA"));
        OWLDataProperty propA = DataProperty(iri("propA"));
        OWLObjectProperty propB = ObjectProperty(iri("propB"));
        OWLNamedIndividual indA = NamedIndividual(iri("indA"));
        OWLNamedIndividual indB = NamedIndividual(iri("indA"));
        OWLAnnotationProperty annoProp = AnnotationProperty(iri("annoProp"));
View Full Code Here

    }

    @Test
    public void testEqualsPositiveObjectPropertyRange() {
        OWLObjectProperty left = OP(IRI());
        OWLClass right = C(IRI());
        OWLAxiom axA = testSubject.getOWLObjectPropertyRangeAxiom(left, right);
        OWLAxiom axB = testSubject.getOWLObjectPropertyRangeAxiom(left, right);
        assertEquals(axA, axB);
    }
View Full Code Here

    }

    @Test
    public void testEqualsNegativeObjectPropertyRange() {
        OWLObjectProperty left = OP(IRI());
        OWLClass right = C(IRI());
        // Different left operand
        OWLAxiom axA = testSubject.getOWLObjectPropertyRangeAxiom(OP(IRI()),
                right);
        OWLAxiom axB = testSubject.getOWLObjectPropertyRangeAxiom(OP(IRI()),
                right);
View Full Code Here

    }

    @Test
    public void testHashCodeObjectPropertyRange() {
        OWLObjectProperty left = OP(IRI());
        OWLClass right = C(IRI());
        int hashCodeA = testSubject.getOWLObjectPropertyRangeAxiom(left, right)
                .hashCode();
        int hashCodeB = testSubject.getOWLObjectPropertyRangeAxiom(left, right)
                .hashCode();
        assertEquals(hashCodeA, hashCodeB);
View Full Code Here

TOP

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

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.