Skip to content

Commit 2816d7d

Browse files
valexandeschivmeister
authored andcommitted
feat: reverting changes for MonetaryValue
1 parent 38a2245 commit 2816d7d

2 files changed

Lines changed: 227 additions & 221 deletions

File tree

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,7 @@ tedm:MG-MonetaryValue-hasTotalAwardedValue-NoticeAwardInformation_ND-ResultNotic
282282
rr:subjectMap
283283
[
284284
rdfs:label "ND-NoticeResult" ;
285-
# Avoid type-only epo:MonetaryValue:
286-
# Only instantiate when at least one mapped value will exist (amount and/or currency).
287-
rml:reference "if (exists(cbc:TotalAmount) and (not(exists(efac:FieldsPrivacy[efbc:FieldIdentifierCode/text()='not-val']) and cbc:TotalAmount/text() = '-1') or (exists(cbc:TotalAmount/@currencyID) and cbc:TotalAmount/@currencyID != 'unpublished'))) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/MonetaryValueNoticeAwardInformation$' || replace(replace(replace(path(), 'Q\\{[^}]+\\}', ''), '\\[([0-9]+)\\]', '$1'), '/', '_') else null" ;
285+
rml:reference "if (exists(cbc:TotalAmount)) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/MonetaryValueNoticeAwardInformation$' || replace(replace(replace(path(), 'Q\\{[^}]+\\}', ''), '\\[([0-9]+)\\]', '$1'), '/', '_') else null" ;
288286
rr:class epo:MonetaryValue
289287
] ;
290288
rr:predicateObjectMap
@@ -326,9 +324,7 @@ tedm:MG-NoticeAwardInformation_ND-NoticeResult a rr:TriplesMap ;
326324
rr:subjectMap
327325
[
328326
rdfs:label "ND-NoticeResult" ;
329-
# Avoid type-only epo:NoticeAwardInformation:
330-
# Only instantiate when at least one of the monetary values it links to will be created.
331-
rml:reference "if ((exists(cbc:TotalAmount) and (not(exists(efac:FieldsPrivacy[efbc:FieldIdentifierCode/text()='not-val']) and cbc:TotalAmount/text() = '-1') or (exists(cbc:TotalAmount/@currencyID) and cbc:TotalAmount/@currencyID != 'unpublished'))) or (exists(efbc:OverallMaximumFrameworkContractsAmount) and (not(exists(efac:FieldsPrivacy[efbc:FieldIdentifierCode/text()='not-max-val']) and efbc:OverallMaximumFrameworkContractsAmount/text() = '-1') or (exists(efbc:OverallMaximumFrameworkContractsAmount/@currencyID) and efbc:OverallMaximumFrameworkContractsAmount/@currencyID != 'unpublished'))) or (exists(efbc:OverallApproximateFrameworkContractsAmount) and (not(exists(efac:FieldsPrivacy[efbc:FieldIdentifierCode/text()='not-app-val']) and efbc:OverallApproximateFrameworkContractsAmount/text() = '-1') or (exists(efbc:OverallApproximateFrameworkContractsAmount/@currencyID) and efbc:OverallApproximateFrameworkContractsAmount/@currencyID != 'unpublished')))) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/NoticeAwardInformation$' || replace(replace(replace(path(), 'Q\\{[^}]+\\}', ''), '\\[([0-9]+)\\]', '$1'), '/', '_') else null" ;
327+
rml:reference "if(exists(cbc:TotalAmount) or exists(efbc:OverallMaximumFrameworkContractsAmount) or exists(efbc:OverallApproximateFrameworkContractsAmount)) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/NoticeAwardInformation$' || replace(replace(replace(path(), 'Q\\{[^}]+\\}', ''), '\\[([0-9]+)\\]', '$1'), '/', '_') else null" ;
332328
rr:class epo:NoticeAwardInformation
333329
] ;
334330
rr:predicateObjectMap
@@ -386,9 +382,7 @@ tedm:MG-MonetaryValue-hasMaximumFrameworkAgreementAwardedValue-NoticeAwardInform
386382
rr:subjectMap
387383
[
388384
rdfs:label "ND-NoticeResult" ;
389-
# Avoid type-only epo:MonetaryValue:
390-
# Only instantiate when at least one mapped value will exist (amount and/or currency).
391-
rml:reference "if (exists(efbc:OverallMaximumFrameworkContractsAmount) and (not(exists(efac:FieldsPrivacy[efbc:FieldIdentifierCode/text()='not-max-val']) and efbc:OverallMaximumFrameworkContractsAmount/text() = '-1') or (exists(efbc:OverallMaximumFrameworkContractsAmount/@currencyID) and efbc:OverallMaximumFrameworkContractsAmount/@currencyID != 'unpublished'))) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/MaximumFrameworkAgreementAwardedMonetaryValueLot$' || replace(replace(replace(path(), 'Q\\{[^}]+\\}', ''), '\\[([0-9]+)\\]', '$1'), '/', '_') else null" ;
385+
rml:reference "if (exists(efbc:OverallMaximumFrameworkContractsAmount)) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/MaximumFrameworkAgreementAwardedMonetaryValueLot$' || replace(replace(replace(path(), 'Q\\{[^}]+\\}', ''), '\\[([0-9]+)\\]', '$1'), '/', '_') else null" ;
392386
rr:class epo:MonetaryValue
393387
] ;
394388
rr:predicateObjectMap
@@ -430,9 +424,7 @@ tedm:MG-MonetaryValue-hasApproximateFrameworkAgreementValue-NoticeAwardInformati
430424
rr:subjectMap
431425
[
432426
rdfs:label "ND-NoticeResult" ;
433-
# Avoid type-only epo:MonetaryValue:
434-
# Only instantiate when at least one mapped value will exist (amount and/or currency).
435-
rml:reference "if (exists(efbc:OverallApproximateFrameworkContractsAmount) and (not(exists(efac:FieldsPrivacy[efbc:FieldIdentifierCode/text()='not-app-val']) and efbc:OverallApproximateFrameworkContractsAmount/text() = '-1') or (exists(efbc:OverallApproximateFrameworkContractsAmount/@currencyID) and efbc:OverallApproximateFrameworkContractsAmount/@currencyID != 'unpublished'))) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/ApproximateFrameworkAgreementMonetaryValueLot$' || replace(replace(replace(path(), 'Q\\{[^}]+\\}', ''), '\\[([0-9]+)\\]', '$1'), '/', '_') else null" ;
427+
rml:reference "if (exists(efbc:OverallApproximateFrameworkContractsAmount)) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/ApproximateFrameworkAgreementMonetaryValueLot$' || replace(replace(replace(path(), 'Q\\{[^}]+\\}', ''), '\\[([0-9]+)\\]', '$1'), '/', '_') else null" ;
436428
rr:class epo:MonetaryValue
437429
] ;
438430
rr:predicateObjectMap

0 commit comments

Comments
 (0)