Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLObjectProperty


        assertFalse(restC.equals(restD));
    }

    @Test
    public void testHashCodeObjectHas() {
        OWLObjectProperty prop = OP(IRI());
        OWLIndividual filler = I();
        OWLRestriction restA = testSubject.getOWLObjectHasValue(prop, filler);
        OWLRestriction restB = testSubject.getOWLObjectHasValue(prop, filler);
        assertEquals(restA.hashCode(), restB.hashCode());
    }
View Full Code Here


        assertEquals(restA.hashCode(), restB.hashCode());
    }

    @Test
    public void testEqualsPositiveObjectSome() {
        OWLObjectProperty prop = OP(IRI());
        OWLClassExpression filler = C(IRI());
        OWLRestriction restA = testSubject.getOWLObjectSomeValuesFrom(prop,
                filler);
        OWLRestriction restB = testSubject.getOWLObjectSomeValuesFrom(prop,
                filler);
View Full Code Here

    }

    @Test
    public void testEqualsNegativeObjectSome() {
        // Different filler
        OWLObjectProperty prop = OP(IRI());
        OWLRestriction restA = testSubject.getOWLObjectSomeValuesFrom(prop,
                C(IRI()));
        OWLRestriction restB = testSubject.getOWLObjectSomeValuesFrom(prop,
                C(IRI()));
        assertFalse(restA.equals(restB));
View Full Code Here

        assertFalse(restC.equals(restD));
    }

    @Test
    public void testHashCodeObjectSome() {
        OWLObjectProperty prop = OP(IRI());
        OWLClassExpression filler = C(IRI());
        OWLRestriction restA = testSubject.getOWLObjectSomeValuesFrom(prop,
                filler);
        OWLRestriction restB = testSubject.getOWLObjectSomeValuesFrom(prop,
                filler);
View Full Code Here

        assertEquals(restA.hashCode(), restB.hashCode());
    }

    @Test
    public void testEqualsPositiveObjectAll() {
        OWLObjectProperty prop = OP(IRI());
        OWLClassExpression filler = C(IRI());
        OWLRestriction restA = testSubject.getOWLObjectAllValuesFrom(prop,
                filler);
        OWLRestriction restB = testSubject.getOWLObjectAllValuesFrom(prop,
                filler);
View Full Code Here

    }

    @Test
    public void testEqualsNegativeObjectAll() {
        // Different filler
        OWLObjectProperty prop = OP(IRI());
        OWLRestriction restA = testSubject.getOWLObjectAllValuesFrom(prop,
                C(IRI()));
        OWLRestriction restB = testSubject.getOWLObjectAllValuesFrom(prop,
                C(IRI()));
        assertFalse(restA.equals(restB));
View Full Code Here

    public void
            shouldCreateViolationForOWLSubPropertyChainOfAxiomInOWL2DLProfile()
                    throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        OWLObjectProperty op1 = ObjectProperty(IRI("urn:test#op"));
        declare(o, OP, op1);
        m.addAxiom(o, SubPropertyChainOf(Arrays.asList(op1), OP));
        m.addAxiom(o, SubPropertyChainOf(Arrays.asList(OP, op1, OP), OP));
        m.addAxiom(o, SubPropertyChainOf(Arrays.asList(OP, op1), OP));
        m.addAxiom(o, SubPropertyChainOf(Arrays.asList(op1, OP, op1, OP), OP));
View Full Code Here

            void
            shouldCreateViolationForOWLDisjointObjectPropertiesAxiomInOWL2ELProfile()
                    throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        OWLObjectProperty op1 = ObjectProperty(IRI("urn:test#test"));
        declare(o, OP, op1);
        m.addAxiom(o, DisjointObjectProperties(op1, OP));
        OWL2ELProfile profile = new OWL2ELProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalAxiom.class };
View Full Code Here

            shouldCreateViolationForOWLInverseObjectPropertiesAxiomInOWL2ELProfile()
                    throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, P);
        OWLObjectProperty p1 = ObjectProperty(IRI("urn:test#objectproperty"));
        declare(o, p1);
        m.addAxiom(o, InverseObjectProperties(P, p1));
        OWL2ELProfile profile = new OWL2ELProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalAxiom.class };
View Full Code Here

            shouldCreateViolationForOWLSubPropertyChainOfAxiomInOWL2ELProfile()
                    throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        OWL2ELProfile profile = new OWL2ELProfile();
        OWLObjectProperty op1 = ObjectProperty(IRI("urn:test#op1"));
        OWLObjectProperty op2 = ObjectProperty(IRI("urn:test#op"));
        declare(o, op1, OP, op2, CL);
        m.addAxiom(o, ObjectPropertyRange(OP, CL));
        List<OWLObjectProperty> asList = Arrays.asList(op2, op1);
        assert asList != null;
        m.addAxiom(o, SubPropertyChainOf(asList, OP));
View Full Code Here

TOP

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

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.