Procedure has Buyer Country Code
Rule Definition
In each procedure where the buyer country code is not provided or it is not valid, it is inferred from the buyer information.
Additional Information
Rule elaboration
For the simplification of the Buyer, the following steps must be performed:
- A Notice can be related to one or several epo:Buyers, so for simplification purposes, only the first one is selected.
- Use a SPARQL query to retrieve the epo:Buyer Organization Country related to the notice through the path: (epo:Notice) -> [announcesRole = epo:Buyer] -> epo:playedBy (org:Organization) -> epo:registeredAddress (locn:Address) -> epo:hasCountryCode .
Rule source
(Provide URL to legal source, if applicable)
Rule implementation
(Provide only URIs of formal encodings of the rules for execution. These are typically URIs of SHACL rules or RML maps. Each URI should be provided on a new line with no additional information)
Implementation note
Implementation in PPDS SHACL shapes graph:
ppsh:fromBuyerCountry
a sh:NodeShape ;
sh:targetClass epo:Procedure ;
sh:rule [
a sh:SPARQLRule ;
sh:prefixes epo: , epo-ppds-ap: ;
sh:construct """"""
PREFIX epo: <http://data.europa.eu/a4g/ontology#>
PREFIX epo-ppds-ap: <http://data.europa.eu/gx2/epo-ppds-ap#>
PREFIX org: <http://www.w3.org/ns/org#>
CONSTRUCT {
$this epo-ppds-ap:fromBuyerCountry ?countryCode .
}
WHERE {
$this epo-ppds-ap:fromBuyer ?buyer
?buyer a epo:Buyer .
?buyer epo:playedBy ?org .
?org a org:Organization .
?org epo:registeredAddress/epo:hasCountryCode ?countryCode .
}
"""""" ;
] ."
Related rules
Related generic rule
(If the rule is a specialisation of a generic rule registered in this Rulebook, include here URL of that generic rule)
History note
(If applicable, add here a note about a previous state of the rule, before the Rulebook)