Package org.semanticweb.owlapi.profiles

Examples of org.semanticweb.owlapi.profiles.OWL2QLProfile


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


    private static OWLProfileReport el(OWLOntology in) {
        return new OWL2ELProfile().checkOntology(in);
    }

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

    @Tests(method = "public Object visit(OWLDatatype node)")
    public void shouldCreateViolationForOWLDatatypeInOWL2QLProfile()
            throws Exception {
        OWLOntology o = createOnto();
        declare(o, FAKEDATATYPE);
        OWL2QLProfile profile = new OWL2QLProfile();
        int expected = 0;
        Class[] expectedViolations = {};
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

    @Tests(method = "public Object visit(OWLAnonymousIndividual individual)")
    public void shouldCreateViolationForOWLAnonymousIndividualInOWL2QLProfile()
            throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        OWL2QLProfile profile = new OWL2QLProfile();
        m.addAxiom(o,
                ClassAssertion(OWLThing(), DF.getOWLAnonymousIndividual()));
        int expected = 1;
        Class[] expectedViolations = { UseOfAnonymousIndividual.class };
        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(CL, OP));
        OWL2QLProfile profile = new OWL2QLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalAxiom.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

        declare(o, OP);
        m.addAxiom(
                o,
                SubClassOf(ObjectComplementOf(OWLNothing()),
                        ObjectUnionOf(OWLThing(), OWLNothing())));
        OWL2QLProfile profile = new OWL2QLProfile();
        int expected = 2;
        Class[] expectedViolations = { UseOfNonSubClassExpression.class,
                UseOfNonSuperClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

        OWLOntologyManager m = o.getOWLOntologyManager();
        m.addAxiom(
                o,
                EquivalentClasses(ObjectUnionOf(OWLNothing(), OWLThing()),
                        OWLNothing()));
        OWL2QLProfile profile = new OWL2QLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfNonSubClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

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

        declare(o, OP);
        m.addAxiom(
                o,
                ObjectPropertyDomain(OP,
                        ObjectUnionOf(OWLNothing(), OWLThing())));
        OWL2QLProfile profile = new OWL2QLProfile();
        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, ObjectUnionOf(OWLNothing(), OWLThing())));
        OWL2QLProfile profile = new OWL2QLProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfNonSuperClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.profiles.OWL2QLProfile

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.