Buyer name in case of multiple buyers
Rule Definition
For analasys, the Buyer name is the name of the lead Buyer (when there is a lead) or the name of the first Buyer informed in the notice (when there is not a lead).
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 Name related to the notice through the path: (epo:Notice) -> [announcesRole = epo:Buyer] -> epo:playedBy (org:Organization) -> epo:hasLegalName .
- A construct query is used to add the triple that links the epo:Notice with this Buyer Name.
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:fromBuyerName\
a sh:NodeShape ;\
rdfs:label ""@en ;\
rdfs:comment ""@en ;\
sh:targetClass epo:Notice ;\
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:fromBuyerName ?buyerName .\
}\
WHERE\
{\
$this a epo:Notice .\
$this epo:announcesRole ?anyRole .\
?anyRole a epo:Buyer .\
?anyRole epo:playedBy ?org .\
?org a org:Organization .\
{\
SELECT ?buyerName\
WHERE {\
$this epo:announcesRole ?anyRole .\
?anyRole a epo:Buyer .\
?anyRole epo:playedBy ?anyOrg .\
?anyOrg a org:Organization .\
?anyOrg epo:hasLegalName ?buyerName .\
}\
Limit 1\
}\
}
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)