org.opentripplanner.netex.mapping.StopTransferPriorityMapper 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 javax.annotation.Nullable;
import org.opentripplanner.transit.model.site.StopTransferPriority;
import org.rutebanken.netex.model.InterchangeWeightingEnumeration;
class StopTransferPriorityMapper {
@Nullable
static StopTransferPriority mapToDomain(InterchangeWeightingEnumeration value) {
if (value == null) {
return null;
}
switch (value) {
case NO_INTERCHANGE:
return StopTransferPriority.DISCOURAGED;
case INTERCHANGE_ALLOWED:
return StopTransferPriority.ALLOWED;
case PREFERRED_INTERCHANGE:
return StopTransferPriority.PREFERRED;
case RECOMMENDED_INTERCHANGE:
return StopTransferPriority.RECOMMENDED;
}
throw new IllegalArgumentException("Unsupported interchange weight: " + value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy