Package org.semanticweb.owlapi.reasoner.structural

Examples of org.semanticweb.owlapi.reasoner.structural.StructuralReasoner$RawClassHierarchyProvider


    @Test
    public void testRecusion() throws OWLOntologyCreationException {
        OWLOntology ontology = createOntology();
        String ontName = ontology.getOntologyID().getOntologyIRI().get()
                .toString();
        StructuralReasoner reasoner = new StructuralReasoner(ontology,
                new SimpleConfiguration(), BufferingMode.BUFFERING);
        OWLClass cls = Class(IRI(ontName + "#Koala"));
        reasoner.getSubClasses(cls, false);
        reasoner.getSuperClasses(cls, false);
    }
View Full Code Here


        OWLOntology ont = getOWLOntology("ont");
        OWLOntologyManager man = ont.getOWLOntologyManager();
        man.addAxiom(ont, EquivalentClasses(OWLThing(), clsX));
        man.addAxiom(ont, SubClassOf(clsB, clsA));
        man.addAxiom(ont, EquivalentClasses(clsA, clsAp));
        StructuralReasoner reasoner = new StructuralReasoner(ont,
                new SimpleConfiguration(), BufferingMode.NON_BUFFERING);
        testClassHierarchy(reasoner);
        man.addAxiom(ont, SubClassOf(clsA, OWLThing()));
        testClassHierarchy(reasoner);
        man.removeAxiom(ont, SubClassOf(clsA, OWLThing()));
View Full Code Here

        // We now add all subclasses (direct and indirect) of the chosen
        // classes. Ideally, it should be done using a DL reasoner, in order to
        // take inferred subclass relations into account. We are using the
        // structural reasoner of the OWL API for simplicity.
        Set<OWLEntity> seedSig = new HashSet<OWLEntity>();
        OWLReasoner reasoner = new StructuralReasoner(ont,
                new SimpleConfiguration(), BufferingMode.NON_BUFFERING);
        for (OWLEntity ent : sig) {
            seedSig.add(ent);
            if (OWLClass.class.isAssignableFrom(ent.getClass())) {
                NodeSet<OWLClass> subClasses = reasoner.getSubClasses(
                        (OWLClass) ent, false);
                seedSig.addAll(subClasses.getFlattened());
            }
        }
        // Output for debugging purposes
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.reasoner.structural.StructuralReasoner$RawClassHierarchyProvider

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.