Class DefaultGtfsServiceRepository

java.lang.Object
org.entur.netex.gtfs.export.producer.DefaultGtfsServiceRepository
All Implemented Interfaces:
GtfsServiceRepository

public class DefaultGtfsServiceRepository extends Object implements 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 Details

  • Method Details

    • getAllServices

      public Collection<GtfsService> getAllServices()
      Description copied from interface: GtfsServiceRepository
      Return the list of services.
      Specified by:
      getAllServices in interface GtfsServiceRepository
      Returns:
      the list of services.
    • getServiceForDayTypes

      public GtfsService getServiceForDayTypes(Set<org.rutebanken.netex.model.DayType> dayTypes)
      Description copied from interface: GtfsServiceRepository
      Create 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:
      getServiceForDayTypes in interface GtfsServiceRepository
      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: GtfsServiceRepository
      Create 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:
      getServiceForOperatingDays in interface GtfsServiceRepository
      Parameters:
      operatingDays - the set of NeTEx OperatingDays.
      Returns:
      the GTFS service for this set of OperatingDays.