Skip to content

Commit d7bfcd4

Browse files
committed
Fix empty ExclusionGround instances in PIN v1.12+
Move ExclusionGround subject TMap into versioned files, as the related fields BT-67(a)-Procedure and BT-67(b)-Procedure have different XPaths. There is now a listName attribute value `exclusion-ground-source` in v1.12+ PIN notices, which is currently undefined in the SDK. Catering for both cases in a base/shared TMap is problematic, as in new notices the `@listName=exclusion-ground-source` is not matched, thereby leading to runt ExclusionGround instances. Add appropriate conditions in both versions to treat the situation consistently. Additionally, remove an unwanted `rml:reference` from the BT-67(a) pOM, and also adjust the label for these fields in v1.12+ according to the SDK.
1 parent d1511cb commit d7bfcd4

File tree

23 files changed

+477
-486
lines changed

23 files changed

+477
-486
lines changed

mappings/package_eforms_sdk1.10_epo4.0/transformation/mappings/Lot.rml.ttl

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3847,48 +3847,6 @@ tedm:MG-ReviewTerm-isSubjectToLotSpecificTerm-Lot_ND-LotReviewTerms a rr:Triples
38473847
] ;
38483848
.
38493849

3850-
# this is an example of an object referred to by multiple top-level subjects (all Lots) at orthogonal XPaths
3851-
tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a rr:TriplesMap ;
3852-
rdfs:label "MG-ExclusionGround";
3853-
rml:logicalSource
3854-
[
3855-
rml:source "data/source.xml" ;
3856-
rml:iterator "/*/cac:TenderingTerms/cac:TendererQualificationRequest/cac:SpecificTendererRequirement";
3857-
rml:referenceFormulation ql:XPath
3858-
] ;
3859-
rr:subjectMap
3860-
[
3861-
rdfs:label "ND-ExclusionGrounds";
3862-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ExclusionGround_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw')}" ;
3863-
rr:class epo:ExclusionGround
3864-
] ;
3865-
# BT-67(a)-Procedure and the lang TMap for (b) below are in versioned files due to different vocabulary resource files (criterion vs. exclusion-ground v1.12+) and changed XPath
3866-
# rr:predicateObjectMap
3867-
# [
3868-
# rdfs:label "BT-67(b)-Procedure";
3869-
# rdfs:comment "Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
3870-
# rr:predicate dct:description;
3871-
# rr:objectMap
3872-
# [
3873-
# rdfs:label "BT-67(b)-Procedure-Language";
3874-
# rdfs:comment "Language of Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
3875-
# rml:reference "cbc:Description";
3876-
# rml:languageMap [
3877-
# fnml:functionValue [
3878-
# rr:predicateObjectMap [
3879-
# rr:predicate idlab-fn:str ;
3880-
# rr:objectMap [ rml:reference "cbc:Description/@languageID" ]
3881-
# ] ,
3882-
# tedm:idlab-fn_executes_lookup ,
3883-
# tedm:idlab-fn_inputFile_language ,
3884-
# tedm:idlab-fn_fromColumn_code ,
3885-
# tedm:idlab-fn_toColumn_code
3886-
# ]
3887-
# ] ;
3888-
# ] ;
3889-
# ] ;
3890-
.
3891-
38923850
tedm:MG-ContractTerm-foreseesContractSpecificTerm-Lot_ND-LotContractAdditionalNature a rr:TriplesMap ;
38933851
rdfs:label "MG-ContractTerm";
38943852
rml:logicalSource

mappings/package_eforms_sdk1.10_epo4.0/transformation/mappings/Lot_v0-1.11.rml.ttl

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,21 @@ tedm:MG-GreenProcurement-fulfillsStrategicProcurement-Lot_ND-StrategicProcuremen
4848
]
4949
.
5050

51+
# this is an example of an object referred to by multiple top-level subjects (all Lots) at orthogonal XPaths
5152
tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a rr:TriplesMap ;
53+
rdfs:label "MG-ExclusionGround" ;
54+
rml:logicalSource
55+
[
56+
rml:source "data/source.xml" ;
57+
rml:iterator "/*/cac:TenderingTerms/cac:TendererQualificationRequest/cac:SpecificTendererRequirement" ;
58+
rml:referenceFormulation ql:XPath
59+
] ;
60+
rr:subjectMap
61+
[
62+
rdfs:label "ND-ExclusionGrounds" ;
63+
rml:reference "if(exists(cbc:Description) or exists(cbc:TendererRequirementTypeCode[@listName='exclusion-ground'])) then 'http://data.europa.eu/a4g/resource/id_' || replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '_ExclusionGround_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw') else null" ;
64+
rr:class epo:ExclusionGround
65+
] ;
5266
rr:predicateObjectMap
5367
[
5468
rdfs:label "BT-67(a)-Procedure" ;
@@ -57,7 +71,6 @@ tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a
5771
rr:objectMap
5872
[
5973
tedm:maxSDKVersion "1.11" ;
60-
rml:reference "cbc:TendererRequirementTypeCode[@listName='exclusion-ground']" ;
6174
rdfs:label "at-voc:criterion" ;
6275
rr:parentTriplesMap tedm:criterion ;
6376
rr:joinCondition [
@@ -66,6 +79,31 @@ tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a
6679
] ;
6780
] ;
6881
] ;
82+
# BT-67(b)-Procedure is in dedicated language TMap
83+
# rr:predicateObjectMap
84+
# [
85+
# rdfs:label "BT-67(b)-Procedure";
86+
# rdfs:comment "Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
87+
# rr:predicate dct:description;
88+
# rr:objectMap
89+
# [
90+
# rdfs:label "BT-67(b)-Procedure-Language";
91+
# rdfs:comment "Language of Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
92+
# rml:reference "cbc:Description";
93+
# rml:languageMap [
94+
# fnml:functionValue [
95+
# rr:predicateObjectMap [
96+
# rr:predicate idlab-fn:str ;
97+
# rr:objectMap [ rml:reference "cbc:Description/@languageID" ]
98+
# ] ,
99+
# tedm:idlab-fn_executes_lookup ,
100+
# tedm:idlab-fn_inputFile_language ,
101+
# tedm:idlab-fn_fromColumn_code ,
102+
# tedm:idlab-fn_toColumn_code
103+
# ]
104+
# ] ;
105+
# ] ;
106+
# ] ;
69107
.
70108

71109
tedm:MG-langString-description-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a rr:TriplesMap ;

mappings/package_eforms_sdk1.11_epo4.0/transformation/mappings/Lot.rml.ttl

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3847,48 +3847,6 @@ tedm:MG-ReviewTerm-isSubjectToLotSpecificTerm-Lot_ND-LotReviewTerms a rr:Triples
38473847
] ;
38483848
.
38493849

3850-
# this is an example of an object referred to by multiple top-level subjects (all Lots) at orthogonal XPaths
3851-
tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a rr:TriplesMap ;
3852-
rdfs:label "MG-ExclusionGround";
3853-
rml:logicalSource
3854-
[
3855-
rml:source "data/source.xml" ;
3856-
rml:iterator "/*/cac:TenderingTerms/cac:TendererQualificationRequest/cac:SpecificTendererRequirement";
3857-
rml:referenceFormulation ql:XPath
3858-
] ;
3859-
rr:subjectMap
3860-
[
3861-
rdfs:label "ND-ExclusionGrounds";
3862-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ExclusionGround_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw')}" ;
3863-
rr:class epo:ExclusionGround
3864-
] ;
3865-
# BT-67(a)-Procedure and the lang TMap for (b) below are in versioned files due to different vocabulary resource files (criterion vs. exclusion-ground v1.12+) and changed XPath
3866-
# rr:predicateObjectMap
3867-
# [
3868-
# rdfs:label "BT-67(b)-Procedure";
3869-
# rdfs:comment "Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
3870-
# rr:predicate dct:description;
3871-
# rr:objectMap
3872-
# [
3873-
# rdfs:label "BT-67(b)-Procedure-Language";
3874-
# rdfs:comment "Language of Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
3875-
# rml:reference "cbc:Description";
3876-
# rml:languageMap [
3877-
# fnml:functionValue [
3878-
# rr:predicateObjectMap [
3879-
# rr:predicate idlab-fn:str ;
3880-
# rr:objectMap [ rml:reference "cbc:Description/@languageID" ]
3881-
# ] ,
3882-
# tedm:idlab-fn_executes_lookup ,
3883-
# tedm:idlab-fn_inputFile_language ,
3884-
# tedm:idlab-fn_fromColumn_code ,
3885-
# tedm:idlab-fn_toColumn_code
3886-
# ]
3887-
# ] ;
3888-
# ] ;
3889-
# ] ;
3890-
.
3891-
38923850
tedm:MG-ContractTerm-foreseesContractSpecificTerm-Lot_ND-LotContractAdditionalNature a rr:TriplesMap ;
38933851
rdfs:label "MG-ContractTerm";
38943852
rml:logicalSource

mappings/package_eforms_sdk1.11_epo4.0/transformation/mappings/Lot_v0-1.11.rml.ttl

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,21 @@ tedm:MG-GreenProcurement-fulfillsStrategicProcurement-Lot_ND-StrategicProcuremen
4848
]
4949
.
5050

51+
# this is an example of an object referred to by multiple top-level subjects (all Lots) at orthogonal XPaths
5152
tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a rr:TriplesMap ;
53+
rdfs:label "MG-ExclusionGround" ;
54+
rml:logicalSource
55+
[
56+
rml:source "data/source.xml" ;
57+
rml:iterator "/*/cac:TenderingTerms/cac:TendererQualificationRequest/cac:SpecificTendererRequirement" ;
58+
rml:referenceFormulation ql:XPath
59+
] ;
60+
rr:subjectMap
61+
[
62+
rdfs:label "ND-ExclusionGrounds" ;
63+
rml:reference "if(exists(cbc:Description) or exists(cbc:TendererRequirementTypeCode[@listName='exclusion-ground'])) then 'http://data.europa.eu/a4g/resource/id_' || replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '_ExclusionGround_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw') else null" ;
64+
rr:class epo:ExclusionGround
65+
] ;
5266
rr:predicateObjectMap
5367
[
5468
rdfs:label "BT-67(a)-Procedure" ;
@@ -57,7 +71,6 @@ tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a
5771
rr:objectMap
5872
[
5973
tedm:maxSDKVersion "1.11" ;
60-
rml:reference "cbc:TendererRequirementTypeCode[@listName='exclusion-ground']" ;
6174
rdfs:label "at-voc:criterion" ;
6275
rr:parentTriplesMap tedm:criterion ;
6376
rr:joinCondition [
@@ -66,6 +79,31 @@ tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a
6679
] ;
6780
] ;
6881
] ;
82+
# BT-67(b)-Procedure is in dedicated language TMap
83+
# rr:predicateObjectMap
84+
# [
85+
# rdfs:label "BT-67(b)-Procedure";
86+
# rdfs:comment "Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
87+
# rr:predicate dct:description;
88+
# rr:objectMap
89+
# [
90+
# rdfs:label "BT-67(b)-Procedure-Language";
91+
# rdfs:comment "Language of Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
92+
# rml:reference "cbc:Description";
93+
# rml:languageMap [
94+
# fnml:functionValue [
95+
# rr:predicateObjectMap [
96+
# rr:predicate idlab-fn:str ;
97+
# rr:objectMap [ rml:reference "cbc:Description/@languageID" ]
98+
# ] ,
99+
# tedm:idlab-fn_executes_lookup ,
100+
# tedm:idlab-fn_inputFile_language ,
101+
# tedm:idlab-fn_fromColumn_code ,
102+
# tedm:idlab-fn_toColumn_code
103+
# ]
104+
# ] ;
105+
# ] ;
106+
# ] ;
69107
.
70108

71109
tedm:MG-langString-description-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a rr:TriplesMap ;

mappings/package_eforms_sdk1.12_epo4.0/transformation/mappings/Lot.rml.ttl

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3847,48 +3847,6 @@ tedm:MG-ReviewTerm-isSubjectToLotSpecificTerm-Lot_ND-LotReviewTerms a rr:Triples
38473847
] ;
38483848
.
38493849

3850-
# this is an example of an object referred to by multiple top-level subjects (all Lots) at orthogonal XPaths
3851-
tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a rr:TriplesMap ;
3852-
rdfs:label "MG-ExclusionGround";
3853-
rml:logicalSource
3854-
[
3855-
rml:source "data/source.xml" ;
3856-
rml:iterator "/*/cac:TenderingTerms/cac:TendererQualificationRequest/cac:SpecificTendererRequirement";
3857-
rml:referenceFormulation ql:XPath
3858-
] ;
3859-
rr:subjectMap
3860-
[
3861-
rdfs:label "ND-ExclusionGrounds";
3862-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ExclusionGround_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw')}" ;
3863-
rr:class epo:ExclusionGround
3864-
] ;
3865-
# BT-67(a)-Procedure and the lang TMap for (b) below are in versioned files due to different vocabulary resource files (criterion vs. exclusion-ground v1.12+) and changed XPath
3866-
# rr:predicateObjectMap
3867-
# [
3868-
# rdfs:label "BT-67(b)-Procedure";
3869-
# rdfs:comment "Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
3870-
# rr:predicate dct:description;
3871-
# rr:objectMap
3872-
# [
3873-
# rdfs:label "BT-67(b)-Procedure-Language";
3874-
# rdfs:comment "Language of Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds";
3875-
# rml:reference "cbc:Description";
3876-
# rml:languageMap [
3877-
# fnml:functionValue [
3878-
# rr:predicateObjectMap [
3879-
# rr:predicate idlab-fn:str ;
3880-
# rr:objectMap [ rml:reference "cbc:Description/@languageID" ]
3881-
# ] ,
3882-
# tedm:idlab-fn_executes_lookup ,
3883-
# tedm:idlab-fn_inputFile_language ,
3884-
# tedm:idlab-fn_fromColumn_code ,
3885-
# tedm:idlab-fn_toColumn_code
3886-
# ]
3887-
# ] ;
3888-
# ] ;
3889-
# ] ;
3890-
.
3891-
38923850
tedm:MG-ContractTerm-foreseesContractSpecificTerm-Lot_ND-LotContractAdditionalNature a rr:TriplesMap ;
38933851
rdfs:label "MG-ContractTerm";
38943852
rml:logicalSource

mappings/package_eforms_sdk1.12_epo4.0/transformation/mappings/Lot_v1.12+.rml.ttl

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,23 +184,60 @@ tedm:MG-langString-hasLateSubmissionInformationDescription-SubmissionTerm-isSubj
184184
] .
185185

186186
tedm:MG-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a rr:TriplesMap ;
187+
rdfs:label "MG-ExclusionGround" ;
188+
rml:logicalSource
189+
[
190+
rml:source "data/source.xml" ;
191+
rml:iterator "/*/cac:TenderingTerms/cac:TendererQualificationRequest[cac:SpecificTendererRequirement/cbc:TendererRequirementTypeCode/@listName='exclusion-ground']/cac:SpecificTendererRequirement" ;
192+
rml:referenceFormulation ql:XPath
193+
] ;
194+
rr:subjectMap
195+
[
196+
rdfs:label "ND-ExclusionGrounds" ;
197+
rml:reference "if(exists(cbc:Description) or exists(cbc:TendererRequirementTypeCode)) then 'http://data.europa.eu/a4g/resource/id_' || replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '_ExclusionGround_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw') else null" ;
198+
rr:class epo:ExclusionGround
199+
] ;
187200
rr:predicateObjectMap
188201
[
189202
rdfs:label "BT-67(a)-Procedure" ;
190-
rdfs:comment "Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds" ;
203+
rdfs:comment "Exclusion Ground of MG-ExclusionGround under ND-ExclusionGrounds" ;
191204
rr:predicate dct:type ;
192205
rr:objectMap
193206
[
194207
tedm:minSDKVersion "1.12" ;
195-
rml:reference "cbc:TendererRequirementTypeCode[@listName='exclusion-ground']" ;
196208
rdfs:label "at-voc:exclusion-ground" ;
197209
rr:parentTriplesMap tedm:exclusion-ground ;
198210
rr:joinCondition [
199-
rr:child "cbc:TendererRequirementTypeCode[@listName='exclusion-ground']" ;
211+
rr:child "cbc:TendererRequirementTypeCode" ;
200212
rr:parent "code.value" ;
201213
] ;
202214
] ;
203215
] ;
216+
# BT-67(b)-Procedure is in dedicated language TMap
217+
# rr:predicateObjectMap
218+
# [
219+
# rdfs:label "BT-67(b)-Procedure";
220+
# rdfs:comment "Exclusion Ground of MG-ExclusionGround under ND-ExclusionGrounds";
221+
# rr:predicate dct:description;
222+
# rr:objectMap
223+
# [
224+
# rdfs:label "BT-67(b)-Procedure-Language";
225+
# rdfs:comment "Language of Exclusion Ground of MG-ExclusionGround under ND-ExclusionGrounds";
226+
# rml:reference "cbc:Description";
227+
# rml:languageMap [
228+
# fnml:functionValue [
229+
# rr:predicateObjectMap [
230+
# rr:predicate idlab-fn:str ;
231+
# rr:objectMap [ rml:reference "cbc:Description/@languageID" ]
232+
# ] ,
233+
# tedm:idlab-fn_executes_lookup ,
234+
# tedm:idlab-fn_inputFile_language ,
235+
# tedm:idlab-fn_fromColumn_code ,
236+
# tedm:idlab-fn_toColumn_code
237+
# ]
238+
# ] ;
239+
# ] ;
240+
# ] ;
204241
.
205242

206243
tedm:MG-langString-description-ExclusionGround-specifiesProcurementCriterion-Lot_ND-ExclusionGrounds a rr:TriplesMap ;
@@ -232,10 +269,10 @@ tedm:MG-langString-description-ExclusionGround-specifiesProcurementCriterion-Lot
232269
rr:predicateObjectMap tedm:idlab-fn_toColumn_code ;
233270
] ;
234271
] ;
235-
rdfs:comment "Language of Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds" ;
272+
rdfs:comment "Language of Exclusion Ground of MG-ExclusionGround under ND-ExclusionGrounds" ;
236273
rdfs:label "BT-67(b)-Procedure-Language" ;
237274
] ;
238-
rdfs:comment "Exclusion Grounds of MG-ExclusionGround under ND-ExclusionGrounds" ;
275+
rdfs:comment "Exclusion Ground of MG-ExclusionGround under ND-ExclusionGrounds" ;
239276
rdfs:label "BT-67(b)-Procedure" ;
240277
] ;
241278
rdfs:label "MG-ExclusionGround" .

0 commit comments

Comments
 (0)