Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLObjectComplementOf


        }
        OWLClassExpression ex;
        if (exact != null && exact > 0) {
            ex = fac.getOWLObjectExactCardinality(exact, pe, ce);
        } else if (exact != null && exact == 0 || max != null && max == 0) {
            OWLObjectComplementOf ceCompl = fac.getOWLObjectComplementOf(ce);
            ex = fac.getOWLObjectAllValuesFrom(pe, ceCompl);
        } else if (max != null && min != null) {
            ex = fac.getOWLObjectIntersectionOf(
                    fac.getOWLObjectMinCardinality(min, pe, ce),
                    fac.getOWLObjectMaxCardinality(max, pe, ce));
View Full Code Here


                    if (filler instanceof OWLClass) {
                        r = getIdentifier(all.getProperty());
                        cls2 = getIdentifier(filler);
                        allOnly = Boolean.TRUE;
                    } else if (filler instanceof OWLObjectComplementOf) {
                        OWLObjectComplementOf restriction = (OWLObjectComplementOf) filler;
                        r = getIdentifier(all.getProperty());
                        cls2 = getIdentifier(restriction.getOperand());
                        exact = 0;
                    }
                } else if (ce instanceof OWLObjectIntersectionOf) {
                    // either a min-max or a some-all combination
                    Set<OWLClassExpression> operands = ((OWLObjectIntersectionOf) ce)
View Full Code Here

    }

    @Test
    public void shouldBuildComplementOf() {
        // given
        OWLObjectComplementOf expected = df.getOWLObjectComplementOf(ce);
        BuilderComplementOf builder = new BuilderComplementOf(expected, df);
        // when
        OWLObject built = builder.buildObject();
        // then
        assertEquals(expected, built);
View Full Code Here

    }

    @Test
    public void testCreationObjectComplementOf() {
        OWLClassExpression operand = C(IRI());
        OWLObjectComplementOf not = testSubject
                .getOWLObjectComplementOf(operand);
        assertNotNull(not);
    }
View Full Code Here

    }

    @Test
    public void testEqualsPositiveObjectComplementOf() {
        OWLClassExpression operand = C(IRI());
        OWLObjectComplementOf notA = testSubject
                .getOWLObjectComplementOf(operand);
        OWLObjectComplementOf notB = testSubject
                .getOWLObjectComplementOf(operand);
        assertEquals(notA, notB);
    }
View Full Code Here

    }

    @Test
    public void testEqualsNegativeObjectComplementOf() {
        OWLClassExpression operandA = C(IRI());
        OWLObjectComplementOf notA = testSubject
                .getOWLObjectComplementOf(operandA);
        OWLClassExpression operandB = C(IRI());
        OWLObjectComplementOf notB = testSubject
                .getOWLObjectComplementOf(operandB);
        assertFalse(notA.equals(notB));
    }
View Full Code Here

    }

    @Test
    public void testHashCodeObjectComplementOf() {
        OWLClassExpression operand = C(IRI());
        OWLObjectComplementOf notA = testSubject
                .getOWLObjectComplementOf(operand);
        OWLObjectComplementOf notB = testSubject
                .getOWLObjectComplementOf(operand);
        assertEquals(notA.hashCode(), notB.hashCode());
    }
View Full Code Here

        return visitor.visit(this);
    }

    @Override
  protected int compareObjectOfSameType(OWLObject object) {
        OWLObjectComplementOf other = (OWLObjectComplementOf) object;
        return operand.compareTo(other.getOperand());
    }
View Full Code Here

TOP

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

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.