Open gaurav opened 6 years ago
The point in terms of use case that I think shouldn't be missed is that this isn't just a technical matter. A user could use the Protege GUI to choose and define where all the ontologies come from (including those imported), and Protege will automatically save this in a catalog file. If jsphyloref can reuse that file, users would get a GUI for creating them for free.
As of PR #25, both TestCommand and WebserverCommand have support for a local
ontologies
directory, which will be scanned for ontologies before reasoning. Ontologies in that directory will always supercede those with the same URI available online.A more sophisticated system could be built by using OASIS XML Catalog files, which is the same format that Protege uses. Allowing users to specify an XML catalog file would give users fine control over exactly which local and which remote ontologies to use. If we could further provide a command line option for recording the source of each ontology in an XML catalog, this might make it easier for users to customize it to their needs.
Java includes a library for reading such files, and it should be possible to use this to implement an
OWLOntologyIRIMapper
. If this doesn't work for some reason, Protege has published a library for reading XML catalogs that includes anOWLOntologyIRIMapper
for XML catalogs.