@Nullable protected OWLOntology loadImports(OWLImportsDeclaration declaration, OWLOntologyLoaderConfiguration configuration) throws OWLOntologyCreationException { writeLock.lock(); try { importsLoadCount.incrementAndGet(); OWLOntology ont = null; try { ont = loadOntology(declaration.getIRI(), true, configuration); } catch (OWLOntologyCreationException e) { if (configuration .getMissingImportHandlingStrategy() == MissingImportHandlingStrategy.THROW_EXCEPTION) { throw e; } else { // Silent MissingImportEvent evt = new MissingImportEvent(declaration.getIRI(), e); fireMissingImportEvent(evt); } } finally { importsLoadCount.decrementAndGet(); } return ont; } finally { writeLock.unlock(); } }
@Nullable protected OWLOntology loadImports(OWLImportsDeclaration declaration, OWLOntologyLoaderConfiguration configuration) throws OWLOntologyCreationException { writeLock.lock(); try { importsLoadCount.incrementAndGet(); OWLOntology ont = null; try { ont = loadOntology(declaration.getIRI(), true, configuration); } catch (OWLOntologyCreationException e) { if (configuration .getMissingImportHandlingStrategy() == MissingImportHandlingStrategy.THROW_EXCEPTION) { throw e; } else { // Silent MissingImportEvent evt = new MissingImportEvent(declaration.getIRI(), e); fireMissingImportEvent(evt); } } finally { importsLoadCount.decrementAndGet(); } return ont; } finally { writeLock.unlock(); } }
@Nullable protected OWLOntology loadImports(OWLImportsDeclaration declaration, OWLOntologyLoaderConfiguration configuration) throws OWLOntologyCreationException { writeLock.lock(); try { importsLoadCount.incrementAndGet(); OWLOntology ont = null; try { ont = loadOntology(declaration.getIRI(), true, configuration); } catch (OWLOntologyCreationException e) { if (configuration .getMissingImportHandlingStrategy() == MissingImportHandlingStrategy.THROW_EXCEPTION) { throw e; } else { // Silent MissingImportEvent evt = new MissingImportEvent(declaration.getIRI(), e); fireMissingImportEvent(evt); } } finally { importsLoadCount.decrementAndGet(); } return ont; } finally { writeLock.unlock(); } }
@Nullable protected OWLOntology loadImports(OWLImportsDeclaration declaration, OWLOntologyLoaderConfiguration configuration) throws OWLOntologyCreationException { writeLock.lock(); try { importsLoadCount.incrementAndGet(); OWLOntology ont = null; try { ont = loadOntology(declaration.getIRI(), true, configuration); } catch (OWLOntologyCreationException e) { if (configuration .getMissingImportHandlingStrategy() == MissingImportHandlingStrategy.THROW_EXCEPTION) { throw e; } else { // Silent MissingImportEvent evt = new MissingImportEvent(declaration.getIRI(), e); fireMissingImportEvent(evt); } } finally { importsLoadCount.decrementAndGet(); } return ont; } finally { writeLock.unlock(); } }
private OWLOntology loadImports(OWLImportsDeclaration declaration) throws OWLOntologyCreationException { importsLoadCount++; OWLOntology ont = null; try { ont = loadOntology(declaration.getIRI()); } catch (OWLOntologyCreationException e) { if (!silentMissingImportsHandling) { throw e; } else { // Silent MissingImportEvent evt = new MissingImportEvent(declaration.getURI(), e); fireMissingImportEvent(evt); } } finally { importsLoadCount--; } return ont; }