public class DefaultFareServiceFactory extends Object implements FareServiceFactory
| Modifier and Type | Field and Description |
|---|---|
protected Map<org.onebusaway.gtfs.model.AgencyAndId,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<org.onebusaway.gtfs.model.FareAttribute> fareAttributes,
Collection<org.onebusaway.gtfs.model.FareRule> fareRules,
Map<org.onebusaway.gtfs.model.AgencyAndId,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(org.onebusaway.gtfs.services.GtfsRelationalDao dao) |
String |
toString() |
protected Map<org.onebusaway.gtfs.model.AgencyAndId,FareRuleSet> regularFareRules
public FareService makeFareService()
makeFareService in interface FareServiceFactorypublic void processGtfs(org.onebusaway.gtfs.services.GtfsRelationalDao dao)
processGtfs in interface FareServiceFactoryprotected void fillFareRules(String agencyId, Collection<org.onebusaway.gtfs.model.FareAttribute> fareAttributes, Collection<org.onebusaway.gtfs.model.FareRule> fareRules, Map<org.onebusaway.gtfs.model.AgencyAndId,FareRuleSet> fareRuleSet)
public void configure(com.fasterxml.jackson.databind.JsonNode config)
configure in interface FareServiceFactorypublic 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 © 2018. All rights reserved.