Country code is valid
Rule Definition
Country code is a value from NAL "Countries and territories".
Additional Information
Rule elaboration
Validity Business Rule with ID VAL004 as defined in deliverable D06.06 – Data Quality Action Plan.
Ontology property involved: http://data.europa.eu/a4g/ontology#hasCountryCode
Link to the NAL: https://op.europa.eu/en/web/eu-vocabularies/concept-scheme/-/resource?uri=http://publications.europa.eu/resource/authority/country
NAL stands for "Name authority list".
Rule source
Rule implementation
ppsh:Address-hasCountryCode-values
Implementation note
Implementation in the SHACL shapes graph:
ppsh:Address-hasCountryCode-values a sh:SPARQLConstraint ;
sh:description "The provided country code must be listed in the applicable controlled list." ;
sh:severity sh:Warning ;
sh:message "VAL004" ;
sh:name "Country code is valid" ;
sh:targetClass dct:Location ;
sh:select """
PREFIX epo: <http://data.europa.eu/a4g/ontology#>
SELECT $this (epo:hasCountryCode AS ?path) (?countryCode AS ?value) WHERE {
$this a dct:Location .
$this epo:hasCountryCode ?countryCode .
?countryCode skos:inScheme <http://publications.europa.eu/resource/authority/country> .
}
Related rules
Related generic rule
(If the rule is a specialisation of a generic rule registered in this Rulebook, the URL of that generic rule is provided here)
History note
(If applicable, add here a note about a previous state of the rule, before the Rulebook)