Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the NeTEx mapping of "cableway" to GONDOLA #6174

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading