private void initReasoner(final Reasoner reasoner) { this.reasoner_ = reasoner; this.reasoner_.registerAxiomLoader(new OwlOntologyLoader.Factory( owlOntology_, this.mainProgressMonitor_)); this.reasoner_.setAllowFreshEntities(isAllowFreshEntities); // use the secondary progress monitor by default, when necessary, we // switch to the primary progress monitor; this is to avoid bugs with // progress monitors in Protege this.reasoner_.setProgressMonitor(this.secondaryProgressMonitor_); }
private void initReasoner(final Reasoner reasoner) { this.reasoner_ = reasoner; this.reasoner_.registerAxiomLoader(new OwlOntologyLoader.Factory( owlOntology_, this.mainProgressMonitor_)); this.reasoner_.setAllowFreshEntities(isAllowFreshEntities); // use the secondary progress monitor by default, when necessary, we // switch to the primary progress monitor; this is to avoid bugs with // progress monitors in Protege this.reasoner_.setProgressMonitor(this.secondaryProgressMonitor_); }
private void initReasoner(final Reasoner reasoner) { this.reasoner_ = reasoner; this.reasoner_.registerAxiomLoader(new OwlOntologyLoader.Factory( owlOntology_, this.mainProgressMonitor_)); this.reasoner_.setAllowFreshEntities(isAllowFreshEntities); // use the secondary progress monitor by default, when necessary, we // switch to the primary progress monitor; this is to avoid bugs with // progress monitors in Protege this.reasoner_.setProgressMonitor(this.secondaryProgressMonitor_); }
@Override public void precomputeInferences(InferenceType... inferenceTypes) throws ReasonerInterruptedException, TimeOutException, InconsistentOntologyException { LOGGER_.trace("precomputeInferences(InferenceType...)"); checkInterrupted(); // we use the main progress monitor only here this.reasoner_.setProgressMonitor(this.mainProgressMonitor_); try { for (InferenceType inferenceType : inferenceTypes) { if (inferenceType.equals(InferenceType.CLASS_HIERARCHY)) reasoner_.getTaxonomy(); else if (inferenceType.equals(InferenceType.CLASS_ASSERTIONS)) reasoner_.getInstanceTaxonomy(); else if (inferenceType .equals(InferenceType.OBJECT_PROPERTY_HIERARCHY)) { reasoner_.getObjectPropertyTaxonomy(); } } } catch (ElkUnsupportedReasoningTaskException e) { throw unsupportedOwlApiMethod( "precomputeInferences(inferenceTypes)", e.getMessage()); } catch (ElkException e) { throw elkConverter_.convert(e); } catch (ElkRuntimeException e) { throw elkConverter_.convert(e); } finally { this.reasoner_.setProgressMonitor(this.secondaryProgressMonitor_); } }
@Override public void precomputeInferences(InferenceType... inferenceTypes) throws ReasonerInterruptedException, TimeOutException, InconsistentOntologyException { LOGGER_.trace("precomputeInferences(InferenceType...)"); checkInterrupted(); // we use the main progress monitor only here this.reasoner_.setProgressMonitor(this.mainProgressMonitor_); try { for (InferenceType inferenceType : inferenceTypes) { if (inferenceType.equals(InferenceType.CLASS_HIERARCHY)) reasoner_.getTaxonomy(); else if (inferenceType.equals(InferenceType.CLASS_ASSERTIONS)) reasoner_.getInstanceTaxonomy(); else if (inferenceType .equals(InferenceType.OBJECT_PROPERTY_HIERARCHY)) { reasoner_.getObjectPropertyTaxonomy(); } } } catch (ElkUnsupportedReasoningTaskException e) { throw unsupportedOwlApiMethod( "precomputeInferences(inferenceTypes)", e.getMessage()); } catch (ElkException e) { throw elkConverter_.convert(e); } catch (ElkRuntimeException e) { throw elkConverter_.convert(e); } finally { this.reasoner_.setProgressMonitor(this.secondaryProgressMonitor_); } }
@Override public void precomputeInferences(InferenceType... inferenceTypes) throws ReasonerInterruptedException, TimeOutException, InconsistentOntologyException { LOGGER_.trace("precomputeInferences(InferenceType...)"); checkInterrupted(); // we use the main progress monitor only here this.reasoner_.setProgressMonitor(this.mainProgressMonitor_); try { for (InferenceType inferenceType : inferenceTypes) { if (inferenceType.equals(InferenceType.CLASS_HIERARCHY)) reasoner_.getTaxonomy(); else if (inferenceType.equals(InferenceType.CLASS_ASSERTIONS)) reasoner_.getInstanceTaxonomy(); else if (inferenceType .equals(InferenceType.OBJECT_PROPERTY_HIERARCHY)) { reasoner_.getObjectPropertyTaxonomy(); } } } catch (ElkUnsupportedReasoningTaskException e) { throw unsupportedOwlApiMethod( "precomputeInferences(inferenceTypes)", e.getMessage()); } catch (ElkException e) { throw elkConverter_.convert(e); } catch (ElkRuntimeException e) { throw elkConverter_.convert(e); } finally { this.reasoner_.setProgressMonitor(this.secondaryProgressMonitor_); } }