Skip to content

Commit 38a2245

Browse files
valexandeschivmeister
authored andcommitted
feat: reverting changes for ContractAmendment
1 parent 5eafb38 commit 38a2245

4 files changed

Lines changed: 250 additions & 209 deletions

File tree

src/mappings-can/ContractModificationInformation.rml.ttl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ tedm:MG-ContractAmendment-concernsContractAmendment-ContractModificationInformat
8181
rr:subjectMap
8282
[
8383
rdfs:label "ND-ModificationReason" ;
84-
# Avoid creating a type-only epo:ContractAmendment proxy.
85-
# Enable ONLY when this TriplesMap also maps at least one real ContractAmendment predicate.
86-
# (When you add such predicates, replace `false()` with `exists(<source field(s)>)`.)
87-
rml:reference "if (false()) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/ContractAmendment$' || replace(translate(path(..), concat(codepoints-to-string(123), codepoints-to-string(125), '/[]'), ' _'), 'Q .*? ', '') else null" ;
84+
rr:template "http://data.europa.eu/a4g/resource/{/*/cbc:ID[@schemeName='notice-id']}-{/*/cbc:VersionID}/ContractAmendment${replace(translate(path(..), concat(codepoints-to-string(123), codepoints-to-string(125), '/[]'), ' _'), 'Q .*? ', '')}" ;
8885
rr:class epo-con:ContractAmendment
8986
] ;
9087
.

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,7 @@ tedm:MG-ContractAmendment-announcesContractAmendment-ContractModificationNotice_
195195
rr:subjectMap
196196
[
197197
rdfs:label "ND-ContractModification" ;
198-
# Avoid creating a type-only epo:ContractAmendment proxy.
199-
# Enable ONLY when this TriplesMap also maps at least one real ContractAmendment predicate.
200-
# (When you add such predicates, replace `false()` with `exists(<source field(s)>)`.)
201-
rml:reference "if (false()) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/ContractAmendment$' || replace(translate(path(.), concat(codepoints-to-string(123), codepoints-to-string(125), '/[]'), ' _'), 'Q .*? ', '') else null" ;
198+
rr:template "http://data.europa.eu/a4g/resource/{/*/cbc:ID[@schemeName='notice-id']}-{/*/cbc:VersionID}/ContractAmendment${replace(translate(path(.), concat(codepoints-to-string(123), codepoints-to-string(125), '/[]'), ' _'), 'Q .*? ', '')}" ;
202199
rr:class epo-con:ContractAmendment
203200
] ;
204201
.
@@ -208,9 +205,7 @@ tedm:MG-ContractAmendment_ND-ContractModification a rr:TriplesMap ;
208205
rml:logicalSource
209206
[
210207
rml:source "data/source.xml" ;
211-
# This mapping only produces a real predicate (epo:amendsContract) from SDK v1.11 onwards.
212-
# Prevent type-only ContractAmendment instances by not iterating for earlier SDKs.
213-
rml:iterator "if (xs:decimal(substring-after(/*/cbc:CustomizationID, 'eforms-sdk-')) >= 1.11) then /*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:ContractModification/efbc:ModifiedContractIdentifier else null" ;
208+
rml:iterator "/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:ContractModification/efbc:ModifiedContractIdentifier" ;
214209
rml:referenceFormulation ql:XPath
215210
] ;
216211
rr:subjectMap

src/mappings-versioned/ContractModificationInformation-can_v1.3-1.6.rml.ttl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,7 @@ tedm:MG-ContractAmendment_ND-Modification a rr:TriplesMap ;
9797
rr:subjectMap
9898
[
9999
rdfs:label "ND-Modification" ;
100-
# Avoid type-only epo:ContractAmendment:
101-
# In SDK v1.3-1.6 this TriplesMap only produces epo:amendsContract, and only when the changed section identifier
102-
# starts with "CON". If it doesn't, we must not instantiate the subject.
103-
rml:reference "if (exists(efbc:ChangedSectionIdentifier) and starts-with(normalize-space(efbc:ChangedSectionIdentifier), 'CON')) then 'http://data.europa.eu/a4g/resource/' || /*/cbc:ID[@schemeName='notice-id'] || '-' || /*/cbc:VersionID || '/ContractAmendment$' || replace(translate(path(..), concat(codepoints-to-string(123), codepoints-to-string(125), '/[]'), ' _'), 'Q .*? ', '') else null" ;
100+
rr:template "http://data.europa.eu/a4g/resource/{/*/cbc:ID[@schemeName='notice-id']}-{/*/cbc:VersionID}/ContractAmendment${replace(translate(path(..), concat(codepoints-to-string(123), codepoints-to-string(125), '/[]'), ' _'), 'Q .*? ', '')}" ;
104101
rr:class epo-con:ContractAmendment
105102
] ;
106103
rr:predicateObjectMap

0 commit comments

Comments
 (0)