Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLEntity


    }

    @Test
    public void testEqualsPositiveData() {
        IRI iri = IRI();
        OWLEntity entityA = DP(iri);
        OWLEntity entityB = DP(iri);
        assertEquals(entityA, entityB);
    }
View Full Code Here


        assertEquals(entityA, entityB);
    }

    @Test
    public void testEqualsNegativeData() {
        OWLEntity entityA = DP(IRI());
        OWLEntity entityB = DP(IRI());
        assertFalse(entityA.equals(entityB));
    }
View Full Code Here

    }

    @Test
    public void testEqualsPositiveObject() {
        IRI iri = IRI();
        OWLEntity entityA = OP(iri);
        OWLEntity entityB = OP(iri);
        assertEquals(entityA, entityB);
    }
View Full Code Here

        assertEquals(entityA, entityB);
    }

    @Test
    public void testEqualsNegativeObject() {
        OWLEntity entityA = OP(IRI());
        OWLEntity entityB = OP(IRI());
        assertFalse(entityA.equals(entityB));
    }
View Full Code Here

    }

    @Test
    public void testEqualsPositiveAnnotationProperty() {
        IRI iri = IRI();
        OWLEntity entityA = testSubject.getOWLAnnotationProperty(iri);
        OWLEntity entityB = testSubject.getOWLAnnotationProperty(iri);
        assertEquals(entityA, entityB);
    }
View Full Code Here

        assertEquals(entityA, entityB);
    }

    @Test
    public void testEqualsNegativeAnnotationProperty() {
        OWLEntity entityA = testSubject.getOWLAnnotationProperty(IRI());
        OWLEntity entityB = testSubject.getOWLAnnotationProperty(IRI());
        assertFalse(entityA.equals(entityB));
    }
View Full Code Here

    }

    @Test
    public void testEqualsPositiveNamedIndividual() {
        IRI iri = IRI();
        OWLEntity entityA = testSubject.getOWLNamedIndividual(iri);
        OWLEntity entityB = testSubject.getOWLNamedIndividual(iri);
        assertEquals(entityA, entityB);
    }
View Full Code Here

        assertEquals(entityA, entityB);
    }

    @Test
    public void testEqualsNegativeNamedIndividual() {
        OWLEntity entityA = testSubject.getOWLNamedIndividual(IRI());
        OWLEntity entityB = testSubject.getOWLNamedIndividual(IRI());
        assertFalse(entityA.equals(entityB));
    }
View Full Code Here

    }


    public void handle(String id, String value) {
        // This is an annotation - but add as a label
        OWLEntity ent;
        if (getConsumer().isTerm()) {
            ent = getDataFactory().getOWLClass(getIRIFromValue(id));
        } else if (getConsumer().isTypedef()) {
            ent = getDataFactory().getOWLObjectProperty(getIRIFromValue(id));
        } else {
            ent = getDataFactory().getOWLNamedIndividual(getIRIFromValue(id));
        }
        OWLLiteral con = getDataFactory().getOWLTypedLiteral(value);
        OWLAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(getDataFactory().getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI()), ent.getIRI(), con);
        applyChange(new AddAxiom(getOntology(), ax));
    }
View Full Code Here

    }


    public void handle(String id, String value) {
        getConsumer().setCurrentId(value);
        final OWLEntity entity = getConsumer().getCurrentEntity();
        if (entity != null){
            applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLDeclarationAxiom(entity)));
        }
    }
View Full Code Here

TOP

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

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.