Skip to content

Commit a502aa8

Browse files
valexandeschivmeister
authored andcommitted
fix: put back the old condition in contract
If the data does not have much information in the contract, then we still produce an empty contract, in which case the runt/dangling entity is fine to have.
1 parent 50351fe commit a502aa8

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ tedm:MG-Contract_ND-SettledContract a rr:TriplesMap ;
7070
rr:subjectMap
7171
[
7272
rdfs:label "ND-SettledContract" ;
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:Title) or exists(cbc:URI) or exists(efbc:ContractFrameworkIndicator) or exists(efac:Funding) or exists(efac:LotTender) or exists(cac:SignatoryParty))) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/Contract/' || cbc:ID else null" ;
73+
# some data apparently do not have ContractReference -- we can guard against that to avoid an empty resource in such cases, but we choose to have that be empty for now
74+
#rml:reference "if (exists(cbc:ID) and (exists(efac:ContractReference/cbc:ID) or exists(cbc:IssueDate) or exists(cbc:Title) or exists(cbc:URI) or exists(efbc:ContractFrameworkIndicator) or exists(efac:Funding) or exists(efac:LotTender) or exists(cac:SignatoryParty))) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/Contract/' || cbc:ID else null" ;
75+
rml:reference "if (exists(cbc:ID)) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/Contract/' || cbc:ID else null" ;
7776
rr:class epo:Contract
7877
] ;
7978
rr:predicateObjectMap

0 commit comments

Comments
 (0)