org.opentripplanner.netex.mapping.TripServiceAlterationMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.netex.mapping;
import org.opentripplanner.transit.model.timetable.TripAlteration;
import org.rutebanken.netex.model.ServiceAlterationEnumeration;
public class TripServiceAlterationMapper {
public static TripAlteration mapAlteration(ServiceAlterationEnumeration netexValue) {
if (netexValue == null) {
return TripAlteration.PLANNED;
}
return switch (netexValue) {
case PLANNED -> TripAlteration.PLANNED;
case CANCELLATION -> TripAlteration.CANCELLATION;
case REPLACED -> TripAlteration.REPLACED;
case EXTRA_JOURNEY -> TripAlteration.EXTRA_JOURNEY;
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy