-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Exclude RCE referentienetwerk matches from CHT (#1243)
- Loading branch information
Showing
5 changed files
with
133 additions
and
2 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
66 changes: 66 additions & 0 deletions
66
packages/network-of-terms-catalog/catalog/queries/lookup/cht.rq
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,66 @@ | ||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
CONSTRUCT { | ||
?uri a skos:Concept ; | ||
skos:prefLabel ?prefLabel ; | ||
skos:altLabel ?altLabel ; | ||
skos:hiddenLabel ?hiddenLabel ; | ||
skos:scopeNote ?scopeNote ; | ||
skos:broader ?broader_uri ; | ||
skos:narrower ?narrower_uri ; | ||
skos:related ?related_uri ; | ||
skos:exactMatch ?exactMatch_uri . | ||
?broader_uri skos:prefLabel ?broader_prefLabel . | ||
?narrower_uri skos:prefLabel ?narrower_prefLabel . | ||
?related_uri skos:prefLabel ?related_prefLabel . | ||
?exactMatch_uri skos:prefLabel ?exactMatch_prefLabel . | ||
} | ||
WHERE { | ||
# For example: | ||
# Aardewerk: <https://data.cultureelerfgoed.nl/term/id/abr/71e411bf-8645-4420-98a4-b8746574b002> | ||
# Aardewerk: <https://data.cultureelerfgoed.nl/term/id/cht/dfbf8107-09f9-49c9-8118-8e79b7613723> | ||
VALUES ?uri { ?uris } | ||
|
||
?uri a skos:Concept . | ||
|
||
OPTIONAL { | ||
?uri skos:prefLabel ?prefLabel . | ||
FILTER(LANG(?prefLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:altLabel ?altLabel . | ||
FILTER(LANG(?altLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:hiddenLabel ?hiddenLabel . | ||
FILTER(LANG(?hiddenLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:scopeNote ?scopeNote . | ||
FILTER(LANG(?scopeNote) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:broader ?broader_uri . | ||
?broader_uri skos:prefLabel ?broader_prefLabel . | ||
FILTER(LANG(?broader_prefLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:narrower ?narrower_uri . | ||
?narrower_uri skos:prefLabel ?narrower_prefLabel . | ||
FILTER(LANG(?narrower_prefLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:related ?related_uri . | ||
?related_uri skos:prefLabel ?related_prefLabel . | ||
FILTER(LANG(?related_prefLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:exactMatch ?exactMatch_uri . | ||
FILTER(!STRSTARTS(STR(?exactMatch_uri), "https://data.cultureelerfgoed.nl/term/id/rn")) | ||
OPTIONAL { | ||
?exactMatch_uri skos:prefLabel ?exactMatch_prefLabel . | ||
FILTER(LANG(?exactMatch_prefLabel) = "nl") | ||
} | ||
} | ||
} | ||
LIMIT 1000 |
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
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
63 changes: 63 additions & 0 deletions
63
packages/network-of-terms-catalog/catalog/queries/search/cht.rq
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,63 @@ | ||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
CONSTRUCT { | ||
?uri a skos:Concept ; | ||
skos:prefLabel ?prefLabel ; | ||
skos:altLabel ?altLabel ; | ||
skos:hiddenLabel ?hiddenLabel ; | ||
skos:scopeNote ?scopeNote ; | ||
skos:broader ?broader_uri ; | ||
skos:narrower ?narrower_uri ; | ||
skos:related ?related_uri ; | ||
skos:exactMatch ?exactMatch_uri . | ||
?broader_uri skos:prefLabel ?broader_prefLabel . | ||
?narrower_uri skos:prefLabel ?narrower_prefLabel . | ||
?related_uri skos:prefLabel ?related_prefLabel . | ||
?exactMatch_uri skos:prefLabel ?exactMatch_prefLabel . | ||
} | ||
WHERE { | ||
?uri ?predicate ?label . | ||
VALUES ?predicate { skos:prefLabel skos:altLabel } | ||
FILTER(LANG(?label) = "nl") | ||
FILTER(CONTAINS(LCASE(?label), LCASE(?query))) | ||
OPTIONAL { | ||
?uri skos:prefLabel ?prefLabel . | ||
FILTER(LANG(?prefLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:altLabel ?altLabel . | ||
FILTER(LANG(?altLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:hiddenLabel ?hiddenLabel . | ||
FILTER(LANG(?hiddenLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:scopeNote ?scopeNote . | ||
FILTER(LANG(?scopeNote) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:broader ?broader_uri . | ||
?broader_uri skos:prefLabel ?broader_prefLabel . | ||
FILTER(LANG(?broader_prefLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:narrower ?narrower_uri . | ||
?narrower_uri skos:prefLabel ?narrower_prefLabel . | ||
FILTER(LANG(?narrower_prefLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:related ?related_uri . | ||
?related_uri skos:prefLabel ?related_prefLabel . | ||
FILTER(LANG(?related_prefLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:exactMatch ?exactMatch_uri . | ||
FILTER(!STRSTARTS(STR(?exactMatch_uri), "https://data.cultureelerfgoed.nl/term/id/rn")) | ||
OPTIONAL { | ||
?exactMatch_uri skos:prefLabel ?exactMatch_prefLabel . | ||
FILTER(LANG(?exactMatch_prefLabel) = "nl") | ||
} | ||
} | ||
} | ||
LIMIT 1000 |