Package org.semanticweb.owlapi.profiles

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


        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        OWLDatatype datatype = Datatype(IRI("urn:test#datatype"));
        declare(o, datatype);
        m.addAxiom(o, DatatypeDefinition(datatype, Boolean()));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 2;
        Class[] expectedViolations = { UseOfIllegalAxiom.class,
                UseOfIllegalDataRange.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here


            if (negativeFinder.contains(ql)) {
                checkProfile(ontology, new OWL2QLProfile(), false);
            }
            // RL?
            if (finder.contains(rl)) {
                checkProfile(ontology, new OWL2RLProfile(), true);
            }
            if (negativeFinder.contains(rl)) {
                checkProfile(ontology, new OWL2RLProfile(), false);
            }
            m.removeOntology(ontology);
        }
    }
View Full Code Here

    private static OWLProfileReport ql(OWLOntology in) {
        return new OWL2QLProfile().checkOntology(in);
    }

    private static OWLProfileReport rl(OWLOntology in) {
        return new OWL2RLProfile().checkOntology(in);
    }
View Full Code Here

                + "<rdf:Property rdf:about=\"http://ex.com#p2\">\n"
                + "<rdf:type rdf:resource=\"http://www.w3.org/2002/07/owl#DatatypeProperty\"/>\n"
                + "<rdfs:subPropertyOf rdf:resource=\"http://ex.com#p1\"/>\n"
                + "</rdf:Property>\n" + "</rdf:RDF>";
        OWLOntology o = loadOntologyFromString(onto);
        OWL2RLProfile p = new OWL2RLProfile();
        OWLProfileReport report = p.checkOntology(o);
        assertTrue(report.getViolations().isEmpty());
    }
View Full Code Here

        declare(o, OP);
        m.addAxiom(
                o,
                ClassAssertion(ObjectMinCardinality(1, OP, OWLThing()),
                        NamedIndividual(IRI("urn:test#i"))));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfNonSuperClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

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

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

        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        OWLDataProperty dp = DataProperty(IRI("urn:test#dproperty"));
        declare(o, DATAP, dp);
        m.addAxiom(o, DisjointDataProperties(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, CL);
        m.addAxiom(o, DisjointUnion(CL, OWLThing(), OWLNothing()));
        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();
        m.addAxiom(o,
                EquivalentClasses(ObjectComplementOf(OWLThing()), OWLNothing()));
        OWL2RLProfile profile = new OWL2RLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfNonEquivalentClassExpression.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.