Closed jonquet closed 1 year ago
Change the SPARQL query that is fetching the top Concept from
SELECT DISTINCT ?root WHERE {
GRAPH #{self.id.to_ntriples} {
?x #{RDF::SKOS[:hasTopConcept].to_ntriples} ?root .
}}
To
SELECT DISTINCT ?root WHERE {
GRAPH #{self.id.to_ntriples} {
#{self.ontology_uri.to_ntriples} #{RDF::SKOS[:hasTopConcept].to_ntriples} ?root .
}}
With this new query the fetched top concepts will be only from the owl:Ontology
Done in testportal
brilliant! Thanks a lot Syphax!
Problem
When a SKOS vocabulary contains several skos:ConceptScheme AgroPortal build the hierarchy tree displaying at the root all the concepts with a skos:topConceptOf declaration.
For instance INRAETHES in stageportal (see discussion #233)
Requirement
We already require (for metadata extraction, but also as a good practice) that ONE skos:ConceptScheme (that would be the main one, including the other ones) be also declared owl:Ontology. This allow to consider the concept scheme as the main object and grab the metadata annotation properties.
Proposed solution
Display in the hierarchy tree only the top concepts of the main concept scheme (i.e. the one which is alos declared owl:ontology).