Skip to content

Commit 6a41594

Browse files
committed
Undo reversal of "Fix VehicleInformation instantiation - runts and multiple values"
This reverts commit 95b4da9. Fixes gh-122.
1 parent df09405 commit 6a41594

17 files changed

Lines changed: 263 additions & 128 deletions

File tree

mappings/package_eforms_sdk1.10_epo4.0/transformation/mappings/LotAwardOutcome-can.rml.ttl

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ tedm:MG-LotAwardOutcome_ND-LotResultTenderReference a rr:TriplesMap ;
247247
] ;
248248
.
249249

250-
tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
250+
tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
251251
rdfs:label "MG-LotAwardOutcome";
252252
rml:logicalSource
253253
[
@@ -267,7 +267,7 @@ tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
267267
rr:predicate rdfs:seeAlso ;
268268
rr:objectMap
269269
[
270-
rr:parentTriplesMap tedm:MG-VehicleInformation-seeAlso-LotAwardOutcome_ND-StrategicProcurementInformationLotResult ;
270+
rr:parentTriplesMap tedm:MG-VehicleInformation_ND-StrategicProcurementInformationLotResult ;
271271
rr:joinCondition [
272272
rr:child "path(.)";
273273
rr:parent "path(.)"
@@ -276,19 +276,32 @@ tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
276276
] ;
277277
.
278278

279-
tedm:MG-VehicleInformation-seeAlso-LotAwardOutcome_ND-StrategicProcurementInformationLotResult a rr:TriplesMap ;
280-
rdfs:label "MG-VehicleInformation";
279+
tedm:MG-LotAwardOutcome_ND-ProcurementDetailsLotResult a rr:TriplesMap ;
280+
rdfs:label "MG-LotAwardOutcome";
281281
rml:logicalSource
282282
[
283283
rml:source "data/source.xml" ;
284-
rml:iterator "/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement/efac:StrategicProcurementInformation" ;
284+
rml:iterator "/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement/efac:StrategicProcurementInformation/efac:ProcurementDetails" ;
285285
rml:referenceFormulation ql:XPath
286286
] ;
287287
rr:subjectMap
288288
[
289-
rdfs:label "ND-ProcurementStatistics" ;
290-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_VehicleInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw')}" ;
291-
rr:class epo:VehicleInformation
289+
rdfs:label "ND-ProcurementDetailsLotResult" ;
290+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_LotAwardOutcome_{../../../cbc:ID}" ;
291+
rr:class epo:LotAwardOutcome
292+
] ;
293+
rr:predicateObjectMap
294+
[
295+
rdfs:label "ND-ProcurementDetailsLotResult" ;
296+
rr:predicate rdfs:seeAlso ;
297+
rr:objectMap
298+
[
299+
rr:parentTriplesMap tedm:MG-VehicleInformation_ND-ProcurementDetailsLotResult ;
300+
rr:joinCondition [
301+
rr:child "path(.)";
302+
rr:parent "path(.)"
303+
];
304+
] ;
292305
] ;
293306
.
294307

mappings/package_eforms_sdk1.10_epo4.0/transformation/mappings/VehicleInformation-can_v1.3-1.12.rml.ttl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#--- MG-VehicleInformation version-specific SDK v0-1.12 ---
1+
#--- MG-VehicleInformation CAN version-specific SDK v0-1.12 ---
22
@prefix owl: <http://www.w3.org/2002/07/owl#> .
33
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
44
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -35,7 +35,7 @@ tedm:MG-VehicleInformation_ND-ProcurementDetailsLotResult a rr:TriplesMap ;
3535
rr:subjectMap
3636
[
3737
rdfs:label "ND-ProcurementDetailsLotResult" ;
38-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_VehicleInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(..)) || '?response_type=raw')}" ;
38+
rml:reference "'http://data.europa.eu/a4g/resource/id_' || replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '_VehicleInformation_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if (exists(../efac:ProcurementDetails[2])) then path() else path(..)) || '?response_type=raw')" ;
3939
rr:class epo:VehicleInformation
4040
] ;
4141
rr:predicateObjectMap
@@ -83,7 +83,7 @@ tedm:MG-VehicleInformation_ND-ProcurementStatistics a rr:TriplesMap ;
8383
rr:subjectMap
8484
[
8585
rdfs:label "ND-ProcurementStatistics" ;
86-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_VehicleInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../..)) || '?response_type=raw')}" ;
86+
rml:reference "'http://data.europa.eu/a4g/resource/id_' || replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '_VehicleInformation_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if (exists(../../efac:ProcurementDetails[2])) then path(..) else path(../..)) || '?response_type=raw')" ;
8787
rr:class epo:VehicleInformation
8888
] ;
8989
rr:predicateObjectMap
@@ -93,7 +93,7 @@ tedm:MG-VehicleInformation_ND-ProcurementStatistics a rr:TriplesMap ;
9393
rr:predicate epo:hasTotalVehicles ;
9494
rr:objectMap
9595
[
96-
rml:reference "if (efbc:StatisticsCode='vehicles')then efbc:StatisticsNumeric else null";
96+
rml:reference "if (efbc:StatisticsCode='vehicles') then efbc:StatisticsNumeric else null";
9797
rr:datatype xsd:integer ;
9898
] ;
9999
];
@@ -104,7 +104,7 @@ tedm:MG-VehicleInformation_ND-ProcurementStatistics a rr:TriplesMap ;
104104
rr:predicate epo:hasCleanVehicles ;
105105
rr:objectMap
106106
[
107-
rml:reference "if (efbc:StatisticsCode='vehicles-clean')then efbc:StatisticsNumeric else null";
107+
rml:reference "if (efbc:StatisticsCode='vehicles-clean') then efbc:StatisticsNumeric else null";
108108
rr:datatype xsd:integer ;
109109
] ;
110110
];
@@ -133,9 +133,9 @@ tedm:MG-VehicleInformation_ND-StrategicProcurementInformationLotResult a rr:Trip
133133
rr:subjectMap
134134
[
135135
rdfs:label "ND-StrategicProcurementInformationLotResult" ;
136-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_VehicleInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw')}" ;
136+
rml:reference "if (exists(efbc:ProcurementCategoryCode)) then 'http://data.europa.eu/a4g/resource/id_' || replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '_VehicleInformation_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw') else null" ;
137137
rr:class epo:VehicleInformation
138-
] ;
138+
] ;
139139
rr:predicateObjectMap
140140
[
141141
rdfs:label "BT-735-LotResult";
@@ -164,5 +164,5 @@ tedm:MG-VehicleInformation_ND-StrategicProcurementInformationLotResult a rr:Trip
164164
rr:parent "path(.)";
165165
];
166166
] ;
167-
] ;
167+
] ;
168168
.

mappings/package_eforms_sdk1.11_epo4.0/transformation/mappings/LotAwardOutcome-can.rml.ttl

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ tedm:MG-LotAwardOutcome_ND-LotResultTenderReference a rr:TriplesMap ;
247247
] ;
248248
.
249249

250-
tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
250+
tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
251251
rdfs:label "MG-LotAwardOutcome";
252252
rml:logicalSource
253253
[
@@ -267,7 +267,7 @@ tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
267267
rr:predicate rdfs:seeAlso ;
268268
rr:objectMap
269269
[
270-
rr:parentTriplesMap tedm:MG-VehicleInformation-seeAlso-LotAwardOutcome_ND-StrategicProcurementInformationLotResult ;
270+
rr:parentTriplesMap tedm:MG-VehicleInformation_ND-StrategicProcurementInformationLotResult ;
271271
rr:joinCondition [
272272
rr:child "path(.)";
273273
rr:parent "path(.)"
@@ -276,19 +276,32 @@ tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
276276
] ;
277277
.
278278

279-
tedm:MG-VehicleInformation-seeAlso-LotAwardOutcome_ND-StrategicProcurementInformationLotResult a rr:TriplesMap ;
280-
rdfs:label "MG-VehicleInformation";
279+
tedm:MG-LotAwardOutcome_ND-ProcurementDetailsLotResult a rr:TriplesMap ;
280+
rdfs:label "MG-LotAwardOutcome";
281281
rml:logicalSource
282282
[
283283
rml:source "data/source.xml" ;
284-
rml:iterator "/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement/efac:StrategicProcurementInformation" ;
284+
rml:iterator "/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement/efac:StrategicProcurementInformation/efac:ProcurementDetails" ;
285285
rml:referenceFormulation ql:XPath
286286
] ;
287287
rr:subjectMap
288288
[
289-
rdfs:label "ND-ProcurementStatistics" ;
290-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_VehicleInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw')}" ;
291-
rr:class epo:VehicleInformation
289+
rdfs:label "ND-ProcurementDetailsLotResult" ;
290+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_LotAwardOutcome_{../../../cbc:ID}" ;
291+
rr:class epo:LotAwardOutcome
292+
] ;
293+
rr:predicateObjectMap
294+
[
295+
rdfs:label "ND-ProcurementDetailsLotResult" ;
296+
rr:predicate rdfs:seeAlso ;
297+
rr:objectMap
298+
[
299+
rr:parentTriplesMap tedm:MG-VehicleInformation_ND-ProcurementDetailsLotResult ;
300+
rr:joinCondition [
301+
rr:child "path(.)";
302+
rr:parent "path(.)"
303+
];
304+
] ;
292305
] ;
293306
.
294307

mappings/package_eforms_sdk1.11_epo4.0/transformation/mappings/VehicleInformation-can_v1.3-1.12.rml.ttl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#--- MG-VehicleInformation version-specific SDK v0-1.12 ---
1+
#--- MG-VehicleInformation CAN version-specific SDK v0-1.12 ---
22
@prefix owl: <http://www.w3.org/2002/07/owl#> .
33
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
44
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -35,7 +35,7 @@ tedm:MG-VehicleInformation_ND-ProcurementDetailsLotResult a rr:TriplesMap ;
3535
rr:subjectMap
3636
[
3737
rdfs:label "ND-ProcurementDetailsLotResult" ;
38-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_VehicleInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(..)) || '?response_type=raw')}" ;
38+
rml:reference "'http://data.europa.eu/a4g/resource/id_' || replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '_VehicleInformation_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if (exists(../efac:ProcurementDetails[2])) then path() else path(..)) || '?response_type=raw')" ;
3939
rr:class epo:VehicleInformation
4040
] ;
4141
rr:predicateObjectMap
@@ -83,7 +83,7 @@ tedm:MG-VehicleInformation_ND-ProcurementStatistics a rr:TriplesMap ;
8383
rr:subjectMap
8484
[
8585
rdfs:label "ND-ProcurementStatistics" ;
86-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_VehicleInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../..)) || '?response_type=raw')}" ;
86+
rml:reference "'http://data.europa.eu/a4g/resource/id_' || replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '_VehicleInformation_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if (exists(../../efac:ProcurementDetails[2])) then path(..) else path(../..)) || '?response_type=raw')" ;
8787
rr:class epo:VehicleInformation
8888
] ;
8989
rr:predicateObjectMap
@@ -93,7 +93,7 @@ tedm:MG-VehicleInformation_ND-ProcurementStatistics a rr:TriplesMap ;
9393
rr:predicate epo:hasTotalVehicles ;
9494
rr:objectMap
9595
[
96-
rml:reference "if (efbc:StatisticsCode='vehicles')then efbc:StatisticsNumeric else null";
96+
rml:reference "if (efbc:StatisticsCode='vehicles') then efbc:StatisticsNumeric else null";
9797
rr:datatype xsd:integer ;
9898
] ;
9999
];
@@ -104,7 +104,7 @@ tedm:MG-VehicleInformation_ND-ProcurementStatistics a rr:TriplesMap ;
104104
rr:predicate epo:hasCleanVehicles ;
105105
rr:objectMap
106106
[
107-
rml:reference "if (efbc:StatisticsCode='vehicles-clean')then efbc:StatisticsNumeric else null";
107+
rml:reference "if (efbc:StatisticsCode='vehicles-clean') then efbc:StatisticsNumeric else null";
108108
rr:datatype xsd:integer ;
109109
] ;
110110
];
@@ -133,9 +133,9 @@ tedm:MG-VehicleInformation_ND-StrategicProcurementInformationLotResult a rr:Trip
133133
rr:subjectMap
134134
[
135135
rdfs:label "ND-StrategicProcurementInformationLotResult" ;
136-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_VehicleInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw')}" ;
136+
rml:reference "if (exists(efbc:ProcurementCategoryCode)) then 'http://data.europa.eu/a4g/resource/id_' || replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '_VehicleInformation_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw') else null" ;
137137
rr:class epo:VehicleInformation
138-
] ;
138+
] ;
139139
rr:predicateObjectMap
140140
[
141141
rdfs:label "BT-735-LotResult";
@@ -164,5 +164,5 @@ tedm:MG-VehicleInformation_ND-StrategicProcurementInformationLotResult a rr:Trip
164164
rr:parent "path(.)";
165165
];
166166
] ;
167-
] ;
167+
] ;
168168
.

mappings/package_eforms_sdk1.12_epo4.0/transformation/mappings/LotAwardOutcome-can.rml.ttl

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ tedm:MG-LotAwardOutcome_ND-LotResultTenderReference a rr:TriplesMap ;
247247
] ;
248248
.
249249

250-
tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
250+
tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
251251
rdfs:label "MG-LotAwardOutcome";
252252
rml:logicalSource
253253
[
@@ -267,7 +267,7 @@ tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
267267
rr:predicate rdfs:seeAlso ;
268268
rr:objectMap
269269
[
270-
rr:parentTriplesMap tedm:MG-VehicleInformation-seeAlso-LotAwardOutcome_ND-StrategicProcurementInformationLotResult ;
270+
rr:parentTriplesMap tedm:MG-VehicleInformation_ND-StrategicProcurementInformationLotResult ;
271271
rr:joinCondition [
272272
rr:child "path(.)";
273273
rr:parent "path(.)"
@@ -276,19 +276,32 @@ tedm:MG-LotAwardOutcome_ND-StrategicProcurementLotResult a rr:TriplesMap ;
276276
] ;
277277
.
278278

279-
tedm:MG-VehicleInformation-seeAlso-LotAwardOutcome_ND-StrategicProcurementInformationLotResult a rr:TriplesMap ;
280-
rdfs:label "MG-VehicleInformation";
279+
tedm:MG-LotAwardOutcome_ND-ProcurementDetailsLotResult a rr:TriplesMap ;
280+
rdfs:label "MG-LotAwardOutcome";
281281
rml:logicalSource
282282
[
283283
rml:source "data/source.xml" ;
284-
rml:iterator "/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement/efac:StrategicProcurementInformation" ;
284+
rml:iterator "/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement/efac:StrategicProcurementInformation/efac:ProcurementDetails" ;
285285
rml:referenceFormulation ql:XPath
286286
] ;
287287
rr:subjectMap
288288
[
289-
rdfs:label "ND-ProcurementStatistics" ;
290-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_VehicleInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw')}" ;
291-
rr:class epo:VehicleInformation
289+
rdfs:label "ND-ProcurementDetailsLotResult" ;
290+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_LotAwardOutcome_{../../../cbc:ID}" ;
291+
rr:class epo:LotAwardOutcome
292+
] ;
293+
rr:predicateObjectMap
294+
[
295+
rdfs:label "ND-ProcurementDetailsLotResult" ;
296+
rr:predicate rdfs:seeAlso ;
297+
rr:objectMap
298+
[
299+
rr:parentTriplesMap tedm:MG-VehicleInformation_ND-ProcurementDetailsLotResult ;
300+
rr:joinCondition [
301+
rr:child "path(.)";
302+
rr:parent "path(.)"
303+
];
304+
] ;
292305
] ;
293306
.
294307

0 commit comments

Comments
 (0)