From d87022c6156dd8373a8c528ac9c6fa356aaf547f Mon Sep 17 00:00:00 2001 From: Vincent Paturet <46598384+vpaturet@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:25:51 +0200 Subject: [PATCH] Remove custom transport mode rule for Sweden (#577) --- ...etableDataSwedenValidationTreeFactory.java | 14 --------- .../SwedenValidateAllowedTransportMode.java | 29 ------------------- 2 files changed, 43 deletions(-) delete mode 100644 src/main/java/no/entur/antu/sweden/validator/SwedenValidateAllowedTransportMode.java diff --git a/src/main/java/no/entur/antu/sweden/validator/EnturTimetableDataSwedenValidationTreeFactory.java b/src/main/java/no/entur/antu/sweden/validator/EnturTimetableDataSwedenValidationTreeFactory.java index fbc93b64..69f4630f 100644 --- a/src/main/java/no/entur/antu/sweden/validator/EnturTimetableDataSwedenValidationTreeFactory.java +++ b/src/main/java/no/entur/antu/sweden/validator/EnturTimetableDataSwedenValidationTreeFactory.java @@ -81,20 +81,6 @@ protected List getCompositeFrameBaseValidationRules() { return compositeFrameBaseValidationRules; } - @Override - protected ValidationTree getServiceFrameValidationTreeForLineFile( - String path - ) { - ValidationTree serviceFrameValidationTree = - super.getServiceFrameValidationTreeForLineFile(path); - // use valid transport mode for swedish data - serviceFrameValidationTree.removeValidationRule("TRANSPORT_MODE"); - serviceFrameValidationTree.addValidationRule( - new SwedenValidateAllowedTransportMode() - ); - return serviceFrameValidationTree; - } - @Override protected ValidationTree getResourceFrameValidationTree(String path) { ValidationTree resourceFrameValidationTree = diff --git a/src/main/java/no/entur/antu/sweden/validator/SwedenValidateAllowedTransportMode.java b/src/main/java/no/entur/antu/sweden/validator/SwedenValidateAllowedTransportMode.java deleted file mode 100644 index 5e5fd238..00000000 --- a/src/main/java/no/entur/antu/sweden/validator/SwedenValidateAllowedTransportMode.java +++ /dev/null @@ -1,29 +0,0 @@ -package no.entur.antu.sweden.validator; - -import org.entur.netex.validation.validator.xpath.rules.ValidatedAllowedTransportMode; - -public class SwedenValidateAllowedTransportMode - extends ValidatedAllowedTransportMode { - - private static final String SWEDEN_VALID_TRANSPORT_MODES = - "'" + - String.join( - "','", - "coach", - "bus", - "tram", - "rail", - "metro", - "air", - "water", - "cableway", - "funicular", - "taxi", - "unknown" - ) + - "'"; - - public SwedenValidateAllowedTransportMode() { - super(SWEDEN_VALID_TRANSPORT_MODES); - } -}