Package org.semanticweb.owlapi.profiles

Examples of org.semanticweb.owlapi.profiles.OWL2RLProfile$OWL2RLObjectVisitor


        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        OWLDataProperty dp = DataProperty(IRI("urn:test#test"));
        declare(o, DATAP, dp);
        m.addAxiom(o, EquivalentDataProperties(DATAP, dp));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalAxiom.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here


                    throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, DATAP);
        m.addAxiom(o, FunctionalDataProperty(DATAP));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 0;
        Class[] expectedViolations = {};
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

            throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, CL, OP);
        m.addAxiom(o, HasKey(ObjectComplementOf(CL), OP));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfNonSubClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

        declare(o, OP, OP);
        m.addAxiom(
                o,
                ObjectPropertyDomain(OP,
                        ObjectMinCardinality(1, OP, OWLThing())));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfNonSuperClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, OP);
        m.addAxiom(
                o,
                ObjectPropertyRange(OP, ObjectMinCardinality(1, OP, OWLThing())));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfNonSuperClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

        OWLOntologyManager m = o.getOWLOntologyManager();
        m.addAxiom(
                o,
                SubClassOf(ObjectComplementOf(OWLThing()),
                        ObjectOneOf(NamedIndividual(IRI("urn:test#test")))));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 2;
        Class[] expectedViolations = { UseOfNonSubClassExpression.class,
                UseOfNonSuperClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

            throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        m.addAxiom(o, DF.getSWRLRule(new HashSet<SWRLAtom>(),
                new HashSet<SWRLAtom>()));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalAxiom.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

            throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, DATAP);
        m.addAxiom(o, DataPropertyRange(DATAP, DataComplementOf(Integer())));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalDataRange.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

        declare(o, DATAP);
        m.addAxiom(
                o,
                DataPropertyRange(DATAP,
                        DataIntersectionOf(Integer(), Boolean())));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalDataRange.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, DATAP);
        m.addAxiom(o,
                DataPropertyRange(DATAP, DataOneOf(Literal(1), Literal(2))));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalDataRange.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.profiles.OWL2RLProfile$OWL2RLObjectVisitor

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.