Open jonquet opened 1 year ago
The technical issue here is that: for getting a concept children we use skos:broader
.
And to build the tree of an element we do skos:broader
until getting to an element that is a root (no more parent)
Some docs about this: https://doc.jonquetlab.lirmm.fr/doc/how-concepts-tree-view-works-L8tf8MlZoa
Possible solutions
When parsing an ontology we materialize the inverse properties, if in the file we have A skos:broader B
we materialize B skos:narrower A
:
In the get children request; we do the first try with skos:broader
if noting found than try skos:narrower
:
Use a configuration property to tell which property to use (skos:broader or skos:narrower)
Thanks for the analysis and suggestion. I would go for solution 3 as we already have in the default OntoPortal metadata a property to store the hierachry property of the ontology (bpm:hierarchyProperty). Typically the fallback shall be skos:broader for SKOS resource and rdfs:subClassOf for others and in the case of a hierachry based on skos:narrower,, we will only have to manually edit this ontology metadata to fix the problem.
We know this SKOS limitation for a while. I finaly have an exmaple of SKOS thesuarus that is properly decalring its hiearchy with :
https://agroportal.lirmm.fr/ontologies/SDNDEV
The hierarchy can't be displayed because its not declare in the source file with skos:broader properties. We can still reach the leaves and then the page will reload displaying them somewhere in the hierarchy bloc.
https://agroportal.lirmm.fr/ontologies/SDNDEV/?p=classes&conceptid=http%3A%2F%2Fvocab.nerc.ac.uk%2Fcollection%2FL05%2Fcurrent%2F69%2F