Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLClassExpression


            OWLObjectPropertyExpression property = getConsumer()
                    .translateObjectPropertyExpression(propertyIRI);
            IRI fillerIRI = getConsumer().getResourceObject(mainNode,
                    OWL_SOME_VALUES_FROM, true);
            assert fillerIRI != null;
            OWLClassExpression filler = accessor
                    .translateClassExpression(fillerIRI);
            return getDataFactory()
                    .getOWLObjectSomeValuesFrom(property, filler);
        }
View Full Code Here


                if (classIRI == null) {
                    throw new OWLRuntimeException(
                            "Don't know how to translate SWRL Atom: class IRI is null "
                                    + firstObject);
                }
                OWLClassExpression desc = accessor
                        .translateClassExpression(classIRI);
                return dataFactory.getSWRLClassAtom(desc, iObject);
            } else if (consumer.isSWRLDataRangeAtom(firstObject)) {
                // DR(?x) or DR(val)
                SWRLDArgument dObject = translateSWRLAtomDObject(firstObject,
View Full Code Here

    @Nonnull
    @Override
    protected Set<OWLAxiom> getAxioms() {
        OWLClass clsA = createClass();
        OWLObjectProperty prop = createObjectProperty();
        OWLClassExpression descA = df.getOWLObjectSomeValuesFrom(prop,
                df.getOWLThing());
        Set<OWLClassExpression> classExpressions = new HashSet<>();
        classExpressions.add(clsA);
        classExpressions.add(descA);
        OWLAxiom ax = df.getOWLEquivalentClassesAxiom(classExpressions);
View Full Code Here

        return AxiomType.DATA_PROPERTY_RANGE;
    }

    @Override
    public OWLSubClassOfAxiom asOWLSubClassOfAxiom() {
        OWLClassExpression sup = new OWLDataAllValuesFromImpl(getProperty(),
                getRange());
        return new OWLSubClassOfAxiomImpl(OWL_THING, sup, NO_ANNOTATIONS);
    }
View Full Code Here

    public Set<OWLEquivalentClassesAxiom> asPairwiseAxioms() {
        List<OWLClassExpression> classExpressions = new ArrayList<>(
                getClassExpressions());
        Set<OWLEquivalentClassesAxiom> result = new HashSet<>();
        for (int i = 0; i < classExpressions.size() - 1; i++) {
            OWLClassExpression ceI = classExpressions.get(i);
            OWLClassExpression ceJ = classExpressions.get(i + 1);
            result.add(new OWLEquivalentClassesAxiomImpl(new HashSet<>(Arrays
                    .asList(ceI, ceJ)), NO_ANNOTATIONS));
        }
        return result;
    }
View Full Code Here

        if (individuals.size() == 2) {
            return Collections.<OWLEquivalentClassesAxiom> singleton(this);
        }
        Set<OWLEquivalentClassesAxiom> result = new HashSet<>();
        for (int i = 0; i < individuals.size() - 1; i++) {
            OWLClassExpression indI = individuals.get(i);
            OWLClassExpression indJ = individuals.get(i + 1);
            result.add(new OWLEquivalentClassesAxiomImpl(new HashSet<>(Arrays
                    .asList(indI, indJ)), getAnnotations()));
        }
        return result;
    }
View Full Code Here

        assertNotNull(obj);
    }

    @Test
    public void testEqualsPositiveIntersection() {
        OWLClassExpression a = C(IRI());
        OWLClassExpression b = C(IRI());
        OWLClassExpression c = C(IRI());
        OWLObject objA = testSubject.getOWLObjectIntersectionOf(a, b, c);
        OWLObject objB = testSubject.getOWLObjectIntersectionOf(a, b, c);
        assertEquals(objA, objB);
    }
View Full Code Here

        assertEquals(objA, objB);
    }

    @Test
    public void testEqualsNegativeIntersection() {
        OWLClassExpression a = C(IRI());
        OWLClassExpression b = C(IRI());
        OWLObject objA = testSubject.getOWLObjectIntersectionOf(a, b);
        OWLClassExpression c = C(IRI());
        OWLObject objB = testSubject.getOWLObjectIntersectionOf(a, b, c);
        assertFalse(objA.equals(objB));
    }
View Full Code Here

        assertFalse(objA.equals(objB));
    }

    @Test
    public void testHashCodeIntersection() {
        OWLClassExpression a = C(IRI());
        OWLClassExpression b = C(IRI());
        OWLClassExpression c = C(IRI());
        OWLObject objA = testSubject.getOWLObjectIntersectionOf(a, b, c);
        OWLObject objB = testSubject.getOWLObjectIntersectionOf(a, b, c);
        assertEquals(objA.hashCode(), objB.hashCode());
    }
View Full Code Here

        assertEquals(rngA.hashCode(), rngB.hashCode());
    }

    @Test
    public void testEqualsPositiveDisjointClasses() {
        OWLClassExpression a = C(IRI());
        OWLClassExpression b = C(IRI());
        OWLClassExpression c = C(IRI());
        OWLObject objA = testSubject.getOWLDisjointClassesAxiom(a, b, c);
        OWLObject objB = testSubject.getOWLDisjointClassesAxiom(a, b, c);
        assertEquals(objA, objB);
    }
View Full Code Here

TOP

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

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.