Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLIndividual


                BuiltInTypeHandler typeHandler = builtInTypes.get(object);
                if (typeHandler != null) {
                    typeHandler.handleTriple(subject, predicate, object);
                } else if (axiomTypes.get(object) == null) {
                    // C(a)
                    OWLIndividual ind = consumer.translateIndividual(subject);
                    OWLClassExpression ce = consumer.translatorAccessor
                            .translateClassExpression(object);
                    consumer.addAxiom(consumer.getDataFactory()
                            .getOWLClassAssertionAxiom(ce, ind,
                                    consumer.getPendingAnnotations()));
View Full Code Here


    @Override
    protected Set<OWLAxiom> getAxioms() {
        Set<OWLAxiom> axioms = new HashSet<>();
        OWLClassExpression desc = getDataFactory().getOWLObjectComplementOf(
                createClass());
        OWLIndividual ind = createIndividual();
        axioms.add(getDataFactory().getOWLClassAssertionAxiom(desc, ind));
        return axioms;
    }
View Full Code Here

    }

    @Nonnull
    @Override
    protected Set<OWLAxiom> getAxioms() {
        OWLIndividual subj = createIndividual();
        OWLDataProperty prop = createDataProperty();
        OWLLiteral obj = getDataFactory().getOWLLiteral("TestConstant");
        OWLAxiom ax = getDataFactory()
                .getOWLNegativeDataPropertyAssertionAxiom(prop, subj, obj);
        return singleton(ax);
View Full Code Here

    }

    @Nonnull
    @Override
    protected Set<OWLAxiom> getAxioms() {
        OWLIndividual subj = createIndividual();
        OWLObjectProperty prop = createObjectProperty();
        OWLIndividual obj = createIndividual();
        OWLAxiom ax = getDataFactory()
                .getOWLNegativeObjectPropertyAssertionAxiom(prop, subj, obj);
        return singleton(ax);
    }
View Full Code Here

    }

    @Override
    public void visit(OWLSubObjectPropertyOfAxiom axiom) {
        // subProp some {a} subClassOf supProp some {a}
        OWLIndividual ind = dataFactory.getOWLNamedIndividual(IRI.create(
                "http://debugger.com#", "A" + System.nanoTime()));
        OWLClassExpression sub = dataFactory.getOWLObjectHasValue(
                axiom.getSubProperty(), ind);
        OWLClassExpression sup = dataFactory.getOWLObjectHasValue(
                axiom.getSuperProperty(), ind);
View Full Code Here

        assertNotNull(obj);
    }

    @Test
    public void testEqualsPositiveAxiomSameIndividual() {
        OWLIndividual a = I();
        OWLIndividual b = I();
        OWLIndividual c = I();
        OWLObject objA = testSubject.getOWLSameIndividualAxiom(a, b, c);
        OWLObject objB = testSubject.getOWLSameIndividualAxiom(a, b, c);
        assertEquals(objA, objB);
    }
View Full Code Here

        assertEquals(objA, objB);
    }

    @Test
    public void testEqualsNegativeAxiomSameIndividual() {
        OWLIndividual a = I();
        OWLIndividual b = I();
        OWLObject objA = testSubject.getOWLSameIndividualAxiom(a, b);
        OWLIndividual c = I();
        OWLObject objB = testSubject.getOWLSameIndividualAxiom(a, b, c);
        assertFalse(objA.equals(objB));
    }
View Full Code Here

        assertFalse(objA.equals(objB));
    }

    @Test
    public void testHashCodeAxiomSameIndividual() {
        OWLIndividual a = I();
        OWLIndividual b = I();
        OWLIndividual c = I();
        OWLObject objA = testSubject.getOWLSameIndividualAxiom(a, b, c);
        OWLObject objB = testSubject.getOWLSameIndividualAxiom(a, b, c);
        assertEquals(objA.hashCode(), objB.hashCode());
    }
View Full Code Here

        assertNotNull(obj);
    }

    @Test
    public void testEqualsPositiveAxiomDifferentFrom() {
        OWLIndividual a = I();
        OWLIndividual b = I();
        OWLIndividual c = I();
        OWLObject objA = testSubject.getOWLDifferentIndividualsAxiom(a, b, c);
        OWLObject objB = testSubject.getOWLDifferentIndividualsAxiom(a, b, c);
        assertEquals(objA, objB);
    }
View Full Code Here

        assertEquals(objA, objB);
    }

    @Test
    public void testEqualsNegativeAxiomDifferentFrom() {
        OWLIndividual a = I();
        OWLIndividual b = I();
        OWLObject objA = testSubject.getOWLDifferentIndividualsAxiom(a, b);
        OWLIndividual c = I();
        OWLObject objB = testSubject.getOWLDifferentIndividualsAxiom(a, b, c);
        assertFalse(objA.equals(objB));
    }
View Full Code Here

TOP

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

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.