From 5503a521b1312e25e42c5dbdd96ff3b1c401315f Mon Sep 17 00:00:00 2001 From: Anna Tamm Date: Tue, 13 Aug 2024 15:58:17 +0200 Subject: [PATCH 1/4] refactor(df7_10): update Major Roads template schema Implement the changes to the DF7_10 Major Railways Excel template in the corresponding HSD JSON schema. SVC-1872 --- Schemas/DF7_10_Roads.hsd.json | 220 +++++++++++++++++++++++++++++++++- 1 file changed, 218 insertions(+), 2 deletions(-) diff --git a/Schemas/DF7_10_Roads.hsd.json b/Schemas/DF7_10_Roads.hsd.json index dcb6abf..dd86943 100644 --- a/Schemas/DF7_10_Roads.hsd.json +++ b/Schemas/DF7_10_Roads.hsd.json @@ -17,7 +17,15 @@ }, { "ref": 3, - "name": "NAP_MajorRoad" + "name": "NAP_MajorRoad_LAU" + }, + { + "ref": 13, + "name": "NAP_MajorRoad_NUTS" + }, + { + "ref": 14, + "name": "NAP_MajorRoad_Country" }, { "ref": 4, @@ -250,7 +258,7 @@ { "id": 3, "location": "file:/C:/Users/AnnaTamm/Box%20Sync/staff/Projects/2022-15%20UBA%20DE%20END%20II/Transformations/Roads/Noise%20action%20plan%20for%20major%20road%20(DF7_10)_schema.xlsx", - "name": "NAP_MajorRoad", + "name": "NAP_MajorRoad_LAU", "constraints": { "abstract": false, "has-value": false, @@ -288,6 +296,61 @@ }, { "name": "allInLAUCode", + "constraints": { + "cardinality": "1..1", + "nillable": false + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, + { + "name": "LAUCode", + "constraints": { + "cardinality": "1..1", + "nillable": false + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + } + ] + }, + { + "id": 13, + "location": "file:/home/flo/wetransform/support/RIVM/DF7_10/Noise%20action%20plan%20for%20major%20road%20(DF7_10).xlsx", + "name": "NAP_MajorRoad_NUTS", + "constraints": { + "abstract": false, + "has-value": false, + "mappable": true, + "mapping-relevant": true + }, + "declares": [ + { + "name": "actionPlanId_identifier", + "constraints": { + "cardinality": "1..1", + "nillable": true + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, + { + "name": "roadIdIdentifier", "constraints": { "cardinality": "1..1", "nillable": true @@ -314,6 +377,75 @@ } } }, + { + "name": "NUTSLevel", + "constraints": { + "cardinality": "1..1", + "nillable": false + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, + { + "name": "NUTSCode", + "constraints": { + "cardinality": "1..1", + "nillable": false + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + } + ] + }, + { + "id": 14, + "location": "file:/home/flo/wetransform/support/RIVM/DF7_10/Noise%20action%20plan%20for%20major%20road%20(DF7_10).xlsx", + "name": "NAP_MajorRoad_Country", + "constraints": { + "abstract": false, + "has-value": false, + "mappable": true, + "mapping-relevant": true + }, + "declares": [ + { + "name": "actionPlanId_identifier", + "constraints": { + "cardinality": "1..1", + "nillable": true + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, + { + "name": "roadIdIdentifier", + "constraints": { + "cardinality": "1..1", + "nillable": true + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, { "name": "allInCountry", "constraints": { @@ -327,6 +459,20 @@ "has-value": true } } + }, + { + "name": "countryCode", + "constraints": { + "cardinality": "1..1", + "nillable": false + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } } ] }, @@ -465,6 +611,20 @@ } } }, + { + "name": "ESTATUnitCode", + "constraints": { + "cardinality": "1..1", + "nillable": true + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, { "name": "roadIdIdentifier", "constraints": { @@ -576,6 +736,20 @@ } } }, + { + "name": "ESTATUnitCode", + "constraints": { + "cardinality": "1..1", + "nillable": true + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, { "name": "roadIdIdentifier", "constraints": { @@ -645,6 +819,20 @@ } } }, + { + "name": "ESTATUnitCode", + "constraints": { + "cardinality": "1..1", + "nillable": true + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, { "name": "roadIdIdentifier", "constraints": { @@ -756,6 +944,20 @@ } } }, + { + "name": "ESTATUnitCode", + "constraints": { + "cardinality": "1..1", + "nillable": true + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, { "name": "roadIdIdentifier", "constraints": { @@ -836,6 +1038,20 @@ } } }, + { + "name": "ESTATUnitCode", + "constraints": { + "cardinality": "1..1", + "nillable": true + }, + "propertyType": { + "name": "java.lang.String", + "constraints": { + "binding": "java.lang.String", + "has-value": true + } + } + }, { "name": "roadIdIdentifier", "constraints": { From a0228fa34b1df98cd2def1cb85a08b7da08ab5be Mon Sep 17 00:00:00 2001 From: Anna Tamm Date: Wed, 14 Aug 2024 14:57:33 +0200 Subject: [PATCH 2/4] feat(df7_10): implement check for max URL length Extend the `urlCheck` so that the maximum allowed length of a URL is checked. The maximum length is configurable via the project variable `MAX_URL_LENGTH`. SVC-1872 --- .../Agglomerations/DF7_10_Agglomerations_Aggregations.halex | 3 +++ Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex | 3 +++ Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex | 3 +++ Snippets/end.Checks.groovy | 3 ++- .../UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex | 3 +++ Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex | 3 +++ Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex | 3 +++ 7 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Aggregation/Agglomerations/DF7_10_Agglomerations_Aggregations.halex b/Aggregation/Agglomerations/DF7_10_Agglomerations_Aggregations.halex index 96df40b..ffc35fd 100644 --- a/Aggregation/Agglomerations/DF7_10_Agglomerations_Aggregations.halex +++ b/Aggregation/Agglomerations/DF7_10_Agglomerations_Aggregations.halex @@ -51,6 +51,9 @@ + + + diff --git a/Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex b/Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex index 042a35b..76c36fe 100644 --- a/Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex +++ b/Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex @@ -53,6 +53,9 @@ + + + diff --git a/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex b/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex index ecb9007..5377423 100644 --- a/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex +++ b/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex @@ -53,6 +53,9 @@ + + + diff --git a/Snippets/end.Checks.groovy b/Snippets/end.Checks.groovy index cb8435a..aaec355 100644 --- a/Snippets/end.Checks.groovy +++ b/Snippets/end.Checks.groovy @@ -467,10 +467,11 @@ def existsCheck(String codeMissing, String sheet, String field, boolean isWarnin generalCheck(null, codeMissing, sheet, field, null, exists(), null, isWarning) } -def urlCheck(String codeInvalid, String codeMissing, String sheet, String field, String mustStartWith = null, boolean isWarning = false) { +def urlCheck(String codeInvalid, String codeMissing, String sheet, String field, String mustStartWith = null, boolean isWarning = false, long maxLength = _project.vars.MAX_URL_LENGTH as long) { generalCheck(codeInvalid, codeMissing, sheet, field, 'is not a valid URL', mustStartWith ? isValidUrlThatStartsWith(mustStartWith) : isValidUrl(), null, isWarning) + && generalCheck('LEN', null, sheet, field, "is too long (max. allowed length is ${maxLength})", isNotTooLong(maxLength), null, isWarning) } def costCheck(String codeInvalid, String codeMissing, String sheet, String field, boolean isWarning = false) { diff --git a/Validation/Agglomerations/UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex b/Validation/Agglomerations/UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex index df0cdf0..cbbb024 100644 --- a/Validation/Agglomerations/UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex +++ b/Validation/Agglomerations/UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex @@ -171,6 +171,9 @@ + + + diff --git a/Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex b/Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex index 53bcc03..d771f5d 100644 --- a/Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex +++ b/Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex @@ -156,6 +156,9 @@ + + + diff --git a/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex b/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex index 47356d3..e483a32 100644 --- a/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex +++ b/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex @@ -156,6 +156,9 @@ + + + From 08c7285db7871dfcbacd76ca377a8ec09126b179 Mon Sep 17 00:00:00 2001 From: Anna Tamm Date: Wed, 14 Aug 2024 14:59:14 +0200 Subject: [PATCH 3/4] feat(df7_10): set freetext length limit to new value Previously the limit was set to 10.000 characters. EEA updated this limit to 4.000 characters. SVC-1872 --- .../Agglomerations/DF7_10_Agglomerations_Aggregations.halex | 2 +- Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex | 2 +- Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex | 2 +- .../UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex | 2 +- Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex | 2 +- Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Aggregation/Agglomerations/DF7_10_Agglomerations_Aggregations.halex b/Aggregation/Agglomerations/DF7_10_Agglomerations_Aggregations.halex index ffc35fd..1d1e6e6 100644 --- a/Aggregation/Agglomerations/DF7_10_Agglomerations_Aggregations.halex +++ b/Aggregation/Agglomerations/DF7_10_Agglomerations_Aggregations.halex @@ -49,7 +49,7 @@ - + diff --git a/Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex b/Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex index 76c36fe..d54d69c 100644 --- a/Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex +++ b/Aggregation/MajorRailways/DF7_10_Railway_Aggregations.halex @@ -51,7 +51,7 @@ - + diff --git a/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex b/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex index 5377423..d4c2ebc 100644 --- a/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex +++ b/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex @@ -51,7 +51,7 @@ - + diff --git a/Validation/Agglomerations/UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex b/Validation/Agglomerations/UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex index cbbb024..29fb8d7 100644 --- a/Validation/Agglomerations/UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex +++ b/Validation/Agglomerations/UBA-DE_AGG_to_END_DF7_10_Agglomerations.halex @@ -169,7 +169,7 @@ - + diff --git a/Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex b/Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex index d771f5d..caef457 100644 --- a/Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex +++ b/Validation/MajorRailway/UBA-DE_HES_to_END_DF7_10_Railway.halex @@ -154,7 +154,7 @@ - + diff --git a/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex b/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex index e483a32..f7153e2 100644 --- a/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex +++ b/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex @@ -154,7 +154,7 @@ - + From 8ae7bc622ffb9a3b3c3465e10a658614039c13a5 Mon Sep 17 00:00:00 2001 From: Anna Tamm Date: Thu, 15 Aug 2024 16:00:00 +0200 Subject: [PATCH 4/4] feat(df7_10): implement changes to Major Roads alignments Implement changes required by the change of the DF7_10 Major Roads Excel template. SVC-1872 --- .../DF7_10_Roads_Aggregations.halex | 6 +- ..._10_Roads_Aggregations.halex.alignment.xml | 139 ++++++++++++------ Snippets/end.Checks.groovy | 4 + .../UBA-DE_HVS_to_END_DF7_10_Roads.halex | 6 +- ...VS_to_END_DF7_10_Roads.halex.alignment.xml | 99 +++++++++---- 5 files changed, 172 insertions(+), 82 deletions(-) diff --git a/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex b/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex index d4c2ebc..1997a58 100644 --- a/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex +++ b/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex @@ -1,9 +1,9 @@ - + UBA END DF7_10 Roads Aggregation Anna Tamm (wetransform GmbH) 2023-12-01T14:09:27.647+01:00 - 2023-12-20T12:04:47.053+01:00 + 2024-08-15T15:57:56.402+02:00 UTF-8 false @@ -35,7 +35,7 @@ UTF-8 true - NoiseActionPlanMajorRoad,NAP_MajorRoad,NAP_MajorRoadCompetentAuthority,NAP_MajorRoadLimitValues,NAP_RoadMappingResultDetail,NAP_RoadReductionMeasure,NAP_RoadReductionHealthImpact_1,NAP_RoadReductionHealthImpact_2,NAP_RoadReductionHealthImpact_3,ESTATUnitReference,DatasetDefaultProperties,CodelistProperties + NoiseActionPlanMajorRoad,NAP_MajorRoad_LAU,NAP_MajorRoad_NUTS,NAP_MajorRoad_Country,NAP_MajorRoadCompetentAuthority,NAP_MajorRoadLimitValues,NAP_RoadMappingResultDetail,NAP_RoadReductionMeasure,NAP_RoadReductionHealthImpact_1,NAP_RoadReductionHealthImpact_2,NAP_RoadReductionHealthImpact_3,ESTATUnitReference,DatasetDefaultProperties,CodelistProperties eu.esdihumboldt.hale.io.xls.xlsx true diff --git a/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex.alignment.xml b/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex.alignment.xml index 2e3941b..0388d53 100644 --- a/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex.alignment.xml +++ b/Aggregation/MajorRoads/DF7_10_Roads_Aggregations.halex.alignment.xml @@ -25,6 +25,7 @@ codelistProperty('NAP_RoadMappingResultDetail', 'situationForImprovementPrioriti codelistProperty('NAP_RoadReductionMeasure', 'existingMeasure', 'http://dd.eionet.europa.eu/vocabulary/noise/RoadMeasureValue/') codelistProperty('NAP_RoadReductionMeasure', 'plannedMeasureDetail_plannedMeasure', 'http://dd.eionet.europa.eu/vocabulary/noise/RoadMeasureValue/') codelistProperty('NAP_RoadReductionMeasure', 'plannedMeasureDetail_measuresInCost', 'http://dd.eionet.europa.eu/vocabulary/noise/RoadMeasureValue/') +codelistProperty('NAP_MajorRoad_NUTS', 'NUTSLevel', 'http://dd.eionet.europa.eu/vocabulary/noise/ReportingLevelValue/') @@ -39,7 +40,6 @@ codelistProperty('NAP_RoadReductionMeasure', 'plannedMeasureDetail_measuresInCos // Check if any tables were present that are mandatory def expectedTypes = [ - 'NAP_MajorRoad':'TB53', 'NAP_MajorRoadCompetentAuthority':'TB59', 'NAP_MajorRoadLimitValues':'TB135', 'NAP_RoadMappingResultDetail':'TB65', @@ -92,131 +92,182 @@ _target { - + - + - + -def SHEET = 'NAP_MajorRoad' +def SHEET = 'NAP_MajorRoadCompetentAuthority' _snippets.end_Checks { registerType(SHEET) - uniqueCheck('TU104', SHEET, ['actionPlanId_identifier', 'roadIdIdentifier', 'allInLAUCode', 'allInNUTSCode', 'allInCountry']) - freetextCheck('LEN', 'FC96', SHEET, 'actionPlanId_identifier') - - codelistCheck('END_RT37', null, SHEET, 'allInLAUCode', CODELIST_LauIdValue(), true) - codelistCheck('END_RT38', null, SHEET, 'allInNUTSCode', CODELIST_NutsIdValue(), true) - - xorCheck('END_RC14', SHEET, ['allInCountry','allInLAUCode','allInNUTSCode','roadIdIdentifier'], 'Only one reference level is expected to be provided for each actionPlan: roadIdIdentifier, allInLAUCode, allInNUTSCode or allInCountry', exists()) -} - - + uniqueCheck('TU104', SHEET, ['actionPlanId_identifier', 'competentAuthorityIdIdentifier']) + freetextCheck('LEN', 'FC101', SHEET, 'actionPlanId_identifier') + freetextCheck('LEN', 'FC64', SHEET, 'competentAuthorityIdIdentifier') +} - + - + - + - + - + - + - -def SHEET = 'NAP_MajorRoadCompetentAuthority' +def SHEET = 'NAP_MajorRoadLimitValues' _snippets.end_Checks { registerType(SHEET) - uniqueCheck('TU104', SHEET, ['actionPlanId_identifier', 'competentAuthorityIdIdentifier']) - freetextCheck('LEN', 'FC101', SHEET, 'actionPlanId_identifier') - freetextCheck('LEN', 'FC64', SHEET, 'competentAuthorityIdIdentifier') + uniqueCheck('TU104', SHEET, 'actionPlanId_identifier') + freetextCheck('LEN', 'FC105', SHEET, 'actionPlanId_identifier') + + conditionalCheck('END_CT42', SHEET, 'limitValues_otherCriteriaLimitDetail', 'limitValues_otherCriteriaDescription') + conditionalCheck('END_CT44', SHEET, 'limitValues_otherCriteriaDescription', 'limitValues_otherCriteriaLimitDetail') + + conditionalCheck('END_CT38', SHEET, 'limitValues_noiseLimitReportIdIdentifier', 'limitValues_otherCriteriaLimitDetail', "If limitValues_noiseLimitReportIdIdentifier is not reported, limitValues_otherCriteriaLimitDetail has to be provided", isEmpty(), exists()) + conditionalCheck('END_CT40', SHEET, 'limitValues_otherCriteriaLimitDetail', 'limitValues_noiseLimitReportIdIdentifier', "If limitValues_otherCriteriaLimitDetail is not reported, limitValues_noiseLimitReportIdIdentifier has to be provided", isEmpty(), exists()) } - + - + - + - + - + - + -def SHEET = 'NAP_MajorRoadLimitValues' +def SHEET = 'NAP_MajorRoad_LAU' _snippets.end_Checks { - registerType(SHEET) - uniqueCheck('TU104', SHEET, 'actionPlanId_identifier') - freetextCheck('LEN', 'FC105', SHEET, 'actionPlanId_identifier') + freetextCheck('LEN', 'FC184', SHEET, 'actionPlanId_identifier') - conditionalCheck('END_CT42', SHEET, 'limitValues_otherCriteriaLimitDetail', 'limitValues_otherCriteriaDescription') - conditionalCheck('END_CT44', SHEET, 'limitValues_otherCriteriaDescription', 'limitValues_otherCriteriaLimitDetail') + codelistCheck('FT226', 'FC225', SHEET, 'allInLAUCode', CODELIST_Boolean()) + codelistCheck('END_FS_70', 'FC204', SHEET, 'LAUCode', CODELIST_LauIdValue()) - conditionalCheck('END_CT38', SHEET, 'limitValues_noiseLimitReportIdIdentifier', 'limitValues_otherCriteriaLimitDetail', "If limitValues_noiseLimitReportIdIdentifier is not reported, limitValues_otherCriteriaLimitDetail has to be provided", isEmpty(), exists()) - conditionalCheck('END_CT40', SHEET, 'limitValues_otherCriteriaLimitDetail', 'limitValues_noiseLimitReportIdIdentifier', "If limitValues_otherCriteriaLimitDetail is not reported, limitValues_noiseLimitReportIdIdentifier has to be provided", isEmpty(), exists()) -} + freetextCheck('END_FS_71', null, SHEET, 'roadIdIdentifier') + + conditionalCheck('END_CT72', SHEET, 'allInLAUCode', 'roadIdIdentifier', ['No']) +} + + + + + The cell's entities have been replaced, the new entities may have a different structure and/or names and may require updating the Groovy script accordingly + + + - + - + - + + + + + + + + + + + + + + + + + + + + +def SHEET = 'NAP_MajorRoad_NUTS' + +_snippets.end_Checks { + + freetextCheck('LEN', 'FC163', SHEET, 'actionPlanId_identifier') + + codelistCheck('FT220', 'FC219', SHEET, 'allInNUTSCode', CODELIST_Boolean()) + codelistCheck('END_FS_68', 'FC194', SHEET, 'NUTSCode', CODELIST_NutsIdValue()) + codelistCheck('TC234', 'FC233', SHEET, 'NUTSLevel', CODELIST_NutsLevelValue()) + + freetextCheck('END_FS_69', null, SHEET, 'roadIdIdentifier') + + conditionalCheck('END_CT73', SHEET, 'allInNUTSCode', 'roadIdIdentifier', ['No']) +} + + + + + + + + + + + + + diff --git a/Snippets/end.Checks.groovy b/Snippets/end.Checks.groovy index aaec355..a0944ec 100644 --- a/Snippets/end.Checks.groovy +++ b/Snippets/end.Checks.groovy @@ -343,6 +343,10 @@ def CODELIST_NutsIdValue() { ['DE', 'DE1', 'DE6', 'DE7', 'DE8', 'DE9', 'DEA', 'DEB', 'DEC', 'DED', 'DEE', 'DEF', 'DEG', 'DE2', 'DE3', 'DE4', 'DE5', 'DE11', 'DE12', 'DE13', 'DE14', 'DE21', 'DE22', 'DE23', 'DE24', 'DE25', 'DE26', 'DE27', 'DE30', 'DEC0', 'DED2', 'DED4', 'DED5', 'DEE0', 'DEF0', 'DEG0', 'DE40', 'DE50', 'DE60', 'DE71', 'DE72', 'DE73', 'DE80', 'DE91', 'DE92', 'DE93', 'DE94', 'DEA1', 'DEA2', 'DEA3', 'DEA4', 'DEA5', 'DEB1', 'DEB2', 'DEB3', 'DE254', 'DE255', 'DE256', 'DE257', 'DE258', 'DE259', 'DE25A', 'DE25B', 'DE25C', 'DE261', 'DE262', 'DE263', 'DE264', 'DE265', 'DE266', 'DE267', 'DE268', 'DE269', 'DE26A', 'DE26B', 'DE26C', 'DE271', 'DE272', 'DE273', 'DE274', 'DE111', 'DE112', 'DE113', 'DE114', 'DE115', 'DE116', 'DE117', 'DE118', 'DE119', 'DE11A', 'DE11B', 'DE11C', 'DE11D', 'DE121', 'DE122', 'DE123', 'DE124', 'DE125', 'DE126', 'DE234', 'DE235', 'DE236', 'DE237', 'DE238', 'DE239', 'DE23A', 'DE241', 'DE242', 'DE243', 'DE244', 'DE245', 'DE246', 'DE247', 'DE248', 'DE249', 'DE24A', 'DE24B', 'DE24C', 'DE24D', 'DE251', 'DE252', 'DE253', 'DEA16', 'DEA17', 'DEA18', 'DEA19', 'DEA1A', 'DEA1B', 'DE127', 'DE128', 'DE129', 'DE12A', 'DE12B', 'DE12C', 'DE131', 'DE132', 'DE133', 'DE134', 'DE135', 'DE136', 'DE137', 'DE138', 'DE139', 'DE13A', 'DE141', 'DE142', 'DE143', 'DE144', 'DE145', 'DE146', 'DE147', 'DE148', 'DE149', 'DE211', 'DE212', 'DE213', 'DE214', 'DE215', 'DE216', 'DE217', 'DE218', 'DE219', 'DE21A', 'DE21B', 'DE21C', 'DE21D', 'DE21E', 'DE21F', 'DE21G', 'DE21H', 'DE21I', 'DE21J', 'DE21K', 'DE21L', 'DE21M', 'DE21N', 'DE221', 'DE222', 'DE223', 'DE224', 'DE225', 'DE226', 'DE227', 'DE228', 'DE229', 'DE22A', 'DE22B', 'DE22C', 'DE231', 'DE232', 'DE233', 'DEE0B', 'DEE0C', 'DEE0D', 'DEE0E', 'DEF01', 'DEF02', 'DEF03', 'DEF04', 'DEF05', 'DED51', 'DED52', 'DED53', 'DEE01', 'DEE02', 'DEE03', 'DEE04', 'DEE05', 'DEE06', 'DEE07', 'DEE08', 'DEE09', 'DEE0A', 'DEF06', 'DEF07', 'DEF08', 'DEF09', 'DEF0A', 'DEF0B', 'DEF0C', 'DEF0D', 'DEF0E', 'DEF0F', 'DEG01', 'DEG02', 'DEG03', 'DEG04', 'DEG05', 'DEG06', 'DEG07', 'DEG09', 'DEG0A', 'DEG0B', 'DEG0C', 'DEG0D', 'DEG0E', 'DEG0F', 'DEG0G', 'DEG0H', 'DEG0I', 'DEG0J', 'DEG0K', 'DEG0L', 'DEG0M', 'DEG0N', 'DEG0P', 'DE943', 'DE944', 'DE945', 'DE946', 'DE947', 'DE948', 'DE949', 'DE94A', 'DE94B', 'DE94C', 'DE94D', 'DE94E', 'DE94F', 'DE94G', 'DE94H', 'DEA11', 'DEA12', 'DEA13', 'DEA14', 'DEA15', 'DEA1C', 'DEA1D', 'DEA1E', 'DEA1F', 'DEA22', 'DEA23', 'DEA24', 'DEA26', 'DEA27', 'DEA28', 'DEA29', 'DEA2A', 'DEA2B', 'DEA2C', 'DEA2D', 'DEA31', 'DEA32', 'DEA33', 'DEA34', 'DEA35', 'DEA36', 'DEA37', 'DEA38', 'DEA41', 'DEA42', 'DEA43', 'DEA44', 'DEA45', 'DEA46', 'DEA47', 'DEA51', 'DEA52', 'DEA53', 'DEA54', 'DEA55', 'DEA56', 'DEA57', 'DEA58', 'DEA59', 'DEA5A', 'DEA5B', 'DEA5C', 'DEB11', 'DEB12', 'DEB13', 'DEB14', 'DEB15', 'DEB17', 'DEB18', 'DEB1A', 'DEB1B', 'DEB1C', 'DEB1D', 'DEB21', 'DEB22', 'DEB23', 'DEB24', 'DEB25', 'DEB31', 'DEB32', 'DEB33', 'DEB34', 'DEB35', 'DEB36', 'DEB37', 'DEB38', 'DEB39', 'DEB3A', 'DEB3B', 'DEB3C', 'DEB3D', 'DEB3E', 'DEB3F', 'DEB3G', 'DEB3H', 'DEB3I', 'DEB3J', 'DEB3K', 'DEC01', 'DEC02', 'DEC03', 'DEC04', 'DEC05', 'DEC06', 'DED21', 'DED2C', 'DED2D', 'DED2E', 'DED2F', 'DED41', 'DED42', 'DED43', 'DED44', 'DED45', 'DE275', 'DE276', 'DE277', 'DE278', 'DE279', 'DE27A', 'DE27B', 'DE27C', 'DE27D', 'DE27E', 'DE300', 'DE401', 'DE402', 'DE403', 'DE404', 'DE405', 'DE406', 'DE407', 'DE408', 'DE409', 'DE40A', 'DE40B', 'DE40C', 'DE40D', 'DE40E', 'DE40F', 'DE40G', 'DE40H', 'DE40I', 'DE501', 'DE502', 'DE600', 'DE711', 'DE712', 'DE713', 'DE714', 'DE715', 'DE716', 'DE717', 'DE718', 'DE719', 'DE71A', 'DE71B', 'DE71C', 'DE71D', 'DE71E', 'DE721', 'DE722', 'DE723', 'DE724', 'DE725', 'DE731', 'DE732', 'DE733', 'DE734', 'DE735', 'DE736', 'DE737', 'DE803', 'DE804', 'DE80J', 'DE80K', 'DE80L', 'DE80M', 'DE80N', 'DE80O', 'DE911', 'DE912', 'DE913', 'DE914', 'DE916', 'DE917', 'DE918', 'DE91A', 'DE91B', 'DE91C', 'DE922', 'DE923', 'DE925', 'DE926', 'DE927', 'DE928', 'DE929', 'DE931', 'DE932', 'DE933', 'DE934', 'DE935', 'DE936', 'DE937', 'DE938', 'DE939', 'DE93A', 'DE93B', 'DE941', 'DE942'] } +def CODELIST_NutsLevelValue() { + ['NUTS1', 'NUTS2', 'NUTS3'] +} + def prefixListItems(list, prefix) { list.collect { "${prefix}${it}" as String } } diff --git a/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex b/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex index f7153e2..5fc4f91 100644 --- a/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex +++ b/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex @@ -1,9 +1,9 @@ - + UBA HVS nach END DF7_10 Roads Anna Tamm (wetransform GmbH) 2023-11-15T16:11:09.513+01:00 - 2023-12-06T17:32:03.124+01:00 + 2024-08-14T15:02:15.720+02:00 UTF-8 false @@ -141,7 +141,7 @@ UTF-8 true - NoiseActionPlanMajorRoad,NAP_MajorRoad,NAP_MajorRoadCompetentAuthority,NAP_MajorRoadLimitValues,NAP_RoadMappingResultDetail,NAP_RoadReductionMeasure,NAP_RoadReductionHealthImpact_1,NAP_RoadReductionHealthImpact_2,NAP_RoadReductionHealthImpact_3,ESTATUnitReference,DatasetDefaultProperties,CodelistProperties + NoiseActionPlanMajorRoad,NAP_MajorRoad_LAU,NAP_MajorRoad_NUTS,NAP_MajorRoad_Country,NAP_MajorRoadCompetentAuthority,NAP_MajorRoadLimitValues,NAP_RoadMappingResultDetail,NAP_RoadReductionMeasure,NAP_RoadReductionHealthImpact_1,NAP_RoadReductionHealthImpact_2,NAP_RoadReductionHealthImpact_3,ESTATUnitReference,DatasetDefaultProperties,CodelistProperties eu.esdihumboldt.hale.io.xls.xlsx true diff --git a/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex.alignment.xml b/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex.alignment.xml index 83fe9ba..e8db2e0 100644 --- a/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex.alignment.xml +++ b/Validation/MajorRoads/UBA-DE_HVS_to_END_DF7_10_Roads.halex.alignment.xml @@ -1,44 +1,29 @@ - + - + withTransformationContext { def c = _.context.collector(it) - + _target { actionPlanId_identifier( c.Allgemeines.kennungPlan.value() ) - def ags_rs = c.Allgemeines.ags_rs.value() - switch (ags_rs.length()) { - case 3: - // get NUTS code for RS of Regierungsbezirk like classified in lookup-table 'RB-RS_zu_NUTSCode' - nuts = _snippets.helperFunctions.getLookupTableValue(ags_rs, 'ce7f4ce5-ceb6-47ef-bb9d-b79c930792c4') - allInNUTSCode( nuts ) - break - case 8: - // AGS of Gemeinde is equivalent to LAU code - allInLAUCode( ags_rs ) - break - case 9: - // get LAU codes for RS of Amt (MV) or Verbandsgemeinde like classified in lookup-table 'VWG-RS_zu_LAUCodes' - lau = _snippets.helperFunctions.getLookupTableValue(ags_rs, 'b5e5b305-6d74-4790-89a7-3a222924e400') - allInLAUCode( lau ) - break - } + competentAuthorityIdIdentifier( c.Allgemeines.kennungBehoerde.value() ) } -} +} + - + - + @@ -48,17 +33,17 @@ withTransformationContext { _target { actionPlanId_identifier( c.Allgemeines.kennungPlan.value() ) - competentAuthorityIdIdentifier( c.Allgemeines.kennungBehoerde.value() ) + limitValues_otherCriteriaDescription( c.Allgemeines.infoGrenzwert.value() ) + limitValues_noiseLimitReportIdIdentifier( 'LR_DE_00_1' ) } -} - +} - + - + @@ -66,12 +51,62 @@ withTransformationContext { withTransformationContext { def c = _.context.collector(it) - _target { - actionPlanId_identifier( c.Allgemeines.kennungPlan.value() ) - limitValues_otherCriteriaDescription( c.Allgemeines.infoGrenzwert.value() ) - limitValues_noiseLimitReportIdIdentifier( 'LR_DE_00_1' ) + def ags_rs = c.Allgemeines.ags_rs.value() + + switch (ags_rs.length()) { + case 8: + // AGS of Gemeinde is equivalent to LAU code + _target { + actionPlanId_identifier( c.Allgemeines.kennungPlan.value() ) + allInLAUCode( 'Yes' ) + LAUCode( ags_rs ) + } + break + case 9: + // get LAU codes for RS of Amt (MV) or Verbandsgemeinde like classified in lookup-table 'VWG-RS_zu_LAUCodes' + def lau = _snippets.helperFunctions.getLookupTableValue(ags_rs, 'b5e5b305-6d74-4790-89a7-3a222924e400') + _target { + actionPlanId_identifier( c.Allgemeines.kennungPlan.value() ) + allInLAUCode( 'Yes' ) + LAUCode( lau ) + } + break } } + + + + + + The cell's entities have been replaced, the new entities may have a different structure and/or names and may require updating the Groovy script accordingly + + + + + + + + + + + + +withTransformationContext { + def c = _.context.collector(it) + + def ags_rs = c.Allgemeines.ags_rs.value() + if (ags_rs.length() == 3) { + // get NUTS code for RS of Regierungsbezirk like classified in lookup-table 'RB-RS_zu_NUTSCode' + nuts = _snippets.helperFunctions.getLookupTableValue(ags_rs, 'ce7f4ce5-ceb6-47ef-bb9d-b79c930792c4') + _target { + actionPlanId_identifier( c.Allgemeines.kennungPlan.value() ) + allInNUTSCode( 'Yes' ) + NUTSCode( nuts ) + NUTSLevel ( 'NUTS2' ) + } + } +} +