Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLDatatype


        assertEquals(objA.hashCode(), objB.hashCode());
    }

    @Test
    public void testCreationDataComplementOf() {
        OWLDatatype dt = D(IRI());
        OWLDataComplementOf rng = testSubject.getOWLDataComplementOf(dt);
        assertNotNull(rng);
    }
View Full Code Here


        assertNotNull(rng);
    }

    @Test
    public void testEqualsPositiveDataComplementOf() {
        OWLDatatype dt = D(IRI());
        OWLDataComplementOf rngA = testSubject.getOWLDataComplementOf(dt);
        OWLDataComplementOf rngB = testSubject.getOWLDataComplementOf(dt);
        assertEquals(rngA, rngB);
    }
View Full Code Here

        assertEquals(rngA, rngB);
    }

    @Test
    public void testEqualsNegativeDataComplementOf() {
        OWLDatatype dtA = D(IRI());
        OWLDataComplementOf rngA = testSubject.getOWLDataComplementOf(dtA);
        OWLDatatype dtB = D(IRI());
        OWLDataComplementOf rngB = testSubject.getOWLDataComplementOf(dtB);
        assertFalse(rngA.equals(rngB));
    }
View Full Code Here

        assertFalse(rngA.equals(rngB));
    }

    @Test
    public void testHashCodeDataComplementOf() {
        OWLDatatype dt = D(IRI());
        OWLDataComplementOf rngA = testSubject.getOWLDataComplementOf(dt);
        OWLDataComplementOf rngB = testSubject.getOWLDataComplementOf(dt);
        assertEquals(rngA.hashCode(), rngB.hashCode());
    }
View Full Code Here

    }

    @Test
    public void testEqualsPositiveDataPropertyRange() {
        OWLDataProperty left = DP(IRI());
        OWLDatatype right = D(IRI());
        OWLAxiom axA = testSubject.getOWLDataPropertyRangeAxiom(left, right);
        OWLAxiom axB = testSubject.getOWLDataPropertyRangeAxiom(left, right);
        assertEquals(axA, axB);
    }
View Full Code Here

    }

    @Test
    public void testEqualsNegativeDataPropertyRange() {
        OWLDataProperty left = DP(IRI());
        OWLDatatype right = D(IRI());
        // Different left operand
        OWLAxiom axA = testSubject.getOWLDataPropertyRangeAxiom(DP(IRI()),
                right);
        OWLAxiom axB = testSubject.getOWLDataPropertyRangeAxiom(DP(IRI()),
                right);
View Full Code Here

    }

    @Test
    public void testHashCodeDataPropertyRange() {
        OWLDataProperty left = DP(IRI());
        OWLDatatype right = D(IRI());
        int hashCodeA = testSubject.getOWLDataPropertyRangeAxiom(left, right)
                .hashCode();
        int hashCodeB = testSubject.getOWLDataPropertyRangeAxiom(left, right)
                .hashCode();
        assertEquals(hashCodeA, hashCodeB);
View Full Code Here

        }

        @Nonnull
        private OWLLiteral process(@Nonnull OWLDataPropertyExpression prop,
                @Nonnull OWLLiteral con) {
            OWLDatatype dt = map.get(prop);
            if (dt != null) {
                return getDataFactory().getOWLLiteral(con.getLiteral(), dt);
            } else {
                return con;
            }
View Full Code Here

            }
        }

        private void translateEquivalentDataRanges(@Nonnull IRI subject,
                @Nonnull IRI predicate, @Nonnull IRI object) {
            OWLDatatype datatype = df.getOWLDatatype(subject);
            OWLDataRange dataRange = consumer.translateDataRange(object);
            OWLDatatypeDefinitionAxiom def = df.getOWLDatatypeDefinitionAxiom(
                    datatype, dataRange, getPendingAnnotations());
            addAxiom(def);
            consumeTriple(subject, predicate, object);
View Full Code Here

            shouldCreateViolationForOWLDatatypeDefinitionAxiomInOWL2DLProfileCycles()
                    throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        OWL2DLProfile profile = new OWL2DLProfile();
        OWLDatatype d = Datatype(IRI(START + "test"));
        declare(o, d, Integer(), Boolean(), FAKEDATATYPE);
        m.addAxiom(o, DatatypeDefinition(d, Boolean()));
        m.addAxiom(o, DatatypeDefinition(Boolean(), d));
        m.addAxiom(o, DatatypeDefinition(FAKEDATATYPE, Integer()));
        m.addAxiom(o, DatatypeDefinition(Integer(), FAKEDATATYPE));
View Full Code Here

TOP

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

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.