agroportal / project-management

Repository used to consolidate documentation about the AgroPortal project and track content related issues.
http://agroportal.lirmm.fr
7 stars 0 forks source link

Logical axioms (equivalentClass or subClassOf done with ow:Restriction) are transformed into direct triples by our backend #499

Open jonquet opened 3 months ago

jonquet commented 3 months ago

I like to investigate a bit how we deal with logical axioms in AgroPortal.

Lets take SFWO as an example: https://agroportal.lirmm.fr/ontologies/SFWO

_We use logical axioms a lot, because our ontology is designed for applications that use reasoning. Here is an example of a logical definition: microbivore (http://purl.org/sfwo/SFWO_0000061) = eats some microorganism We also have some General Class Axioms: microbivore and ('member of' some Oribatida) SubClassOf 'member of' value Oribatida.microbivores_

Indeed the source file show this: (e.g. RO_0002470 = "eats")

Capture d’écran 2024-03-08 à 11 53 46

and later (with NCBITaxon_66551 = "Oribatida)

Capture d’écran 2024-03-08 à 11 59 06

Then our API call for the resulted class in our backend is : https://data.agroportal.lirmm.fr/ontologies/SFWO/classes/http%3A%2F%2Fpurl.org%2Fsfwo%2FSFWO_0000061?display=all

But this shows that on our side the equivalentClass and restriction has been transformed into a direct triple : SFWO_0000061 (subject) RO_0002470 (predicate) SFWO_0000062 (object)

Capture d’écran 2024-03-08 à 12 02 44

Which is confirmed by our triple store:

Capture d’écran 2024-03-08 à 12 05 26

And the General Class Axioms do not even appear... they are not parsed/treated.

jonquet commented 3 months ago

I am not sure of what we should do exactly to "deal with" these logical axioms ... but I am not crazy about the fact that we flatten the owl:Restriction into a triple. @jvendetti an idea ?

syphax-bouazzouni commented 3 months ago

Where do you see the flattened axioms ? did they not disappear;

jonquet commented 3 months ago

Well in the UI, in the Raw data part, the json triple is basically displayed like this:

Capture d’écran 2024-03-08 à 12 29 23
jonquet commented 3 months ago

Related to this... need investigation: CO_356 has similar OWL restrictions statements but they are not "flatten" into simple relation by the OWL-API. Source file

Capture d’écran 2024-03-13 à 17 08 04

Result in AgroPortal

Capture d’écran 2024-03-13 à 17 09 37

To do: