Skip to content

Commit 150c9eb

Browse files
valexandeschivmeister
authored andcommitted
feat: commit 2/3 for Contract dangling entities
1 parent 0142686 commit 150c9eb

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/mappings-can/Contract-can.rml.ttl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ tedm:MG-Contract_ND-SettledContract a rr:TriplesMap ;
7070
rr:subjectMap
7171
[
7272
rdfs:label "ND-SettledContract" ;
73-
rr:template "http://data.europa.eu/a4g/resource/{/*/cbc:ID[@schemeName='notice-id']}-{/*/cbc:VersionID}/Contract/{cbc:ID}" ;
73+
# Avoid type-only epo:Contract: only instantiate when at least one mapped value exists.
74+
# Mapped values in this TriplesMap come from: ContractReference, IssueDate, URI, ContractFrameworkIndicator, Funding,
75+
# SettledContractTenderReference, SignatoryParty.
76+
rml:reference "if (exists(cbc:ID) and (exists(efac:ContractReference/cbc:ID) or exists(cbc:IssueDate) or exists(cbc:URI) or exists(efbc:ContractFrameworkIndicator) or exists(efac:Funding) or exists(efac:SettledContractTenderReference) or exists(cac:SignatoryParty))) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/Contract/' || cbc:ID else null" ;
7477
rr:class epo:Contract
7578
] ;
7679
rr:predicateObjectMap
@@ -404,7 +407,8 @@ tedm:MG-Contract_ND-LotResultContractReference a rr:TriplesMap ;
404407
rr:subjectMap
405408
[
406409
rdfs:label "ND-SettledContract" ;
407-
rr:template "http://data.europa.eu/a4g/resource/{/*/cbc:ID[@schemeName='notice-id']}-{/*/cbc:VersionID}/Contract/{cbc:ID}" ;
410+
# Avoid type-only epo:Contract: this TriplesMap only maps epo:hasLotReference, so require a TenderLot ID.
411+
rml:reference "if (exists(cbc:ID) and exists(../efac:TenderLot/cbc:ID)) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/Contract/' || cbc:ID else null" ;
408412
rr:class epo:Contract
409413
] ;
410414
rr:predicateObjectMap

src/output-can.ttl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@
7070
cccev:email "info@monotek.net";
7171
cccev:telephone "0590" .
7272

73-
<http://data.europa.eu/a4g/resource/054f1b7a-d10b-47a2-b427-3ca7ef1e449e-01/Contract/CON-0000>
74-
a epo:Contract .
75-
7673
<http://data.europa.eu/a4g/resource/054f1b7a-d10b-47a2-b427-3ca7ef1e449e-01/ContractLocation$_ContractAwardNotice1_ProcurementProject1_RealizedLocation1_Address1>
7774
a dct:Location;
7875
epo:hasCountryCode <http://publications.europa.eu/resource/authority/country/SVN>;

0 commit comments

Comments
 (0)