All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.standalone.config.updaters.VehicleRentalUpdaterConfig Maven / Gradle / Ivy

package org.opentripplanner.standalone.config.updaters;

import org.opentripplanner.standalone.config.NodeAdapter;
import org.opentripplanner.standalone.config.updaters.sources.VehicleRentalSourceFactory;
import org.opentripplanner.updater.vehicle_rental.VehicleRentalUpdaterParameters;

public class VehicleRentalUpdaterConfig {

  public static VehicleRentalUpdaterParameters create(String configRef, NodeAdapter c) {
    String sourceType = c.asText("sourceType");
    return new VehicleRentalUpdaterParameters(
        configRef + "." + sourceType,
        c.asInt("frequencySec", 60),
        VehicleRentalSourceFactory.create(sourceType, c)
    );
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy