-
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.
Replace poolparty.rq with ied.rq to exclude technical lists from search and lookup Co-authored-by: RubenSchalk <[email protected]>
- Loading branch information
1 parent
6a6904d
commit 494881b
Showing
3 changed files
with
114 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
58 changes: 58 additions & 0 deletions
58
packages/network-of-terms-catalog/catalog/queries/lookup/ied.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,58 @@ | ||
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:exactMatch ?exactMatch_uri . | ||
?broader_uri skos:prefLabel ?broader_prefLabel . | ||
?narrower_uri skos:prefLabel ?narrower_prefLabel . | ||
} | ||
WHERE { | ||
# For example: | ||
# Concept: <https://data.indischherinneringscentrum.nl/ied/110950> | ||
# Event: <https://data.indischherinneringscentrum.nl/ied/110991> | ||
# Organization: <https://data.indischherinneringscentrum.nl/ied/103996> | ||
VALUES ?uri { ?uris } | ||
|
||
?uri a skos:Concept . | ||
|
||
# Exclude terms from the 'Technische Lijsten', a concept scheme with terms that should only be used by NOB | ||
FILTER NOT EXISTS { | ||
?uri skos:inScheme <https://data.indischherinneringscentrum.nl/ied/100616> | ||
} | ||
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:exactMatch ?exactMatch_uri . # Has no labels. | ||
} | ||
} | ||
LIMIT 1000 |
54 changes: 54 additions & 0 deletions
54
packages/network-of-terms-catalog/catalog/queries/search/ied.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,54 @@ | ||
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:exactMatch ?exactMatch_uri . | ||
?broader_uri skos:prefLabel ?broader_prefLabel . | ||
?narrower_uri skos:prefLabel ?narrower_prefLabel . | ||
} | ||
WHERE { | ||
?uri ?predicate ?label . | ||
# Exclude terms from the 'Technische Lijsten', a concept scheme with terms that should only be used by NOB | ||
FILTER NOT EXISTS { | ||
?uri skos:inScheme <https://data.indischherinneringscentrum.nl/ied/100616> | ||
} | ||
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:scopeNote ?scopeNote . | ||
FILTER(LANG(?scopeNote) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:altLabel ?altLabel . | ||
FILTER(LANG(?altLabel) = "nl") | ||
} | ||
OPTIONAL { | ||
?uri skos:hiddenLabel ?hiddenLabel . | ||
FILTER(LANG(?hiddenLabel) = "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:exactMatch ?exactMatch_uri . # Has no labels. | ||
} | ||
} | ||
LIMIT 1000 |