diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java index b325eac3653..2f8e69cc593 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java @@ -184,7 +184,7 @@ public class EnumTypes { .value("air", TransitMode.AIRPLANE) .value("bicycle", TraverseMode.BICYCLE) .value("bus", TransitMode.BUS) - .value("cableway", TransitMode.CABLE_CAR) + .value("cableway", TransitMode.GONDOLA) .value("water", TransitMode.FERRY) .value("funicular", TransitMode.FUNICULAR) .value("lift", TransitMode.GONDOLA) @@ -455,7 +455,7 @@ public class EnumTypes { .name("TransportMode") .value("air", TransitMode.AIRPLANE) .value("bus", TransitMode.BUS) - .value("cableway", TransitMode.CABLE_CAR) + .value("cableway", TransitMode.GONDOLA) .value("water", TransitMode.FERRY) .value("funicular", TransitMode.FUNICULAR) .value("lift", TransitMode.GONDOLA) diff --git a/application/src/main/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapper.java b/application/src/main/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapper.java index 22fbb1fca1c..b98ce0fd39f 100644 --- a/application/src/main/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapper.java +++ b/application/src/main/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapper.java @@ -29,7 +29,7 @@ private TransitMode mapVehicleMode(StopPlace stopPlace) { case AIR -> TransitMode.AIRPLANE; case BUS -> TransitMode.BUS; case TROLLEY_BUS -> TransitMode.TROLLEYBUS; - case CABLEWAY -> TransitMode.CABLE_CAR; + case CABLEWAY -> TransitMode.GONDOLA; case COACH -> TransitMode.COACH; case FUNICULAR -> TransitMode.FUNICULAR; case METRO -> TransitMode.SUBWAY; diff --git a/application/src/main/java/org/opentripplanner/netex/mapping/TransportModeMapper.java b/application/src/main/java/org/opentripplanner/netex/mapping/TransportModeMapper.java index 82a5f99c9c7..5db45f93c8d 100644 --- a/application/src/main/java/org/opentripplanner/netex/mapping/TransportModeMapper.java +++ b/application/src/main/java/org/opentripplanner/netex/mapping/TransportModeMapper.java @@ -32,7 +32,7 @@ public TransitMode mapAllVehicleModesOfTransport(AllVehicleModesOfTransportEnume return switch (mode) { case AIR -> TransitMode.AIRPLANE; case BUS -> TransitMode.BUS; - case CABLEWAY -> TransitMode.CABLE_CAR; + case CABLEWAY -> TransitMode.GONDOLA; case COACH -> TransitMode.COACH; case FUNICULAR -> TransitMode.FUNICULAR; case METRO -> TransitMode.SUBWAY; diff --git a/application/src/test/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapperTest.java b/application/src/test/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapperTest.java index cb9dabc911d..50e0f45929a 100644 --- a/application/src/test/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapperTest.java +++ b/application/src/test/java/org/opentripplanner/netex/mapping/StopPlaceTypeMapperTest.java @@ -30,6 +30,15 @@ void mapWithTransportModeOnly() { assertNull(transitMode.subMode()); } + @Test + void mapCableway() { + var transitMode = stopPlaceTypeMapper.map( + new StopPlace().withTransportMode(AllVehicleModesOfTransportEnumeration.CABLEWAY) + ); + assertEquals(TransitMode.GONDOLA, transitMode.mainMode()); + assertNull(transitMode.subMode()); + } + @Test void mapWithSubMode() { var transitMode = stopPlaceTypeMapper.map( diff --git a/application/src/test/java/org/opentripplanner/netex/mapping/TransportModeMapperTest.java b/application/src/test/java/org/opentripplanner/netex/mapping/TransportModeMapperTest.java index 5df2cc3dc05..11c41548a60 100644 --- a/application/src/test/java/org/opentripplanner/netex/mapping/TransportModeMapperTest.java +++ b/application/src/test/java/org/opentripplanner/netex/mapping/TransportModeMapperTest.java @@ -67,6 +67,13 @@ void mapWithTransportModeOnly() throws UnsupportedModeException { assertNull(transitMode.subMode()); } + @Test + void mapCableway() throws UnsupportedModeException { + var transitMode = transportModeMapper.map(AllVehicleModesOfTransportEnumeration.CABLEWAY, null); + assertEquals(TransitMode.GONDOLA, transitMode.mainMode()); + assertNull(transitMode.subMode()); + } + @Test void mapWithSubMode() throws UnsupportedModeException { var transitMode = transportModeMapper.map(