Code development platform for open source projects from the European Union institutions 🔵 EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content

Buyer in case of multiple buyers with a lead

Rule Definition

For analysis, in case of multiple buyers with a lead, the Buyer is the lead Buyer in the procedure.


Additional Information

Rule elaboration

For the simplification of the Buyer, the following steps must be performed:

  • A procedure can be related to one or several epo:Buyers, so for simplification purposes, only the group lead is selected.
  • Use a SPARQL query to retrieve the epo:Buyer related to the notice through the path: (epo:Procedure) -> [announcesRole = epo:Buyer]
  • A construct query is then used to add the triple that links the epo:Procedure with this Buyer.

Rule source

(Provide URL to legal source, if applicable)

Rule implementation

Implementation in PPDS SHACL shapes graph:

ppsh:fromBuyer\
  a sh:NodeShape ;\
    rdfs:label "Notice is from Buyer"@en ;\
    rdfs:comment "A procedure N is from a buyer B:\
        1. If B is the only buyer, or\
        2. If B is the Group Leader / Lead Buyer, or\
        3. If there are several buyers, none of which is group leader, the first B instance is selected."@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:fromBuyer ?anyRole .\
            }\
            WHERE\
            {\
                $this a epo:Procedure .\
                $this epo:announcesRole ?anyRole .\
                ?anyRole a epo:Buyer .\
                ?anyRole epo:playedBy ?org .\
                ?org a org:Organization .\
                {\
                    SELECT ?anyRole\
                    WHERE {\
                        $this epo:announcesRole ?anyRole .\
                        ?anyRole a epo:Buyer .\
                        ?anyRole epo:playedBy ?anyOrg .\
                        ?anyOrg a org:Organization .\
                    }\
                    Limit 1\
                }\
            }

https://sdlc.webcloud.ec.europa.eu/ppds/docker/ppds-shacl-shapes/-/blob/featured/revision_0.3.3/ppds-shapes.ttl?ref_type=heads

Implementation note

(Provide additional implementation information if needed)

Related rules

#126

#127 (closed)

#128

#129

#130

#132

#133

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)

Edited by Enrique Jose Barcala Soto