Skip to content

Commit

Permalink
Add top concept entailments to ogc_skos_profile_entailments
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Nov 10, 2023
1 parent 66eabdb commit de0e461
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions scripts/ogc_skos_profile_entailments.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
a sh:NodeShape ;
sh:rule :topcollection ;
sh:rule :inscheme_by_uriroot ;
sh:rule :source_required;
# :rdfslabel> ;
sh:rule :source_required ;
#sh:rule :rdfslabel> ;
sh:rule :topConcepts ;
sh:targetClass skos:ConceptScheme ;
.

Expand Down Expand Up @@ -190,6 +191,19 @@ WHERE {
.





:topConcepts
a sh:SPARQLRule ;
rdfs:label "Add topConceptOf and hasTopConcept when no broader present" ;
sh:order 99 ;
sh:construct """
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
CONSTRUCT {
$this skos:hasTopConcept ?concept .
?concept skos:topConceptOf $this .
} WHERE {
?concept skos:inScheme $this .
FILTER NOT EXISTS { ?concept skos:broader ?broader1 }
FILTER NOT EXISTS { ?broader2 skos:narrower ?concept }
}
""" ;
.

0 comments on commit de0e461

Please sign in to comment.