/** @param dataFactory * @param s */ public ManchesterOWLSyntaxEditorParser(OWLDataFactory dataFactory, String s) { this(new OWLOntologyLoaderConfiguration(), dataFactory, s); }
@Override public OWLOntologyLoaderConfiguration getConfiguration() { return new OWLOntologyLoaderConfiguration(); }
@Override public OWLOntologyLoaderConfiguration getConfiguration() { return new OWLOntologyLoaderConfiguration(); }
@Deprecated public OWLXMLParserHandler(OWLOntologyManager owlOntologyManager, OWLOntology ontology, OWLElementHandler<?> topHandler) { this(owlOntologyManager, ontology, topHandler, new OWLOntologyLoaderConfiguration()); }
@Deprecated public OWLXMLParserHandler(OWLOntologyManager owlOntologyManager, OWLOntology ontology) { this(owlOntologyManager, ontology, null, new OWLOntologyLoaderConfiguration()); }
/** * Internally copies this configuaration object. * * @return The copied configuration */ private OWLOntologyLoaderConfiguration copyConfiguration() { OWLOntologyLoaderConfiguration copy = new OWLOntologyLoaderConfiguration(); copy.overrides.putAll(overrides); copy.ignoredImports.clear(); copy.ignoredImports.addAll(ignoredImports); return copy; }
/** * Internally copies this configuaration object. * * @return The copied configuration */ private OWLOntologyLoaderConfiguration copyConfiguration() { OWLOntologyLoaderConfiguration copy = new OWLOntologyLoaderConfiguration(); copy.overrides.putAll(overrides); copy.ignoredImports.clear(); copy.ignoredImports.addAll(ignoredImports); return copy; }
/** * Internally copies this configuaration object. * * @return The copied configuration */ private OWLOntologyLoaderConfiguration copyConfiguration() { OWLOntologyLoaderConfiguration copy = new OWLOntologyLoaderConfiguration(); copy.overrides.putAll(overrides); copy.ignoredImports.clear(); copy.ignoredImports.addAll(ignoredImports); return copy; }
@Override public OWLOntologyFormat parse(final OWLOntologyDocumentSource documentSource, final OWLOntology ontology) throws OWLParserException, IOException, UnloadableImportException { return this.parse(documentSource, ontology, new OWLOntologyLoaderConfiguration()); }
@Override public OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, IOException, UnloadableImportException { return parse(documentSource, ontology, new OWLOntologyLoaderConfiguration()); }
@Override public OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, IOException, UnloadableImportException { return parse(documentSource, ontology, new OWLOntologyLoaderConfiguration()); }
@Override public OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, IOException, UnloadableImportException { return parse(documentSource, ontology, new OWLOntologyLoaderConfiguration()); }
@Override public OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, IOException, UnloadableImportException { return parse(documentSource, ontology, new OWLOntologyLoaderConfiguration()); }
@Override public OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, UnloadableImportException, IOException { return parse(documentSource, ontology, new OWLOntologyLoaderConfiguration()); }
@Override public OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, IOException, UnloadableImportException { return parse(documentSource, ontology, new OWLOntologyLoaderConfiguration()); }
@Override public OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, IOException, UnloadableImportException { return parse(documentSource, ontology, new OWLOntologyLoaderConfiguration()); }
public OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, UnloadableImportException, IOException { return parse(documentSource, ontology, new OWLOntologyLoaderConfiguration()); }
private static void adjustImports(OWLOntology ontology, List<OWLOntologyChange> changes) { OWLOntologyLoaderConfiguration configuration = new OWLOntologyLoaderConfiguration(); configuration = configuration.setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT); configuration = configuration.setMissingOntologyHeaderStrategy(MissingOntologyHeaderStrategy.IMPORT_GRAPH); try { adjustImports(ontology, changes, configuration); } catch (UnloadableImportException uie) { throw new RuntimeException("This shouldn't happen because the configuration says import problems should be ignored.", uie); } }
@Nonnull private static OWLOntologyLoaderConfiguration createLoaderConfig() { return new OWLOntologyLoaderConfiguration() .setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT) .setReportStackTraces(true) // It is safe to turn of illegal punning fixing as we've already parsed // (and saved) the ontology using a manager with this turned on. .setRepairIllegalPunnings(false); }
private OWLOntology loadOwlOntology() throws OWLOntologyCreationException { FileDocumentSource fileDocumentSource = new FileDocumentSource(ontologyFile); // use silent import handling strategy to enable ontology loading without internet access // see: https://github.com/molgenis/molgenis/issues/5301 OWLOntologyLoaderConfiguration owlOntologyLoaderConfiguration = new OWLOntologyLoaderConfiguration() .setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT); return manager.loadOntologyFromOntologyDocument( fileDocumentSource, owlOntologyLoaderConfiguration); }