Module org.entur.netex.gtfs.export
Class DefaultGtfsServiceRepository
java.lang.Object
org.entur.netex.gtfs.export.producer.DefaultGtfsServiceRepository
- All Implemented Interfaces:
GtfsServiceRepository
Create and store the GTFS services for the current dataset.
GTFS services are created while iterating through ServiceJourneys and DatedServiceJourneys.
The GTFS services are de-duplicated by creating a unique ID per set of DayTypes (trips based on ServiceJourneys) or set of OperatingDays (trips based on DatedServiceJourneys)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultGtfsServiceRepository(String codespace, NetexDatasetRepository netexDatasetRepository) -
Method Summary
Modifier and TypeMethodDescriptionReturn the list of services.getServiceForDayTypes(Set<org.rutebanken.netex.model.DayType> dayTypes) Create or retrieve the GTFS service corresponding to a set of DayTypes.getServiceForOperatingDays(Set<org.rutebanken.netex.model.OperatingDay> operatingDays) Create or retrieve the GTFS service corresponding to a set of OperatingDays.
-
Constructor Details
-
DefaultGtfsServiceRepository
public DefaultGtfsServiceRepository(String codespace, NetexDatasetRepository netexDatasetRepository)
-
-
Method Details
-
getAllServices
Description copied from interface:GtfsServiceRepositoryReturn the list of services.- Specified by:
getAllServicesin interfaceGtfsServiceRepository- Returns:
- the list of services.
-
getServiceForDayTypes
Description copied from interface:GtfsServiceRepositoryCreate or retrieve the GTFS service corresponding to a set of DayTypes. Multiple calls to this method with the same set of day types return the same object. GTFS services based on day types are used for producing trips from ServiceJourneys (not DatedServiceJourneys).- Specified by:
getServiceForDayTypesin interfaceGtfsServiceRepository- Parameters:
dayTypes- the set of NeTEx DayTypes.- Returns:
- the GTFS service for this set of DayTypes.
-
getServiceForOperatingDays
public GtfsService getServiceForOperatingDays(Set<org.rutebanken.netex.model.OperatingDay> operatingDays) Description copied from interface:GtfsServiceRepositoryCreate or retrieve the GTFS service corresponding to a set of OperatingDays. Multiple calls to this method with the same set of operating days return the same object. GTFS services based on operating days are used for producing trips from DatedServiceJourneys.- Specified by:
getServiceForOperatingDaysin interfaceGtfsServiceRepository- Parameters:
operatingDays- the set of NeTEx OperatingDays.- Returns:
- the GTFS service for this set of OperatingDays.
-