
org.opentripplanner.updater.vehicle_parking.AvailabilityDatasourceFactory 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
The newest version!
package org.opentripplanner.updater.vehicle_parking;
import org.opentripplanner.ext.vehicleparking.sirifm.SiriFmDatasource;
import org.opentripplanner.ext.vehicleparking.sirifm.SiriFmUpdaterParameters;
import org.opentripplanner.updater.spi.DataSource;
/**
* Class that can be used to return a custom vehicle parking {@link DataSource}.
*/
public class AvailabilityDatasourceFactory {
public static DataSource create(VehicleParkingUpdaterParameters parameters) {
return switch (parameters.sourceType()) {
case SIRI_FM -> new SiriFmDatasource((SiriFmUpdaterParameters) parameters);
case PARK_API,
BICYCLE_PARK_API,
HSL_PARK,
BIKEEP,
NOI_OPEN_DATA_HUB,
BIKELY -> throw new IllegalArgumentException("Cannot instantiate SIRI-FM data source");
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy