-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28ba842
commit 9e8dac2
Showing
11 changed files
with
574 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#+ name: missingscopenote01 | ||
#+ endpoint: https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/Cultuurhistorische-Thesaurus-CHT/sparql | ||
|
||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
SELECT DISTINCT | ||
?prefLabelLaag1 | ||
?prefLabelLaag2 | ||
?mistEigenScopeNote | ||
(COALESCE(?aantalNarrowerScopeNote, 0) AS ?aantalNarrowerZonderScopeNote) | ||
(IF(COALESCE(?aantalNarrowerScopeNote, 0) > 0, "ja ->", "") AS ?uitklappen) | ||
WHERE { | ||
{ | ||
SELECT DISTINCT | ||
?prefLabelLaag1 | ||
?prefLabelLaag2 | ||
(IF(BOUND(?objectScopeNote), "nee"@nl, "ja, mist scopeNote"@nl) AS ?mistEigenScopeNote) | ||
(COUNT(DISTINCT ?narrowerTermNoScope) AS ?aantalNarrowerScopeNote) | ||
WHERE { | ||
SERVICE <https://digitaalerfgoed.poolparty.biz/PoolParty/sparql/term/id/cht> { | ||
# Triple path to reach Layer 2 and Layer 3: | ||
<https://data.cultureelerfgoed.nl/term/id/cht/bece25a6-eb64-46e8-85a8-2a7991f02a2c> | ||
skos:narrower ?object . | ||
|
||
<https://data.cultureelerfgoed.nl/term/id/cht/bece25a6-eb64-46e8-85a8-2a7991f02a2c> skos:prefLabel ?prefLabelLaag1 . | ||
FILTER(LANG(?prefLabelLaag1) = "nl") | ||
|
||
|
||
|
||
?object skos:prefLabel ?prefLabelLaag2 . | ||
FILTER(LANG(?prefLabelLaag2) = "nl") | ||
|
||
|
||
|
||
# Optional scopeNote on the Layer 3 term: | ||
OPTIONAL { | ||
?object skos:scopeNote ?objectScopeNote . | ||
FILTER(LANG(?objectScopeNote) = "nl") | ||
} | ||
|
||
# Use skos:narrower+ to get all descendant terms of ?object1 and only bind those without a Dutch scopeNote: | ||
OPTIONAL { | ||
?object skos:narrower+ ?narrowerTerm . | ||
FILTER NOT EXISTS { | ||
?narrowerTerm skos:scopeNote ?narrowerTermScopeNote . | ||
FILTER(LANG(?narrowerTermScopeNote) = "nl") | ||
} | ||
BIND(?narrowerTerm AS ?narrowerTermNoScope) | ||
} | ||
} | ||
} | ||
GROUP BY ?prefLabelLaag1 ?prefLabelLaag2 ?objectScopeNote | ||
ORDER BY DESC(?aantalNarrowerScopeNote) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#+ name: missingscopenote02 | ||
#+ endpoint: https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/Cultuurhistorische-Thesaurus-CHT/sparql | ||
|
||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
SELECT DISTINCT | ||
?prefLabelLaag2 | ||
?prefLabelLaag3 | ||
?mistEigenScopeNote | ||
(COALESCE(?aantalNarrowerScopeNote, 0) AS ?aantalNarrowerZonderScopeNote) | ||
(IF(COALESCE(?aantalNarrowerScopeNote, 0) > 0, "ja ->", "") AS ?uitklappen) | ||
WHERE { | ||
{ | ||
SELECT DISTINCT | ||
?prefLabelLaag2 | ||
?prefLabelLaag3 | ||
(IF(BOUND(?object1ScopeNote), "nee"@nl, "ja, mist scopeNote"@nl) AS ?mistEigenScopeNote) | ||
(COUNT(DISTINCT ?narrowerTermNoScope) AS ?aantalNarrowerScopeNote) | ||
WHERE { | ||
SERVICE <https://digitaalerfgoed.poolparty.biz/PoolParty/sparql/term/id/cht> { | ||
# Triple path to reach Layer 2 and Layer 3: | ||
<https://data.cultureelerfgoed.nl/term/id/cht/bece25a6-eb64-46e8-85a8-2a7991f02a2c> | ||
skos:narrower ?object . | ||
?object skos:prefLabel ?prefLabelLaag2 . | ||
FILTER(LANG(?prefLabelLaag2) = "nl") | ||
|
||
?object skos:narrower ?object1 . | ||
?object1 skos:prefLabel ?prefLabelLaag3 . | ||
FILTER(LANG(?prefLabelLaag3) = "nl") | ||
|
||
# Optional scopeNote on the Layer 3 term: | ||
OPTIONAL { | ||
?object1 skos:scopeNote ?object1ScopeNote . | ||
FILTER(LANG(?object1ScopeNote) = "nl") | ||
} | ||
|
||
# Use skos:narrower+ to get all descendant terms of ?object1 and only bind those without a Dutch scopeNote: | ||
OPTIONAL { | ||
?object1 skos:narrower+ ?narrowerTerm . | ||
FILTER NOT EXISTS { | ||
?narrowerTerm skos:scopeNote ?narrowerTermScopeNote . | ||
FILTER(LANG(?narrowerTermScopeNote) = "nl") | ||
} | ||
BIND(?narrowerTerm AS ?narrowerTermNoScope) | ||
} | ||
} | ||
} | ||
GROUP BY ?prefLabelLaag2 ?prefLabelLaag3 ?object1ScopeNote | ||
ORDER BY DESC(?aantalNarrowerScopeNote) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#+ name: missingscopenote03 | ||
#+ endpoint: https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/Cultuurhistorische-Thesaurus-CHT/sparql | ||
|
||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
SELECT DISTINCT | ||
?prefLabelLaag3 | ||
?prefLabelLaag4 | ||
?mistEigenScopeNote | ||
(COALESCE(?aantalNarrowerScopeNote, 0) AS ?aantalNarrowerZonderScopeNote) | ||
(IF(COALESCE(?aantalNarrowerScopeNote, 0) > 0, "ja ->", "") AS ?uitklappen) | ||
WHERE { | ||
{ | ||
SELECT DISTINCT | ||
?prefLabelLaag3 | ||
?prefLabelLaag4 | ||
(IF(BOUND(?object2ScopeNote), "nee"@nl, "ja, mist scopeNote"@nl) AS ?mistEigenScopeNote) | ||
(COUNT(DISTINCT ?narrowerTermNoScope) AS ?aantalNarrowerScopeNote) | ||
WHERE { | ||
SERVICE <https://digitaalerfgoed.poolparty.biz/PoolParty/sparql/term/id/cht> { | ||
# Triple path to reach Layer 3 and Layer 4 concepts: | ||
<https://data.cultureelerfgoed.nl/term/id/cht/bece25a6-eb64-46e8-85a8-2a7991f02a2c> | ||
skos:narrower/skos:narrower ?object1 . | ||
|
||
?object1 skos:prefLabel ?prefLabelLaag3 . | ||
FILTER(LANG(?prefLabelLaag3) = "nl") | ||
|
||
?object1 skos:narrower ?object2 . | ||
|
||
?object2 skos:prefLabel ?prefLabelLaag4 . | ||
FILTER(LANG(?prefLabelLaag4) = "nl") | ||
|
||
# Optional scopeNote at Layer 4: | ||
OPTIONAL { | ||
?object2 skos:scopeNote ?object2ScopeNote . | ||
FILTER(LANG(?object2ScopeNote) = "nl") | ||
} | ||
|
||
# Retrieve all descendant terms of ?object2 (using skos:narrower+) | ||
# that do NOT have a Dutch scopeNote: | ||
OPTIONAL { | ||
?object2 skos:narrower+ ?narrowerTerm . | ||
FILTER NOT EXISTS { | ||
?narrowerTerm skos:scopeNote ?narrowerTermScopeNote . | ||
FILTER(LANG(?narrowerTermScopeNote) = "nl") | ||
} | ||
BIND(?narrowerTerm AS ?narrowerTermNoScope) | ||
} | ||
} | ||
} | ||
GROUP BY ?prefLabelLaag3 ?prefLabelLaag4 ?object2ScopeNote | ||
ORDER BY DESC(?aantalNarrowerScopeNote) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#+ name: missingscopenote04 | ||
#+ endpoint: https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/Cultuurhistorische-Thesaurus-CHT/sparql | ||
|
||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
SELECT DISTINCT | ||
?prefLabelLaag4 | ||
?prefLabelLaag5 | ||
?mistEigenScopeNote | ||
(COALESCE(?aantalNarrowerScopeNote, 0) AS ?aantalNarrowerZonderScopeNote) # 0 if no results | ||
(IF(COALESCE(?aantalNarrowerScopeNote, 0) > 0, "ja ->", "") AS ?uitklappen) | ||
WHERE { | ||
{ | ||
SELECT DISTINCT | ||
?prefLabelLaag4 | ||
?prefLabelLaag5 | ||
(IF(BOUND(?object3ScopeNote), "nee"@nl, "ja, mist scopeNote"@nl) AS ?mistEigenScopeNote) | ||
(COUNT(DISTINCT ?narrowerTermNoScope) AS ?aantalNarrowerScopeNote) | ||
WHERE { | ||
SERVICE <https://digitaalerfgoed.poolparty.biz/PoolParty/sparql/term/id/cht> { | ||
# Triple path to reach the Layer 4 concept: | ||
<https://data.cultureelerfgoed.nl/term/id/cht/bece25a6-eb64-46e8-85a8-2a7991f02a2c> | ||
skos:narrower/skos:narrower/skos:narrower ?object2 . | ||
|
||
?object2 skos:prefLabel ?prefLabelLaag4 . | ||
FILTER(LANG(?prefLabelLaag4) = "nl") | ||
|
||
# Get the Layer 5 term: | ||
?object2 skos:narrower ?object3 . | ||
?object3 skos:prefLabel ?prefLabelLaag5 . | ||
FILTER(LANG(?prefLabelLaag5) = "nl") | ||
|
||
# Optionally get the scopeNote at Layer 5: | ||
OPTIONAL { | ||
?object3 skos:scopeNote ?object3ScopeNote . | ||
FILTER(LANG(?object3ScopeNote) = "nl") | ||
} | ||
|
||
# Retrieve all descendant terms (using skos:narrower+) of ?object3 that do NOT have a Dutch scopeNote: | ||
OPTIONAL { | ||
?object3 skos:narrower+ ?narrowerTerm . | ||
FILTER NOT EXISTS { | ||
?narrowerTerm skos:scopeNote ?anyScopeNote . | ||
FILTER(LANG(?anyScopeNote) = "nl") | ||
} | ||
BIND(?narrowerTerm AS ?narrowerTermNoScope) | ||
} | ||
} | ||
} | ||
GROUP BY | ||
?prefLabelLaag4 | ||
?prefLabelLaag5 | ||
?object3ScopeNote | ||
ORDER BY DESC(?aantalNarrowerScopeNote) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#+ name: missingscopenote05 | ||
#+ endpoint: https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/Cultuurhistorische-Thesaurus-CHT/sparql | ||
|
||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
SELECT DISTINCT | ||
?prefLabelLaag5 | ||
?prefLabelLaag6 | ||
?mistEigenScopeNote | ||
(COALESCE(?aantalNarrowerScopeNote, 0) AS ?aantalNarrowerZonderScopeNote) | ||
(IF(COALESCE(?aantalNarrowerScopeNote, 0) > 0, "ja ->", "") AS ?uitklappen) | ||
WHERE { | ||
{ | ||
SELECT DISTINCT | ||
?prefLabelLaag5 | ||
?prefLabelLaag6 | ||
(IF(BOUND(?object4ScopeNote), "nee"@nl, "ja, mist scopeNote"@nl) AS ?mistEigenScopeNote) | ||
(COUNT(DISTINCT ?narrowerTermNoScope) AS ?aantalNarrowerScopeNote) | ||
WHERE { | ||
SERVICE <https://digitaalerfgoed.poolparty.biz/PoolParty/sparql/term/id/cht> { | ||
# Triple path to reach the Layer 6 concept: | ||
<https://data.cultureelerfgoed.nl/term/id/cht/bece25a6-eb64-46e8-85a8-2a7991f02a2c> | ||
skos:narrower/skos:narrower/skos:narrower/skos:narrower ?object3 . | ||
|
||
?object3 skos:prefLabel ?prefLabelLaag5 . | ||
FILTER(LANG(?prefLabelLaag5) = "nl") | ||
|
||
?object3 skos:narrower ?object4 . | ||
|
||
?object4 skos:prefLabel ?prefLabelLaag6 . | ||
FILTER(LANG(?prefLabelLaag6) = "nl") | ||
|
||
# Optional: Get the scopeNote for the Layer 6 term: | ||
OPTIONAL { | ||
?object4 skos:scopeNote ?object4ScopeNote . | ||
FILTER(LANG(?object4ScopeNote) = "nl") | ||
} | ||
|
||
# Retrieve all descendant terms of ?object4 (using skos:narrower+) | ||
# that do NOT have a Dutch scopeNote: | ||
OPTIONAL { | ||
?object4 skos:narrower+ ?narrowerTerm . | ||
FILTER NOT EXISTS { | ||
?narrowerTerm skos:scopeNote ?narrowerTermScopeNote . | ||
FILTER(LANG(?narrowerTermScopeNote) = "nl") | ||
} | ||
BIND(?narrowerTerm AS ?narrowerTermNoScope) | ||
} | ||
} | ||
} | ||
GROUP BY ?prefLabelLaag5 ?prefLabelLaag6 ?object4ScopeNote | ||
ORDER BY DESC(?aantalNarrowerScopeNote) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#+ name: missingscopenote06 | ||
#+ endpoint: https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/Cultuurhistorische-Thesaurus-CHT/sparql | ||
|
||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
SELECT DISTINCT | ||
?prefLabelLaag6 | ||
?prefLabelLaag7 | ||
?mistEigenScopeNote | ||
(COALESCE(?aantalNarrowerScopeNote, 0) AS ?aantalNarrowerZonderScopeNote) | ||
(IF(COALESCE(?aantalNarrowerScopeNote, 0) > 0, "ja ->", "") AS ?uitklappen) | ||
WHERE { | ||
{ | ||
SELECT DISTINCT | ||
?prefLabelLaag6 | ||
?prefLabelLaag7 | ||
(IF(BOUND(?object5ScopeNote), "nee"@nl, "ja, mist scopeNote"@nl) AS ?mistEigenScopeNote) | ||
(COUNT(DISTINCT ?narrowerTermNoScope) AS ?aantalNarrowerScopeNote) | ||
WHERE { | ||
SERVICE <https://digitaalerfgoed.poolparty.biz/PoolParty/sparql/term/id/cht> { | ||
# Triple path to reach the Layer 6 concept: | ||
<https://data.cultureelerfgoed.nl/term/id/cht/bece25a6-eb64-46e8-85a8-2a7991f02a2c> | ||
skos:narrower/skos:narrower/skos:narrower/skos:narrower/skos:narrower ?object4 . | ||
|
||
?object4 skos:prefLabel ?prefLabelLaag6 . | ||
FILTER(LANG(?prefLabelLaag6) = "nl") | ||
|
||
?object4 skos:narrower ?object5 . | ||
|
||
?object5 skos:prefLabel ?prefLabelLaag7 . | ||
FILTER(LANG(?prefLabelLaag7) = "nl") | ||
|
||
# Optional: Get the scopeNote for the Layer 6 term: | ||
OPTIONAL { | ||
?object5 skos:scopeNote ?object5ScopeNote . | ||
FILTER(LANG(?object5ScopeNote) = "nl") | ||
} | ||
|
||
# Retrieve all descendant terms of ?object4 (using skos:narrower+) | ||
# that do NOT have a Dutch scopeNote: | ||
OPTIONAL { | ||
?object5 skos:narrower+ ?narrowerTerm . | ||
FILTER NOT EXISTS { | ||
?narrowerTerm skos:scopeNote ?narrowerTermScopeNote . | ||
FILTER(LANG(?narrowerTermScopeNote) = "nl") | ||
} | ||
BIND(?narrowerTerm AS ?narrowerTermNoScope) | ||
} | ||
} | ||
} | ||
GROUP BY ?prefLabelLaag6 ?prefLabelLaag7 ?object5ScopeNote | ||
ORDER BY DESC(?aantalNarrowerScopeNote) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#+ name: missingscopenote07 | ||
#+ endpoint: https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/Cultuurhistorische-Thesaurus-CHT/sparql | ||
|
||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
SELECT DISTINCT | ||
?prefLabelLaag7 | ||
?prefLabelLaag8 | ||
?mistEigenScopeNote | ||
(COALESCE(?aantalNarrowerScopeNote, 0) AS ?aantalNarrowerZonderScopeNote) | ||
(IF(COALESCE(?aantalNarrowerScopeNote, 0) > 0, "ja ->", "") AS ?uitklappen) | ||
WHERE { | ||
{ | ||
SELECT DISTINCT | ||
?prefLabelLaag7 | ||
?prefLabelLaag8 | ||
(IF(BOUND(?object6ScopeNote), "nee"@nl, "ja, mist scopeNote"@nl) AS ?mistEigenScopeNote) | ||
(COUNT(DISTINCT ?narrowerTermNoScope) AS ?aantalNarrowerScopeNote) | ||
WHERE { | ||
SERVICE <https://digitaalerfgoed.poolparty.biz/PoolParty/sparql/term/id/cht> { | ||
# Triple path to reach the Layer 6 concept: | ||
<https://data.cultureelerfgoed.nl/term/id/cht/bece25a6-eb64-46e8-85a8-2a7991f02a2c> | ||
skos:narrower/skos:narrower/skos:narrower/skos:narrower/skos:narrower/skos:narrower ?object5 . | ||
|
||
?object5 skos:prefLabel ?prefLabelLaag7 . | ||
FILTER(LANG(?prefLabelLaag7) = "nl") | ||
|
||
?object5 skos:narrower ?object6 . | ||
|
||
?object6 skos:prefLabel ?prefLabelLaag8 . | ||
FILTER(LANG(?prefLabelLaag8) = "nl") | ||
|
||
# Optional: Get the scopeNote for the Layer 6 term: | ||
OPTIONAL { | ||
?object6 skos:scopeNote ?object6ScopeNote . | ||
FILTER(LANG(?object6ScopeNote) = "nl") | ||
} | ||
|
||
# Retrieve all descendant terms of ?object4 (using skos:narrower+) | ||
# that do NOT have a Dutch scopeNote: | ||
OPTIONAL { | ||
?object6 skos:narrower+ ?narrowerTerm . | ||
FILTER NOT EXISTS { | ||
?narrowerTerm skos:scopeNote ?narrowerTermScopeNote . | ||
FILTER(LANG(?narrowerTermScopeNote) = "nl") | ||
} | ||
BIND(?narrowerTerm AS ?narrowerTermNoScope) | ||
} | ||
} | ||
} | ||
GROUP BY ?prefLabelLaag7 ?prefLabelLaag8 ?object6ScopeNote | ||
ORDER BY DESC(?aantalNarrowerScopeNote) | ||
} | ||
} |
Oops, something went wrong.