Skip to content

Commit 95615bc

Browse files
committed
Fix hasConstraint wrongly linked from LotGroup
The link should be from the AwardCriterion. Affects BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber, for which next to no sample data has been found for testing, so this remains untested, for both eForms SDK v1.3-1.7 and v1.8+. This was exposed by the `shacl-driven-consistency-validation` and `cm2shacl` tools by PhD student Xuemin Duan from KU Leuven.
1 parent 8b8ba2a commit 95615bc

11 files changed

Lines changed: 363 additions & 44 deletions

File tree

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

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
130130
rr:predicateObjectMap
131131
[
132132
rdfs:label "BT-5421-LotsGroup-FixedNumber";
133-
rr:predicate epo:specifiesProcurementCriterion ;
133+
rr:predicate epo:specifiesProcurementCriterion ;
134134
rr:objectMap
135135
[
136136
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardFixedCriterionParameter ;
@@ -142,11 +142,11 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
142142
] ;
143143
rr:predicateObjectMap
144144
[
145-
rdfs:label "BT-5423-LotsGroup, BT-541-LotsGroup-ThresholdNumber";
146-
rr:predicate epo:hasConstraint ;
145+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
146+
rr:predicate epo:specifiesProcurementCriterion ;
147147
rr:objectMap
148148
[
149-
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter;
149+
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
150150
rr:joinCondition [
151151
rr:child "path(.)";
152152
rr:parent "path(../../../../../../../../..)";
@@ -588,6 +588,35 @@ tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardW
588588
] ;
589589
.
590590

591+
tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592+
rdfs:label "MG-AwardCriterion" ;
593+
rml:logicalSource
594+
[
595+
rml:source "data/source.xml" ;
596+
rml:iterator "/*/cac:ProcurementProjectLot[cbc:ID/@schemeName='LotsGroup']/cac:TenderingTerms/cac:AwardingTerms/cac:AwardingCriterion/cac:SubordinateAwardingCriterion/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']" ;
597+
rml:referenceFormulation ql:XPath
598+
] ;
599+
rr:subjectMap
600+
[
601+
rdfs:label "ND-LotsGroupAwardThresholdCriterionParameter" ;
602+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_LotGroupAwardCriterion_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../../../../..)) || '?response_type=raw')}" ;
603+
rr:class epo:AwardCriterion
604+
] ;
605+
rr:predicateObjectMap
606+
[
607+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
608+
rr:predicate epo:hasConstraint ;
609+
rr:objectMap
610+
[
611+
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
612+
rr:joinCondition [
613+
rr:child "path(.)" ;
614+
rr:parent "path(.)" ;
615+
] ;
616+
] ;
617+
] ;
618+
.
619+
591620
tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592621
rdfs:label "MG-Constraint";
593622
rml:logicalSource

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

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
130130
rr:predicateObjectMap
131131
[
132132
rdfs:label "BT-5421-LotsGroup-FixedNumber";
133-
rr:predicate epo:specifiesProcurementCriterion ;
133+
rr:predicate epo:specifiesProcurementCriterion ;
134134
rr:objectMap
135135
[
136136
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardFixedCriterionParameter ;
@@ -142,11 +142,11 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
142142
] ;
143143
rr:predicateObjectMap
144144
[
145-
rdfs:label "BT-5423-LotsGroup, BT-541-LotsGroup-ThresholdNumber";
146-
rr:predicate epo:hasConstraint ;
145+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
146+
rr:predicate epo:specifiesProcurementCriterion ;
147147
rr:objectMap
148148
[
149-
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter;
149+
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
150150
rr:joinCondition [
151151
rr:child "path(.)";
152152
rr:parent "path(../../../../../../../../..)";
@@ -588,6 +588,35 @@ tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardW
588588
] ;
589589
.
590590

591+
tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592+
rdfs:label "MG-AwardCriterion" ;
593+
rml:logicalSource
594+
[
595+
rml:source "data/source.xml" ;
596+
rml:iterator "/*/cac:ProcurementProjectLot[cbc:ID/@schemeName='LotsGroup']/cac:TenderingTerms/cac:AwardingTerms/cac:AwardingCriterion/cac:SubordinateAwardingCriterion/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']" ;
597+
rml:referenceFormulation ql:XPath
598+
] ;
599+
rr:subjectMap
600+
[
601+
rdfs:label "ND-LotsGroupAwardThresholdCriterionParameter" ;
602+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_LotGroupAwardCriterion_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../../../../..)) || '?response_type=raw')}" ;
603+
rr:class epo:AwardCriterion
604+
] ;
605+
rr:predicateObjectMap
606+
[
607+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
608+
rr:predicate epo:hasConstraint ;
609+
rr:objectMap
610+
[
611+
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
612+
rr:joinCondition [
613+
rr:child "path(.)" ;
614+
rr:parent "path(.)" ;
615+
] ;
616+
] ;
617+
] ;
618+
.
619+
591620
tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592621
rdfs:label "MG-Constraint";
593622
rml:logicalSource

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

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
130130
rr:predicateObjectMap
131131
[
132132
rdfs:label "BT-5421-LotsGroup-FixedNumber";
133-
rr:predicate epo:specifiesProcurementCriterion ;
133+
rr:predicate epo:specifiesProcurementCriterion ;
134134
rr:objectMap
135135
[
136136
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardFixedCriterionParameter ;
@@ -142,11 +142,11 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
142142
] ;
143143
rr:predicateObjectMap
144144
[
145-
rdfs:label "BT-5423-LotsGroup, BT-541-LotsGroup-ThresholdNumber";
146-
rr:predicate epo:hasConstraint ;
145+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
146+
rr:predicate epo:specifiesProcurementCriterion ;
147147
rr:objectMap
148148
[
149-
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter;
149+
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
150150
rr:joinCondition [
151151
rr:child "path(.)";
152152
rr:parent "path(../../../../../../../../..)";
@@ -588,6 +588,35 @@ tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardW
588588
] ;
589589
.
590590

591+
tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592+
rdfs:label "MG-AwardCriterion" ;
593+
rml:logicalSource
594+
[
595+
rml:source "data/source.xml" ;
596+
rml:iterator "/*/cac:ProcurementProjectLot[cbc:ID/@schemeName='LotsGroup']/cac:TenderingTerms/cac:AwardingTerms/cac:AwardingCriterion/cac:SubordinateAwardingCriterion/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']" ;
597+
rml:referenceFormulation ql:XPath
598+
] ;
599+
rr:subjectMap
600+
[
601+
rdfs:label "ND-LotsGroupAwardThresholdCriterionParameter" ;
602+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_LotGroupAwardCriterion_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../../../../..)) || '?response_type=raw')}" ;
603+
rr:class epo:AwardCriterion
604+
] ;
605+
rr:predicateObjectMap
606+
[
607+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
608+
rr:predicate epo:hasConstraint ;
609+
rr:objectMap
610+
[
611+
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
612+
rr:joinCondition [
613+
rr:child "path(.)" ;
614+
rr:parent "path(.)" ;
615+
] ;
616+
] ;
617+
] ;
618+
.
619+
591620
tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592621
rdfs:label "MG-Constraint";
593622
rml:logicalSource

mappings/package_eforms_sdk1.13_epo4.0/transformation/mappings/LotGroup.rml.ttl

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
130130
rr:predicateObjectMap
131131
[
132132
rdfs:label "BT-5421-LotsGroup-FixedNumber";
133-
rr:predicate epo:specifiesProcurementCriterion ;
133+
rr:predicate epo:specifiesProcurementCriterion ;
134134
rr:objectMap
135135
[
136136
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardFixedCriterionParameter ;
@@ -142,11 +142,11 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
142142
] ;
143143
rr:predicateObjectMap
144144
[
145-
rdfs:label "BT-5423-LotsGroup, BT-541-LotsGroup-ThresholdNumber";
146-
rr:predicate epo:hasConstraint ;
145+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
146+
rr:predicate epo:specifiesProcurementCriterion ;
147147
rr:objectMap
148148
[
149-
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter;
149+
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
150150
rr:joinCondition [
151151
rr:child "path(.)";
152152
rr:parent "path(../../../../../../../../..)";
@@ -588,6 +588,35 @@ tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardW
588588
] ;
589589
.
590590

591+
tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592+
rdfs:label "MG-AwardCriterion" ;
593+
rml:logicalSource
594+
[
595+
rml:source "data/source.xml" ;
596+
rml:iterator "/*/cac:ProcurementProjectLot[cbc:ID/@schemeName='LotsGroup']/cac:TenderingTerms/cac:AwardingTerms/cac:AwardingCriterion/cac:SubordinateAwardingCriterion/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']" ;
597+
rml:referenceFormulation ql:XPath
598+
] ;
599+
rr:subjectMap
600+
[
601+
rdfs:label "ND-LotsGroupAwardThresholdCriterionParameter" ;
602+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_LotGroupAwardCriterion_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../../../../..)) || '?response_type=raw')}" ;
603+
rr:class epo:AwardCriterion
604+
] ;
605+
rr:predicateObjectMap
606+
[
607+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
608+
rr:predicate epo:hasConstraint ;
609+
rr:objectMap
610+
[
611+
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
612+
rr:joinCondition [
613+
rr:child "path(.)" ;
614+
rr:parent "path(.)" ;
615+
] ;
616+
] ;
617+
] ;
618+
.
619+
591620
tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592621
rdfs:label "MG-Constraint";
593622
rml:logicalSource

mappings/package_eforms_sdk1.3_epo4.0/transformation/mappings/LotGroup.rml.ttl

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
130130
rr:predicateObjectMap
131131
[
132132
rdfs:label "BT-5421-LotsGroup-FixedNumber";
133-
rr:predicate epo:specifiesProcurementCriterion ;
133+
rr:predicate epo:specifiesProcurementCriterion ;
134134
rr:objectMap
135135
[
136136
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardFixedCriterionParameter ;
@@ -142,11 +142,11 @@ tedm:MG-LotGroup_ND-LotsGroup a rr:TriplesMap ;
142142
] ;
143143
rr:predicateObjectMap
144144
[
145-
rdfs:label "BT-5423-LotsGroup, BT-541-LotsGroup-ThresholdNumber";
146-
rr:predicate epo:hasConstraint ;
145+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
146+
rr:predicate epo:specifiesProcurementCriterion ;
147147
rr:objectMap
148148
[
149-
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter;
149+
rr:parentTriplesMap tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
150150
rr:joinCondition [
151151
rr:child "path(.)";
152152
rr:parent "path(../../../../../../../../..)";
@@ -588,6 +588,35 @@ tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardW
588588
] ;
589589
.
590590

591+
tedm:MG-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592+
rdfs:label "MG-AwardCriterion" ;
593+
rml:logicalSource
594+
[
595+
rml:source "data/source.xml" ;
596+
rml:iterator "/*/cac:ProcurementProjectLot[cbc:ID/@schemeName='LotsGroup']/cac:TenderingTerms/cac:AwardingTerms/cac:AwardingCriterion/cac:SubordinateAwardingCriterion/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']" ;
597+
rml:referenceFormulation ql:XPath
598+
] ;
599+
rr:subjectMap
600+
[
601+
rdfs:label "ND-LotsGroupAwardThresholdCriterionParameter" ;
602+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_LotGroupAwardCriterion_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../../../../..)) || '?response_type=raw')}" ;
603+
rr:class epo:AwardCriterion
604+
] ;
605+
rr:predicateObjectMap
606+
[
607+
rdfs:label "BT-5423-LotsGroup and BT-541-LotsGroup-ThresholdNumber" ;
608+
rr:predicate epo:hasConstraint ;
609+
rr:objectMap
610+
[
611+
rr:parentTriplesMap tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter ;
612+
rr:joinCondition [
613+
rr:child "path(.)" ;
614+
rr:parent "path(.)" ;
615+
] ;
616+
] ;
617+
] ;
618+
.
619+
591620
tedm:MG-Constraint-hasConstraint-AwardCriterion-specifiesProcurementCriterion-LotGroup_ND-LotsGroupAwardThresholdCriterionParameter a rr:TriplesMap ;
592621
rdfs:label "MG-Constraint";
593622
rml:logicalSource

0 commit comments

Comments
 (0)