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

Winner country code in case of multiple winners

Rule Definition

In each lot where more than one winner country code is informed, the winner country code used for analysis is the first winner country code informed in each lot.


Additional Information

Rule elaboration

For the simplification of the Contractor Country Code, the following steps must be performed:

  • A lot award can be related to one or several epo:Winner, so for simplification purposes, only the first one is selected.
  • A SPARQL query will be used to retrieve the Winner Country Code entities related to each epo:Lot associated with the epo:Notice, following the path:

epo:Notice -> epo:announcesLotAwardOutcome (epo:LotAwardOutcome) -> epo:comprisesTenderAwardOutcome (epo:TenderAwardOutcome) -> epo:indicatesAwardOfLotToWinner (epo:Winner)-> epo:playedBy (org:Organization) -> epo:registeredAddress (locn:Address) -> epo:hasCountryCode .

  • A construct query will be used to link the epo:Notice with the simplified Winner Country.

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:

sh:NodeShape ;\
    rdfs:label ""@en ;\
    rdfs:comment ""@en ;\
     sh:targetClass epo:Lot ;\
    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:fromWinnerCountry ?countryWinner.\
\
        }\
        WHERE {\
            $this a epo:Lot .\
            {\
                SELECT ?countryWinner\
                WHERE {\
                    $this a epo:Lot .\
                    ?lotAward epo:describesLot ?lot .\
                    ?lotAward epo:comprisesTenderAwardOutcome ?tender .\
                    ?tender epo:indicatesAwardOfLotToWinner ?winner .\
                    ?winner epo:playedBy/epo:registeredAddress/epo:hasCountryCode ?countryWinner .\
                } 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

Related rules

#20

#49

Related generic rule

#138

History note

(If applicable, add here a note about a previous state of the rule, before the Rulebook)

Edited by Enrique Jose Barcala Soto