Closed vChavezB closed 7 months ago
If you don't want to load the files from the web, why not changing the owl:imports with the local URL path?
This is currently not supported (see https://github.com/dgarijo/Widoco/issues/306), but having a local flag with the files to import is a bit of a hack, don't you think? The solution is quite similar to the one you proposed, but with the ability to load local files from the folder the ontology is declared.
I did not know about owl:import assertions to local URL paths. Nevertheless I consider this would add unecessary work to developers as each time before doing a merge to main they would need to change the paths.
Something similar that I do is use the catalog-v001.xml file in protege to point to local files while I develop the ontology. In the backend protege uses the SimpleIRIMapper
. In this case I am using the AutoIRIMapper which can point to a directory and search recursively files of type RDF/XML, OWL/XML, Manchester OWL Syntax, Functional Syntax and OBO. In addition it supports pointing to zip and jar files containing ontologies.
For the use case of loading local imports from the path of the ontology that widoco is documenting I think you would also need one of these mapper clases from the owlapi. So this could be used to inspire something that was discussed in #306
@vChavezB after another view, I am merging this PR. I think the functionality is a nice step towards #306, and it's better to have a temporary solution than have none. Thanks again for your contirbutions
This change allows to use local imports with the AutoIRIMapper from the owl api.
Motivation
I am working on a project that defines several ontologies. The pipeline generates the documentation for each of them in a single job and it imports online definitions. However, I have made local copies and this reduces the processing time from 5-6 minutes to 2 minutes.
Use cases
To enable this option use
-import
with a directory path. The option can be used multiple times in the same command line.Feel free to add comments or feedback to improve this suggestion.