Examples of filterAxioms()


Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

        man.addAxiom(ont, ax2);
        performAxiomTests(ont, ax, ax2);
        assertTrue(ont.getSubClassAxiomsForSubClass(clsA).contains(ax));
        assertTrue(ont.getSubClassAxiomsForSuperClass(clsB).contains(ax));
        assertTrue(ont.getAxioms(clsA, EXCLUDED).contains(ax));
        assertTrue(sup(ont.filterAxioms(subClassWithSub, clsA, INCLUDED))
                .contains(clsB));
        assertTrue(sub(ont.filterAxioms(subClassWithSuper, clsB, INCLUDED))
                .contains(clsA));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

        assertTrue(ont.getSubClassAxiomsForSubClass(clsA).contains(ax));
        assertTrue(ont.getSubClassAxiomsForSuperClass(clsB).contains(ax));
        assertTrue(ont.getAxioms(clsA, EXCLUDED).contains(ax));
        assertTrue(sup(ont.filterAxioms(subClassWithSub, clsA, INCLUDED))
                .contains(clsB));
        assertTrue(sub(ont.filterAxioms(subClassWithSuper, clsB, INCLUDED))
                .contains(clsA));
    }

    @Test
    public void testEquivalentClassesAxiomAccessors() {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

        OWLAnnotationProperty propR = AnnotationProperty(iri("propR"));
        ont.getOWLOntologyManager().addAxiom(ont,
                df.getOWLSubAnnotationPropertyOfAxiom(propP, propQ));
        ont.getOWLOntologyManager().addAxiom(ont,
                df.getOWLSubAnnotationPropertyOfAxiom(propP, propR));
        Collection<OWLAxiom> axioms = ont.filterAxioms(
                Filters.subAnnotationWithSub, propP, INCLUDED);
        assertTrue(sup(axioms).contains(propQ));
        assertTrue(sup(axioms).contains(propR));
        axioms = ont
                .filterAxioms(Filters.subAnnotationWithSub, propP, EXCLUDED);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

                df.getOWLSubAnnotationPropertyOfAxiom(propP, propR));
        Collection<OWLAxiom> axioms = ont.filterAxioms(
                Filters.subAnnotationWithSub, propP, INCLUDED);
        assertTrue(sup(axioms).contains(propQ));
        assertTrue(sup(axioms).contains(propR));
        axioms = ont
                .filterAxioms(Filters.subAnnotationWithSub, propP, EXCLUDED);
        assertTrue(sup(axioms).contains(propQ));
        assertTrue(sup(axioms).contains(propR));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

        ont.getOWLOntologyManager().addAxiom(ont,
                df.getOWLSubAnnotationPropertyOfAxiom(propP, propQ));
        ont.getOWLOntologyManager().addAxiom(ont,
                df.getOWLSubAnnotationPropertyOfAxiom(propP, propR));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propQ, INCLUDED))
                .contains(propP));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propQ, EXCLUDED))
                .contains(propP));
        assertTrue(sub(
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

                df.getOWLSubAnnotationPropertyOfAxiom(propP, propR));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propQ, INCLUDED))
                .contains(propP));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propQ, EXCLUDED))
                .contains(propP));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propR, INCLUDED))
                .contains(propP));
        assertTrue(sub(
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

                .contains(propP));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propQ, EXCLUDED))
                .contains(propP));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propR, INCLUDED))
                .contains(propP));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propR, EXCLUDED))
                .contains(propP));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

                .contains(propP));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propR, INCLUDED))
                .contains(propP));
        assertTrue(sub(
                ont.filterAxioms(subAnnotationWithSuper, propR, EXCLUDED))
                .contains(propP));
    }
}
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

            // do anything that's necessary, e.g., print them out
            // System.out.println("Referenced class: " + cls);
        }
        // We should also find that B is an ASSERTED superclass of A
        Iterable<OWLClassExpression> superClasses = sup(
                ontology.filterAxioms(Filters.subClassWithSub, clsA, INCLUDED),
                OWLClassExpression.class);
        // Now save the ontology. The ontology will be saved to the location
        // where we loaded it from, in the default ontology format
        manager.saveOntology(ontology);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntology.filterAxioms()

        o.getOWLOntologyManager().addAxiom(o, ax);
        o.getOWLOntologyManager().addAxiom(o, ax2);
        o.getOWLOntologyManager().addAxiom(o, ax3);
        o.getOWLOntologyManager().addAxiom(o, ax4);
        assertTrue(o.getAxioms(AxiomType.SUB_OBJECT_PROPERTY).contains(ax));
        Collection<OWLAxiom> axioms = o.filterAxioms(
                Filters.subObjectPropertyWithSuper, d, INCLUDED);
        assertTrue(sub(axioms).contains(c));
        axioms = o.filterAxioms(Filters.subObjectPropertyWithSub, c, INCLUDED);
        assertTrue(sup(axioms).contains(d));
        assertTrue(domain(o.getObjectPropertyDomainAxioms(c)).contains(x));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.