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