Skip to content

Commit 8f4480e

Browse files
committed
Fix isProcurementDocumentChanged values, refactor ChangeInformation
The `epo:isProcurementDocumentChanged` had multiple values in some cases, and this was a long-standing issue about instantiation relating to the change XPaths differing across versions. We employ a trick to instantiate at the right path in the template depending on whether there is one or more Change elements. Furthermore, we replicate the TMaps necessary for each unique node to facilitate the different levels of instantiation. This results in either one complete ChangeInformation, or several instances of it with the description-related changes in one, and other information in the other. This is because all of the information are not structured in a sensible way in eForms, that would allow them to be instantiated as one single resource in all cases.
1 parent 63c1bb2 commit 8f4480e

69 files changed

Lines changed: 1710 additions & 284 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

mappings/package_can_v1.10/transformation/mappings/ChangeInformation.rml.ttl

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ tedm:MG-ChangeInformation_ND-ChangeReason a rr:TriplesMap ;
9090
rr:parent "path(.)";
9191
];
9292
] ;
93-
] ;
93+
] ;
9494
.
9595

9696
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
@@ -105,7 +105,7 @@ tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
105105
rr:subjectMap
106106
[
107107
rdfs:label "ND-Change";
108-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(..)) || '?response_type=raw')}" ;
108+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if(exists(../efac:Change[2])) then path() else path(..)) || '?response_type=raw')}" ;
109109
rr:class epo:ChangeInformation
110110
] ;
111111
# rr:predicateObjectMap
@@ -153,7 +153,29 @@ tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
153153
rml:reference "efbc:ProcurementDocumentsChangeDate";
154154
rr:datatype xsd:date ;
155155
] ;
156-
]
156+
] ;
157+
rr:predicateObjectMap
158+
[
159+
rdfs:label "ND-Changes";
160+
rr:predicate epo:concernsNotice ;
161+
rr:objectMap
162+
[
163+
rr:parentTriplesMap tedm:MG-Notice_ND-Root ;
164+
] ;
165+
] ;
166+
rr:predicateObjectMap
167+
[
168+
rdfs:label "BT-758-notice";
169+
rr:predicate epo:refersToPreviousNotice ;
170+
rr:objectMap
171+
[
172+
rr:parentTriplesMap tedm:MG-Notice-refersToPreviousNotice-ChangeInformation_ND-Changes ;
173+
rr:joinCondition [
174+
rr:child "path(..)";
175+
rr:parent "path(.)";
176+
];
177+
] ;
178+
] ;
157179
.
158180

159181
tedm:MG-Identifier-identifier-Notice-refersToPreviousNotice-ChangeInformation_ND-Changes a rr:TriplesMap ;
@@ -241,7 +263,7 @@ tedm:MG-langString-hasChangeDescription-ChangeInformation_ND-Change a rr:Triples
241263
rr:subjectMap [
242264
rr:class epo-not:ChangeInformation ;
243265
rdfs:label "ND-Change" ;
244-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../..)) || '?response_type=raw')}" ;
266+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if(exists(../../efac:Change[2])) then path(..) else path(../..)) || '?response_type=raw')}" ;
245267
] ;
246268
rr:predicateObjectMap [
247269
rr:predicate epo-not:hasChangeDescription ;

mappings/package_can_v1.10/transformation/mappings/ChangeInformation_v1.7+.rml.ttl

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,32 @@
2424
@prefix idlab-fn: <http://example.com/idlab/function/> .
2525
@prefix tedm: <http://data.europa.eu/a4g/mapping/sf-rml/> .
2626

27-
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
27+
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
2828
rr:predicateObjectMap
2929
[
3030
rdfs:label "BT-13716-notice (object)";
3131
rr:predicate epo:relatesToEFormSectionIdentifier ;
3232
rr:objectMap
3333
[
34+
tedm:minSDKVersion "1.7" ;
35+
rr:parentTriplesMap tedm:MG-Identifier-relatesToEFormSectionIdentifier-ChangeInformation_ND-ChangedSection ;
36+
rr:joinCondition [
37+
rr:child "path(.)";
38+
rr:parent "path(..)";
39+
];
40+
] ;
41+
] ;
42+
.
43+
44+
tedm:MG-ChangeInformation_ND-ChangeReason a rr:TriplesMap ;
45+
rr:predicateObjectMap
46+
[
47+
rdfs:label "BT-13716-notice (object)";
48+
rr:predicate epo:relatesToEFormSectionIdentifier ;
49+
rr:objectMap
50+
[
51+
tedm:minSDKVersion "1.3" ;
52+
tedm:maxSDKVersion "1.6" ;
3453
rr:parentTriplesMap tedm:MG-Identifier-relatesToEFormSectionIdentifier-ChangeInformation_ND-ChangedSection ;
3554
rr:joinCondition [
3655
rr:child "path(.)";
@@ -49,7 +68,7 @@ tedm:MG-Identifier-relatesToEFormSectionIdentifier-ChangeInformation_ND-ChangedS
4968
];
5069
rr:subjectMap
5170
[
52-
rdfs:label "ND-Changes";
71+
rdfs:label "ND-ChangedSection";
5372
rml:reference "if (exists(efbc:ChangedSectionIdentifier)) then 'http://data.europa.eu/a4g/resource/id_' || replace(replace(../../efbc:ChangedNoticeIdentifier, ' ', '-' ), '/' , '-') || '_ChangedSectionIdentifier_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw') else null" ;
5473
rr:class adms:Identifier
5574
] ;

mappings/package_can_v1.11/transformation/mappings/ChangeInformation.rml.ttl

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ tedm:MG-ChangeInformation_ND-ChangeReason a rr:TriplesMap ;
9090
rr:parent "path(.)";
9191
];
9292
] ;
93-
] ;
93+
] ;
9494
.
9595

9696
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
@@ -105,7 +105,7 @@ tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
105105
rr:subjectMap
106106
[
107107
rdfs:label "ND-Change";
108-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(..)) || '?response_type=raw')}" ;
108+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if(exists(../efac:Change[2])) then path() else path(..)) || '?response_type=raw')}" ;
109109
rr:class epo:ChangeInformation
110110
] ;
111111
# rr:predicateObjectMap
@@ -153,7 +153,29 @@ tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
153153
rml:reference "efbc:ProcurementDocumentsChangeDate";
154154
rr:datatype xsd:date ;
155155
] ;
156-
]
156+
] ;
157+
rr:predicateObjectMap
158+
[
159+
rdfs:label "ND-Changes";
160+
rr:predicate epo:concernsNotice ;
161+
rr:objectMap
162+
[
163+
rr:parentTriplesMap tedm:MG-Notice_ND-Root ;
164+
] ;
165+
] ;
166+
rr:predicateObjectMap
167+
[
168+
rdfs:label "BT-758-notice";
169+
rr:predicate epo:refersToPreviousNotice ;
170+
rr:objectMap
171+
[
172+
rr:parentTriplesMap tedm:MG-Notice-refersToPreviousNotice-ChangeInformation_ND-Changes ;
173+
rr:joinCondition [
174+
rr:child "path(..)";
175+
rr:parent "path(.)";
176+
];
177+
] ;
178+
] ;
157179
.
158180

159181
tedm:MG-Identifier-identifier-Notice-refersToPreviousNotice-ChangeInformation_ND-Changes a rr:TriplesMap ;
@@ -241,7 +263,7 @@ tedm:MG-langString-hasChangeDescription-ChangeInformation_ND-Change a rr:Triples
241263
rr:subjectMap [
242264
rr:class epo-not:ChangeInformation ;
243265
rdfs:label "ND-Change" ;
244-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../..)) || '?response_type=raw')}" ;
266+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if(exists(../../efac:Change[2])) then path(..) else path(../..)) || '?response_type=raw')}" ;
245267
] ;
246268
rr:predicateObjectMap [
247269
rr:predicate epo-not:hasChangeDescription ;

mappings/package_can_v1.11/transformation/mappings/ChangeInformation_v1.7+.rml.ttl

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,32 @@
2424
@prefix idlab-fn: <http://example.com/idlab/function/> .
2525
@prefix tedm: <http://data.europa.eu/a4g/mapping/sf-rml/> .
2626

27-
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
27+
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
2828
rr:predicateObjectMap
2929
[
3030
rdfs:label "BT-13716-notice (object)";
3131
rr:predicate epo:relatesToEFormSectionIdentifier ;
3232
rr:objectMap
3333
[
34+
tedm:minSDKVersion "1.7" ;
35+
rr:parentTriplesMap tedm:MG-Identifier-relatesToEFormSectionIdentifier-ChangeInformation_ND-ChangedSection ;
36+
rr:joinCondition [
37+
rr:child "path(.)";
38+
rr:parent "path(..)";
39+
];
40+
] ;
41+
] ;
42+
.
43+
44+
tedm:MG-ChangeInformation_ND-ChangeReason a rr:TriplesMap ;
45+
rr:predicateObjectMap
46+
[
47+
rdfs:label "BT-13716-notice (object)";
48+
rr:predicate epo:relatesToEFormSectionIdentifier ;
49+
rr:objectMap
50+
[
51+
tedm:minSDKVersion "1.3" ;
52+
tedm:maxSDKVersion "1.6" ;
3453
rr:parentTriplesMap tedm:MG-Identifier-relatesToEFormSectionIdentifier-ChangeInformation_ND-ChangedSection ;
3554
rr:joinCondition [
3655
rr:child "path(.)";
@@ -49,7 +68,7 @@ tedm:MG-Identifier-relatesToEFormSectionIdentifier-ChangeInformation_ND-ChangedS
4968
];
5069
rr:subjectMap
5170
[
52-
rdfs:label "ND-Changes";
71+
rdfs:label "ND-ChangedSection";
5372
rml:reference "if (exists(efbc:ChangedSectionIdentifier)) then 'http://data.europa.eu/a4g/resource/id_' || replace(replace(../../efbc:ChangedNoticeIdentifier, ' ', '-' ), '/' , '-') || '_ChangedSectionIdentifier_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw') else null" ;
5473
rr:class adms:Identifier
5574
] ;

mappings/package_can_v1.12/transformation/mappings/ChangeInformation.rml.ttl

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ tedm:MG-ChangeInformation_ND-ChangeReason a rr:TriplesMap ;
9090
rr:parent "path(.)";
9191
];
9292
] ;
93-
] ;
93+
] ;
9494
.
9595

9696
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
@@ -105,7 +105,7 @@ tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
105105
rr:subjectMap
106106
[
107107
rdfs:label "ND-Change";
108-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(..)) || '?response_type=raw')}" ;
108+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if(exists(../efac:Change[2])) then path() else path(..)) || '?response_type=raw')}" ;
109109
rr:class epo:ChangeInformation
110110
] ;
111111
# rr:predicateObjectMap
@@ -153,7 +153,29 @@ tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
153153
rml:reference "efbc:ProcurementDocumentsChangeDate";
154154
rr:datatype xsd:date ;
155155
] ;
156-
]
156+
] ;
157+
rr:predicateObjectMap
158+
[
159+
rdfs:label "ND-Changes";
160+
rr:predicate epo:concernsNotice ;
161+
rr:objectMap
162+
[
163+
rr:parentTriplesMap tedm:MG-Notice_ND-Root ;
164+
] ;
165+
] ;
166+
rr:predicateObjectMap
167+
[
168+
rdfs:label "BT-758-notice";
169+
rr:predicate epo:refersToPreviousNotice ;
170+
rr:objectMap
171+
[
172+
rr:parentTriplesMap tedm:MG-Notice-refersToPreviousNotice-ChangeInformation_ND-Changes ;
173+
rr:joinCondition [
174+
rr:child "path(..)";
175+
rr:parent "path(.)";
176+
];
177+
] ;
178+
] ;
157179
.
158180

159181
tedm:MG-Identifier-identifier-Notice-refersToPreviousNotice-ChangeInformation_ND-Changes a rr:TriplesMap ;
@@ -241,7 +263,7 @@ tedm:MG-langString-hasChangeDescription-ChangeInformation_ND-Change a rr:Triples
241263
rr:subjectMap [
242264
rr:class epo-not:ChangeInformation ;
243265
rdfs:label "ND-Change" ;
244-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../..)) || '?response_type=raw')}" ;
266+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if(exists(../../efac:Change[2])) then path(..) else path(../..)) || '?response_type=raw')}" ;
245267
] ;
246268
rr:predicateObjectMap [
247269
rr:predicate epo-not:hasChangeDescription ;

mappings/package_can_v1.12/transformation/mappings/ChangeInformation_v1.7+.rml.ttl

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,32 @@
2424
@prefix idlab-fn: <http://example.com/idlab/function/> .
2525
@prefix tedm: <http://data.europa.eu/a4g/mapping/sf-rml/> .
2626

27-
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
27+
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
2828
rr:predicateObjectMap
2929
[
3030
rdfs:label "BT-13716-notice (object)";
3131
rr:predicate epo:relatesToEFormSectionIdentifier ;
3232
rr:objectMap
3333
[
34+
tedm:minSDKVersion "1.7" ;
35+
rr:parentTriplesMap tedm:MG-Identifier-relatesToEFormSectionIdentifier-ChangeInformation_ND-ChangedSection ;
36+
rr:joinCondition [
37+
rr:child "path(.)";
38+
rr:parent "path(..)";
39+
];
40+
] ;
41+
] ;
42+
.
43+
44+
tedm:MG-ChangeInformation_ND-ChangeReason a rr:TriplesMap ;
45+
rr:predicateObjectMap
46+
[
47+
rdfs:label "BT-13716-notice (object)";
48+
rr:predicate epo:relatesToEFormSectionIdentifier ;
49+
rr:objectMap
50+
[
51+
tedm:minSDKVersion "1.3" ;
52+
tedm:maxSDKVersion "1.6" ;
3453
rr:parentTriplesMap tedm:MG-Identifier-relatesToEFormSectionIdentifier-ChangeInformation_ND-ChangedSection ;
3554
rr:joinCondition [
3655
rr:child "path(.)";
@@ -49,7 +68,7 @@ tedm:MG-Identifier-relatesToEFormSectionIdentifier-ChangeInformation_ND-ChangedS
4968
];
5069
rr:subjectMap
5170
[
52-
rdfs:label "ND-Changes";
71+
rdfs:label "ND-ChangedSection";
5372
rml:reference "if (exists(efbc:ChangedSectionIdentifier)) then 'http://data.europa.eu/a4g/resource/id_' || replace(replace(../../efbc:ChangedNoticeIdentifier, ' ', '-' ), '/' , '-') || '_ChangedSectionIdentifier_' || unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path()) || '?response_type=raw') else null" ;
5473
rr:class adms:Identifier
5574
] ;

mappings/package_can_v1.13/transformation/mappings/ChangeInformation.rml.ttl

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ tedm:MG-ChangeInformation_ND-ChangeReason a rr:TriplesMap ;
9090
rr:parent "path(.)";
9191
];
9292
] ;
93-
] ;
93+
] ;
9494
.
9595

9696
tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
@@ -105,7 +105,7 @@ tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
105105
rr:subjectMap
106106
[
107107
rdfs:label "ND-Change";
108-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(..)) || '?response_type=raw')}" ;
108+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if(exists(../efac:Change[2])) then path() else path(..)) || '?response_type=raw')}" ;
109109
rr:class epo:ChangeInformation
110110
] ;
111111
# rr:predicateObjectMap
@@ -153,7 +153,29 @@ tedm:MG-ChangeInformation_ND-Change a rr:TriplesMap ;
153153
rml:reference "efbc:ProcurementDocumentsChangeDate";
154154
rr:datatype xsd:date ;
155155
] ;
156-
]
156+
] ;
157+
rr:predicateObjectMap
158+
[
159+
rdfs:label "ND-Changes";
160+
rr:predicate epo:concernsNotice ;
161+
rr:objectMap
162+
[
163+
rr:parentTriplesMap tedm:MG-Notice_ND-Root ;
164+
] ;
165+
] ;
166+
rr:predicateObjectMap
167+
[
168+
rdfs:label "BT-758-notice";
169+
rr:predicate epo:refersToPreviousNotice ;
170+
rr:objectMap
171+
[
172+
rr:parentTriplesMap tedm:MG-Notice-refersToPreviousNotice-ChangeInformation_ND-Changes ;
173+
rr:joinCondition [
174+
rr:child "path(..)";
175+
rr:parent "path(.)";
176+
];
177+
] ;
178+
] ;
157179
.
158180

159181
tedm:MG-Identifier-identifier-Notice-refersToPreviousNotice-ChangeInformation_ND-Changes a rr:TriplesMap ;
@@ -241,7 +263,7 @@ tedm:MG-langString-hasChangeDescription-ChangeInformation_ND-Change a rr:Triples
241263
rr:subjectMap [
242264
rr:class epo-not:ChangeInformation ;
243265
rdfs:label "ND-Change" ;
244-
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(path(../..)) || '?response_type=raw')}" ;
266+
rr:template "http://data.europa.eu/a4g/resource/id_{replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}_ChangeInformation_{unparsed-text('https://digest-api.ted-data.eu/api/v1/hashing/fn/uuid/' || encode-for-uri(if(exists(../../efac:Change[2])) then path(..) else path(../..)) || '?response_type=raw')}" ;
245267
] ;
246268
rr:predicateObjectMap [
247269
rr:predicate epo-not:hasChangeDescription ;

0 commit comments

Comments
 (0)