public class DefaultFareServiceFactory extends Object implements FareServiceFactory
Modifier and Type | Field and Description |
---|---|
protected Map<FeedScopedId,FareRuleSet> |
regularFareRules |
Constructor and Description |
---|
DefaultFareServiceFactory() |
Modifier and Type | Method and Description |
---|---|
void |
configure(com.fasterxml.jackson.databind.JsonNode config) |
protected void |
fillFareRules(String agencyId,
Collection<FareAttribute> fareAttributes,
Collection<FareRule> fareRules,
Map<FeedScopedId,FareRuleSet> fareRuleSet) |
static FareServiceFactory |
fromConfig(com.fasterxml.jackson.databind.JsonNode config)
Build a specific FareServiceFactory given the config node, or fallback to the default if none
specified.
|
FareService |
makeFareService() |
void |
processGtfs(OtpTransitService transitService) |
String |
toString() |
protected Map<FeedScopedId,FareRuleSet> regularFareRules
public FareService makeFareService()
makeFareService
in interface FareServiceFactory
public void processGtfs(OtpTransitService transitService)
processGtfs
in interface FareServiceFactory
protected void fillFareRules(String agencyId, Collection<FareAttribute> fareAttributes, Collection<FareRule> fareRules, Map<FeedScopedId,FareRuleSet> fareRuleSet)
public void configure(com.fasterxml.jackson.databind.JsonNode config)
configure
in interface FareServiceFactory
public static FareServiceFactory fromConfig(com.fasterxml.jackson.databind.JsonNode config)
{ fares : "seattle" } -------------------------- { fares : {} } // Fallback to default -------------------------- { fares : { type : "foobar", param1 : 42 } } -------------------------- { fares : { combinationStrategy : "additive", fares : [ "seattle", { type : "foobar", ... } ] } }
Copyright © 2019. All rights reserved.