private void testClassify(String testID, String testExpectedID) {
        log.info("Testing the CLASSIFY task");
        OWLOntologyManager manager = TestData.manager;
        // We prepare the input ontology
        try {
            OWLOntology testOntology = manager.createOntology();
            OWLOntologyID testOntologyID = testOntology.getOntologyID();
            log.debug("Created test ontology with ID: {}", testOntologyID);
            manager.applyChange(new AddImport(testOntology, TestData.factory.getOWLImportsDeclaration(IRI
                    .create(testID))));
            // Maybe we want to see what is in before
            if (log.isDebugEnabled()) TestUtils.debug(manager.getOntology(testOntologyID), log);
            // Now we test the method
            log.debug("Running HermiT");
            Set<OWLAxiom> inferred = this.theinstance.runTask(ReasoningService.Tasks.CLASSIFY,
                manager.getOntology(testOntologyID));
            // Maybe we want to see the inferred axiom list
            if (log.isDebugEnabled()) {
                TestUtils.debug(inferred, log);
            }
            Set<OWLLogicalAxiom> expectedAxioms = manager.getOntology(IRI.create(testExpectedID))
                    .getLogicalAxioms();
            Set<OWLAxiom> missing = new HashSet<OWLAxiom>();
            for (OWLAxiom expected : expectedAxioms) {
                if (!inferred.contains(expected)) {
                    log.error("missing expected axiom: {}", expected);
                    missing.add(expected);
                }
            }
            assertTrue(missing.isEmpty());
            // We want only Class related axioms in the result set
            for (OWLAxiom a : inferred) {
                assertTrue(a instanceof OWLClassAssertionAxiom || a instanceof OWLSubClassOfAxiom
                           || a instanceof OWLEquivalentClassesAxiom || a instanceof OWLDisjointClassesAxiom);
            }
            // We want to remove the ontology from the manager
            manager.removeOntology(testOntology);
        } catch (OWLOntologyCreationException e) {
            log.error("An {} have been thrown while creating the input ontology for test", e.getClass());
            assertTrue(false);
        } catch (ReasoningServiceException e) {
            log.error("An {} have been thrown while executing the reasoning", e.getClass());
            assertTrue(false);
        } catch (InconsistentInputException e) {
            log.error("An {} have been thrown while executing the reasoning", e.getClass());
            assertTrue(false);
        } catch (UnsupportedTaskException e) {
            log.error("An {} have been thrown while executing the reasoning", e.getClass());
            assertTrue(false);
        }
    }
private void testClassify(String testID, String testExpectedID) {
        log.info("Testing the CLASSIFY task");
        OWLOntologyManager manager = TestData.manager;
       
        try {
            OWLOntology testOntology = manager.createOntology();
            OWLOntologyID testOntologyID = testOntology.getOntologyID();
            log.debug("Created test ontology with ID: {}", testOntologyID);
            manager.applyChange(new AddImport(testOntology, TestData.factory.getOWLImportsDeclaration(IRI
                    .create(testID))));
           
            if (log.isDebugEnabled()) TestUtils.debug(manager.getOntology(testOntologyID), log);
           
            log.debug("Running HermiT");
            Set<OWLAxiom> inferred = this.theinstance.runTask(ReasoningService.Tasks.CLASSIFY,
                manager.getOntology(testOntologyID));
           
            if (log.isDebugEnabled()) {
                TestUtils.debug(inferred, log);
            }
            Set<OWLLogicalAxiom> expectedAxioms = manager.getOntology(IRI.create(testExpectedID))
                    .getLogicalAxioms();
            Set<OWLAxiom> missing = new HashSet<OWLAxiom>();
            for (OWLAxiom expected : expectedAxioms) {
                if (!inferred.contains(expected)) {
                    log.error("missing expected axiom: {}", expected);
                    missing.add(expected);
                }
            }
            assertTrue(missing.isEmpty());
           
            for (OWLAxiom a : inferred) {
                assertTrue(a instanceof OWLClassAssertionAxiom || a instanceof OWLSubClassOfAxiom
                           || a instanceof OWLEquivalentClassesAxiom || a instanceof OWLDisjointClassesAxiom);
            }
           
            manager.removeOntology(testOntology);
        } catch (OWLOntologyCreationException e) {
            log.error("An {} have been thrown while creating the input ontology for test", e.getClass());
            assertTrue(false);
        } catch (ReasoningServiceException e) {
            log.error("An {} have been thrown while executing the reasoning", e.getClass());
            assertTrue(false);
        } catch (InconsistentInputException e) {
            log.error("An {} have been thrown while executing the reasoning", e.getClass());
            assertTrue(false);
        } catch (UnsupportedTaskException e) {
            log.error("An {} have been thrown while executing the reasoning", e.getClass());
            assertTrue(false);
        }
    }
private void testclassify(string testid, string testexpectedid) { log.info("testing the classify task"); owlontologymanager manager = testdata.manager; try { owlontology testontology = manager.createontology(); owlontologyid testontologyid = testontology.getontologyid(); log.debug("created test ontology with id: {}", testontologyid); manager.applychange(new addimport(testontology, testdata.factory.getowlimportsdeclaration(iri .create(testid)))); if (log.isdebugenabled()) testutils.debug(manager.getontology(testontologyid), log); log.debug("running hermit"); set<owlaxiom> inferred = this.theinstance.runtask(reasoningservice.tasks.classify, manager.getontology(testontologyid)); if (log.isdebugenabled()) { testutils.debug(inferred, log); } set<owllogicalaxiom> expectedaxioms = manager.getontology(iri.create(testexpectedid)) .getlogicalaxioms(); set<owlaxiom> missing = new hashset<owlaxiom>(); for (owlaxiom expected : expectedaxioms) { if (!inferred.contains(expected)) { log.error("missing expected axiom: {}", expected); missing.add(expected); } } asserttrue(missing.isempty()); for (owlaxiom a : inferred) { asserttrue(a instanceof owlclassassertionaxiom || a instanceof owlsubclassofaxiom || a instanceof owlequivalentclassesaxiom || a instanceof owldisjointclassesaxiom); } manager.removeontology(testontology); } catch (owlontologycreationexception e) { log.error("an {} have been thrown while creating the input ontology for test", e.getclass()); asserttrue(false); } catch (reasoningserviceexception e) { log.error("an {} have been thrown while executing the reasoning", e.getclass()); asserttrue(false); } catch (inconsistentinputexception e) { log.error("an {} have been thrown while executing the reasoning", e.getclass()); asserttrue(false); } catch (unsupportedtaskexception e) { log.error("an {} have been thrown while executing the reasoning", e.getclass()); asserttrue(false); } }