Package org.semanticweb.owlapi.profiles

Examples of org.semanticweb.owlapi.profiles.OWL2ELProfile


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


            throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        m.addAxiom(o,
                ClassAssertion(OWLThing(), DF.getOWLAnonymousIndividual()));
        OWL2ELProfile profile = new OWL2ELProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfAnonymousIndividual.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

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

                df.getOWLLiteral(true));
        OWLAnnotationAssertionAxiom ax = df.getOWLAnnotationAssertionAxiom(
                IRI.create("urn:test:ELProfile"), ann);
        m.addAxiom(o, ax);
        m.addAxiom(o, Declaration(OWL2Datatype.XSD_BOOLEAN.getDatatype(df)));
        checkProfile(o, new OWL2ELProfile(), true);
    }
View Full Code Here

    protected String head2 = "<rdf:RDF xml:base=\"urn:test\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\">";
    @Nonnull
    protected String head3 = "<rdf:RDF xml:base=\"urn:test\" xmlns=\"urn:test#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">";

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

            throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, OP);
        m.addAxiom(o, SubObjectPropertyOf(OP, ObjectInverseOf(OP)));
        OWL2ELProfile profile = new OWL2ELProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfObjectPropertyInverse.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

            throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, DATAP, CL);
        m.addAxiom(o, SubClassOf(CL, DataAllValuesFrom(DATAP, Integer())));
        OWL2ELProfile profile = new OWL2ELProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

                    throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, DATAP, CL, Integer());
        m.addAxiom(o, SubClassOf(CL, DataExactCardinality(1, DATAP, Integer())));
        OWL2ELProfile profile = new OWL2ELProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

            throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, DATAP, CL, Integer());
        m.addAxiom(o, SubClassOf(CL, DataMaxCardinality(1, DATAP, Integer())));
        OWL2ELProfile profile = new OWL2ELProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

            throws Exception {
        OWLOntology o = createOnto();
        OWLOntologyManager m = o.getOWLOntologyManager();
        declare(o, DATAP, CL, Integer());
        m.addAxiom(o, SubClassOf(CL, DataMinCardinality(1, DATAP, Integer())));
        OWL2ELProfile profile = new OWL2ELProfile();
        int expected = 1;
        Class[] expectedViolations = { UseOfIllegalClassExpression.class };
        runAssert(o, profile, expected, expectedViolations);
    }
View Full Code Here

TOP

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

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.