Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating documentation of non-derreferenceable imports is problematic #306

Open
dgarijo opened this issue Sep 18, 2018 · 10 comments
Open
Labels
enhancement pressing Will fix issue in next release
Milestone

Comments

@dgarijo
Copy link
Owner

dgarijo commented Sep 18, 2018

Maybe WIDOCO could ask the user to resolve the dependencies manually if an error is detected when loading.

@rjyounes
Copy link

How about allowing adding a mapping to the config file, mapping ontology IRIs to files on the file system?

@dgarijo
Copy link
Owner Author

dgarijo commented Sep 27, 2018

At the moment I read the ontology with the OWL API and fail silently if there are any errors. Instead of failing silently I could then ping the user to solve the issues or resort to something in the configuration. Thanks for the idea!

@ghost
Copy link

ghost commented Mar 19, 2020

That would be very useful. I have multiple ontologies that depend on each other and are developed together. Generating the documentation is difficult, because I would have to publish some of them first.

@dgarijo dgarijo added the pressing Will fix issue in next release label Apr 17, 2020
@Michiel-s
Copy link

Hi @dgarijo.

First of all, thanks for your great repo.

Do you have any update on this issue?

I use the CLI in my Dockerfile: java -jar /usr/bin/widoco.jar -ontFile ontology-index.ttl -outFolder doc -webVowl -lang en-nl

I'm working on generating documentation for a complete set of ontologies that is developed as a whole but split into several files. My project folder looks like:

|_ ontology-index.ttl
|_ catalog-v001.xml
|_ taxonomies
  |_ skos-taxonomy-1.ttl
  |_ skos-taxonomy-2.ttl
|_ core
  |_ file1.ttl
|_ ...

My ontology-index.ttl contains:

...
my-ontology:
  rdf:type owl:Ontology ;
  owl:imports
    <http://www.w3.org/2004/02/skos/core> ,
    <https://example.com/my-ontology/taxonomies/Taxonomy-1/> ,
    <https://example.com/my-ontology/taxonomies/Taxonomy-2/> ,
    <https://example.com/my-ontology/core/> ,
    ;
.
...

Obviously only the skos import works. The other imports cannot be resolved when developing locally.

Protoge (and other tools) use the XML Catalog for this. My catalog-v001.xml looks like:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
    <group id="Folder Repository, directory=, recursive=true, Auto-Update=true, version=2" prefer="public" xml:base=""/>
    <!-- Taxonomies -->
    <uri name="https://example.com/my-ontology/taxonomies/Taxonomy-1/" uri="./taxonomies/skos-taxonomy-1.ttl"/>
    <uri name="https://example.com/my-ontology/taxonomies/Taxonomy-2/" uri="./taxonomies/skos-taxonomy-2.ttl"/>
    <uri name="https://example.com/my-ontology/core/" uri="./core/file-1.ttl"/>
</catalog>

As you can see, here the mapping is specified from URI to local file.
When I load ontology-index.ttl into Protoge, it automatically recognizes the catalog file in the same directory and knows how to resolve the imports.

Would that be a solution to add to Widoco?

@dgarijo dgarijo added this to the v1.4.15 milestone Nov 20, 2020
@dgarijo
Copy link
Owner Author

dgarijo commented Nov 20, 2020

Hi @Michiel-s,
thanks for giving Widoco a try! I haven't pushed this issue further (I haven't had much time for it). Since it looks like it's a feature that would be wanted by several people I will include it in the next milestone.

Your suggestion is a good idea, I can look for this file, although it won't work if you have worked outside protege. So in the end resorting to some local config to solve this issue seems like the path forward.

@Michiel-s
Copy link

That would be great. Please let me know if I can be of any help.

@JohannesLipp
Copy link

JohannesLipp commented Nov 21, 2020

It could be an option to supply such a mapping of ontology URIs to custom (local) paths via the configuration file. We cannot do this now, but it could be a feature :)

@dgarijo
Copy link
Owner Author

dgarijo commented Nov 21, 2020

I agree, that would be the path of least resistance (no pun intended :D).
This would require:

  • Have the configuration to solve these mismatches.
  • When there is a mismatch, try to look for the catalog-v001.xml file to solve it first.

@dgarijo dgarijo modified the milestones: v1.4.15, v1.4.16 Jun 26, 2021
@GenEars
Copy link

GenEars commented Dec 23, 2021

Hello @dgarijo
It looks like this issue is also true when there's some URL rewriting at remote server side : Widoco sees remote URIs as non-derreferenceable (i.e. non accessible) although a specific navigation scenario is implemented on the server side.

For example, a standard http request will send users to some html page describing the ontology, whereas using specific HTTP Accept Headers on same URL will trigger an ontology spec export as a turtle file or instances export after some SPARQL request (see Virtuoso's doc about this here).

So my point is that your import mechanism through OWL API - or whatever - could use HTTP Accept Headers for managing such false non-derreferenceable situation.

Maybe that's too far from your import policy, anyway I hope it helps.

@dgarijo
Copy link
Owner Author

dgarijo commented Dec 23, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pressing Will fix issue in next release
Projects
None yet
Development

No branches or pull requests

5 participants