
org.opentripplanner.ext.fares.impl.OrcaFareFactory 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.ext.fares.impl;
import com.fasterxml.jackson.databind.JsonNode;
import java.util.HashMap;
import java.util.Map;
import org.opentripplanner.ext.fares.model.FareRuleSet;
import org.opentripplanner.ext.fares.model.FareRulesData;
import org.opentripplanner.model.OtpTransitService;
import org.opentripplanner.routing.fares.FareService;
import org.opentripplanner.transit.model.framework.FeedScopedId;
public class OrcaFareFactory extends DefaultFareServiceFactory {
protected Map regularFareRules = new HashMap<>();
@Override
public FareService makeFareService() {
return new OrcaFareService(regularFareRules.values());
}
/**
* This step ensures that the fares in the source GTFS data are accounted for correctly.
*/
@Override
public void processGtfs(FareRulesData fareRuleService, OtpTransitService transitService) {
fillFareRules(fareRuleService.fareAttributes(), fareRuleService.fareRules(), regularFareRules);
}
/**
* There is no configuration code in DefaultFareServiceFactory. We override the super class's method just in case it changes.
*/
@Override
public void configure(JsonNode config) {
// No configuration at the moment.
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy