Package org.onebusaway.gtfs.impl
Class GtfsDataServiceImpl
java.lang.Object
org.onebusaway.gtfs.impl.GtfsDataServiceImpl
- All Implemented Interfaces:
CalendarService,GenericDao,GtfsDao,GtfsDataService,GtfsRelationalDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMetadata(String filename, String content) getAgencyForId(String id) Agency MethodsAreaMethodsServiceCalendarDateMethodsServiceCalendarMethods<T> Collection<T> getAllEntitiesForType(Class<T> type) Generic MethodsFareAttributeMethodsFareLegRuleMethodsFareMediumMethodsFareProductMethodsFareRuleMethodsFareTransferRuleMethodsFeedInfoMethodsFrequencyMethodsNetworkMethodsPathwayMethodsRiderCategoryMethodsRouteMethodsServiceCalendarMethodsShapePointMethodsShapePointMethodsStopMethodsStopTimeMethodsTransferMethodsTranslationMethodsTripMethodsVehicleMethodsgetBlockForId(int id) getCalendarDateForId(int id) getCalendarDatesForServiceId(AgencyAndId serviceId) ServiceCalendarDateMethodsgetCalendarForId(int id) getCalendarForServiceId(AgencyAndId serviceId) getDatesForLocalizedServiceId(LocalizedServiceId localizedServiceId) <T> TgetEntityForId(Class<T> type, Serializable id) getFareRuleForId(int id) getFareRulesForFareAttribute(FareAttribute fareAttribute) getFareRulesForRoute(Route route) getFareRulesForZoneId(String zoneId) getFrequenciesForTrip(Trip trip) FrequencyMethodsgetFrequencyForId(int id) getLocalizedServiceIdForAgencyAndServiceId(String agencyId, AgencyAndId serviceId) Given an agency id and a service id, we return aLocalizedServiceIdwhich is just a service id with timezone information attached.getMetadata(String filename) getNextDepartureServiceDates(LocalizedServiceId serviceId, ServiceInterval interval, long targetTime) Computes the list of service dates whose departure service interval (min to max departure time) overlaps the specified target time.getNextDepartureServiceDates(ServiceIdIntervals serviceIdIntervals, long targetTime) See the description forCalendarService.getNextDepartureServiceDates(LocalizedServiceId, ServiceInterval, long).getPreviousArrivalServiceDates(LocalizedServiceId serviceId, ServiceInterval interval, long targetTime) Computes the list of service dates whose arrival service interval (min to max departure time) overlaps the specified target time.getPreviousArrivalServiceDates(ServiceIdIntervals serviceIdIntervals, long targetTime) See the description forCalendarService.getPreviousArrivalServiceDates(LocalizedServiceId, ServiceInterval, long).getRidershipForTrip(AgencyAndId tripId) getRoutesForAgency(Agency agency) Route MethodsgetServiceDateArrivalsWithinRange(LocalizedServiceId serviceId, ServiceInterval interval, Date from, Date to) See the description fromCalendarService.getServiceDatesWithinRange(LocalizedServiceId, ServiceInterval, Date, Date).getServiceDateArrivalsWithinRange(ServiceIdIntervals serviceIdIntervals, Date from, Date to) See the description fromCalendarService.getServiceDateArrivalsWithinRange(LocalizedServiceId, ServiceInterval, Date, Date).getServiceDateDeparturesWithinRange(LocalizedServiceId serviceId, ServiceInterval interval, Date from, Date to) See the description fromCalendarService.getServiceDatesWithinRange(LocalizedServiceId, ServiceInterval, Date, Date).getServiceDateDeparturesWithinRange(ServiceIdIntervals serviceIdIntervals, Date from, Date to) See the description fromCalendarService.getServiceDateDeparturesWithinRange(LocalizedServiceId, ServiceInterval, Date, Date).getServiceDatesForServiceId(AgencyAndId serviceId) getServiceDatesWithinRange(LocalizedServiceId serviceId, ServiceInterval interval, Date from, Date to) Given the specified localized service id, which has a corresponding set of localized service dates, determine the sublist of service dates that, when extended with the specifiedServiceInterval, overlap with the specified from-to time range.getServiceDatesWithinRange(ServiceIdIntervals serviceIdIntervals, Date from, Date to) See the description fromCalendarService.getServiceDatesWithinRange(LocalizedServiceId, ServiceInterval, Date, Date).Determine the set of service ids that are active on the specified service date.getShapePointForId(int id) getShapePointsForShapeId(AgencyAndId shapeId) getStopsForStation(Stop station) Stop MethodsgetStopsForZoneId(String zoneId) getStopTimeForId(int id) getStopTimesForStop(Stop stop) getStopTimesForTrip(Trip trip) getTimeZoneForAgencyId(String agencyId) Returns the instantiatedTimeZonefor the specified agency idgetTransferForId(int id) getTripAgencyIdsReferencingServiceId(AgencyAndId serviceId) ServiceId MethodsgetTripsForBlockId(AgencyAndId blockId) getTripsForRoute(Route route) TripMethodsgetTripsForServiceId(AgencyAndId serviceId) getTripsForShapeId(AgencyAndId shapeId) VehicleMethodsbooleanhasMetadata(String filename) booleanisLocalizedServiceIdActiveInRange(LocalizedServiceId serviceId, ServiceInterval scheduledService, AgencyServiceInterval serviceInterval) booleanisLocalizedServiceIdActiveOnDate(LocalizedServiceId localizedServiceId, Date serviceDate) voidsetData(CalendarServiceData data) Update the underlying data structures.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.onebusaway.gtfs.services.GtfsDao
hasFaresV1, hasFaresV2
-
Constructor Details
-
GtfsDataServiceImpl
public GtfsDataServiceImpl()
-
-
Method Details
-
setGtfsDao
-
getAllEntitiesForType
Description copied from interface:GenericDaoGeneric Methods- Specified by:
getAllEntitiesForTypein interfaceGenericDao
-
getEntityForId
- Specified by:
getEntityForIdin interfaceGenericDao
-
getAllAgencies
Description copied from interface:GtfsDaoAgency Methods- Specified by:
getAllAgenciesin interfaceGtfsDao
-
getAgencyForId
- Specified by:
getAgencyForIdin interfaceGtfsDao
-
getAllCalendars
Description copied from interface:GtfsDaoServiceCalendarMethods- Specified by:
getAllCalendarsin interfaceGtfsDao
-
getCalendarForId
- Specified by:
getCalendarForIdin interfaceGtfsDao
-
getAllCalendarDates
Description copied from interface:GtfsDaoServiceCalendarDateMethods- Specified by:
getAllCalendarDatesin interfaceGtfsDao
-
getCalendarDateForId
- Specified by:
getCalendarDateForIdin interfaceGtfsDao
-
getTripAgencyIdsReferencingServiceId
Description copied from interface:GtfsRelationalDaoServiceId Methods- Specified by:
getTripAgencyIdsReferencingServiceIdin interfaceGtfsRelationalDao
-
getAllFareAttributes
Description copied from interface:GtfsDaoFareAttributeMethods- Specified by:
getAllFareAttributesin interfaceGtfsDao
-
getAllFareProducts
Description copied from interface:GtfsDaoFareProductMethods- Specified by:
getAllFareProductsin interfaceGtfsDao- Specified by:
getAllFareProductsin interfaceGtfsDataService
-
getFareProductForId
- Specified by:
getFareProductForIdin interfaceGtfsDao
-
getAllFareMedia
Description copied from interface:GtfsDaoFareMediumMethods- Specified by:
getAllFareMediain interfaceGtfsDao
-
getAllRiderCategories
Description copied from interface:GtfsDaoRiderCategoryMethods- Specified by:
getAllRiderCategoriesin interfaceGtfsDao
-
getFareAttributeForId
- Specified by:
getFareAttributeForIdin interfaceGtfsDao
-
getAllFareLegRules
Description copied from interface:GtfsDaoFareLegRuleMethods- Specified by:
getAllFareLegRulesin interfaceGtfsDao
-
getRoutesForAgency
Description copied from interface:GtfsRelationalDaoRoute Methods- Specified by:
getRoutesForAgencyin interfaceGtfsRelationalDao
-
getAllFareRules
Description copied from interface:GtfsDaoFareRuleMethods- Specified by:
getAllFareRulesin interfaceGtfsDao
-
getStopsForStation
Description copied from interface:GtfsRelationalDaoStop Methods- Specified by:
getStopsForStationin interfaceGtfsRelationalDao
-
getStopsForZoneId
- Specified by:
getStopsForZoneIdin interfaceGtfsRelationalDao
-
getFareRuleForId
- Specified by:
getFareRuleForIdin interfaceGtfsDao
-
getAllFareTransferRules
Description copied from interface:GtfsDaoFareTransferRuleMethods- Specified by:
getAllFareTransferRulesin interfaceGtfsDao
-
getTripsForRoute
Description copied from interface:GtfsRelationalDaoTripMethods- Specified by:
getTripsForRoutein interfaceGtfsRelationalDao
-
getAllFeedInfos
Description copied from interface:GtfsDaoFeedInfoMethods- Specified by:
getAllFeedInfosin interfaceGtfsDao
-
getTripsForShapeId
- Specified by:
getTripsForShapeIdin interfaceGtfsRelationalDao
-
getFeedInfoForId
- Specified by:
getFeedInfoForIdin interfaceGtfsDao
-
getTripsForServiceId
- Specified by:
getTripsForServiceIdin interfaceGtfsRelationalDao
-
getTripsForBlockId
- Specified by:
getTripsForBlockIdin interfaceGtfsRelationalDao
-
getAllFrequencies
Description copied from interface:GtfsDaoFrequencyMethods- Specified by:
getAllFrequenciesin interfaceGtfsDao
-
getFrequencyForId
- Specified by:
getFrequencyForIdin interfaceGtfsDao
-
getAllPathways
Description copied from interface:GtfsDaoPathwayMethods- Specified by:
getAllPathwaysin interfaceGtfsDao
-
getPathwayForId
- Specified by:
getPathwayForIdin interfaceGtfsDao
-
getAllLevels
- Specified by:
getAllLevelsin interfaceGtfsDao
-
getLevelForId
- Specified by:
getLevelForIdin interfaceGtfsDao
-
getStopTimesForTrip
- Specified by:
getStopTimesForTripin interfaceGtfsRelationalDao- Returns:
- the list of
StopTimeobjects associated with the trip, sorted byStopTime.getStopSequence()
-
getAllRoutes
Description copied from interface:GtfsDaoRouteMethods- Specified by:
getAllRoutesin interfaceGtfsDao
-
getAllRouteStops
- Specified by:
getAllRouteStopsin interfaceGtfsDao
-
getAllRouteShapes
- Specified by:
getAllRouteShapesin interfaceGtfsDao
-
getRouteForId
- Specified by:
getRouteForIdin interfaceGtfsDao
-
getAllShapePoints
Description copied from interface:GtfsDaoShapePointMethods- Specified by:
getAllShapePointsin interfaceGtfsDao
-
getStopTimesForStop
- Specified by:
getStopTimesForStopin interfaceGtfsRelationalDao- Returns:
- the list of
StopTimeobjects associated with the specifiedStop, in no particular order
-
getShapePointForId
- Specified by:
getShapePointForIdin interfaceGtfsDao
-
getAllShapeIds
Description copied from interface:GtfsRelationalDaoShapePointMethods- Specified by:
getAllShapeIdsin interfaceGtfsRelationalDao
-
getAllStops
Description copied from interface:GtfsDaoStopMethods- Specified by:
getAllStopsin interfaceGtfsDao
-
getShapePointsForShapeId
- Specified by:
getShapePointsForShapeIdin interfaceGtfsRelationalDao
-
getStopForId
- Specified by:
getStopForIdin interfaceGtfsDao
-
getAllStopTimes
Description copied from interface:GtfsDaoStopTimeMethods- Specified by:
getAllStopTimesin interfaceGtfsDao
-
getFrequenciesForTrip
Description copied from interface:GtfsRelationalDaoFrequencyMethods- Specified by:
getFrequenciesForTripin interfaceGtfsRelationalDao
-
getStopTimeForId
- Specified by:
getStopTimeForIdin interfaceGtfsDao
-
getAllServiceIds
Description copied from interface:GtfsRelationalDaoServiceCalendarMethods- Specified by:
getAllServiceIdsin interfaceGtfsRelationalDao
-
getAllTransfers
Description copied from interface:GtfsDaoTransferMethods- Specified by:
getAllTransfersin interfaceGtfsDao
-
getCalendarForServiceId
- Specified by:
getCalendarForServiceIdin interfaceGtfsRelationalDao
-
getTransferForId
- Specified by:
getTransferForIdin interfaceGtfsDao
-
getAllTrips
Description copied from interface:GtfsDaoTripMethods- Specified by:
getAllTripsin interfaceGtfsDao
-
getTripForId
- Specified by:
getTripForIdin interfaceGtfsDao
-
getCalendarDatesForServiceId
Description copied from interface:GtfsRelationalDaoServiceCalendarDateMethods- Specified by:
getCalendarDatesForServiceIdin interfaceGtfsRelationalDao
-
getAllBlocks
- Specified by:
getAllBlocksin interfaceGtfsDao
-
getBlockForId
- Specified by:
getBlockForIdin interfaceGtfsDao
-
getFareRulesForFareAttribute
Description copied from interface:GtfsRelationalDao- Specified by:
getFareRulesForFareAttributein interfaceGtfsRelationalDao
-
getFareRulesForRoute
- Specified by:
getFareRulesForRoutein interfaceGtfsRelationalDao
-
getFareRulesForZoneId
- Specified by:
getFareRulesForZoneIdin interfaceGtfsRelationalDao
-
getAllRiderships
- Specified by:
getAllRidershipsin interfaceGtfsDao
-
getAllVehicles
Description copied from interface:GtfsDaoVehicleMethods- Specified by:
getAllVehiclesin interfaceGtfsDao
-
getVehicleForId
Description copied from interface:GtfsDaoVehicleMethods- Specified by:
getVehicleForIdin interfaceGtfsDao
-
getAllAreas
Description copied from interface:GtfsDaoAreaMethods- Specified by:
getAllAreasin interfaceGtfsDao
-
getAllLocationGroupElements
- Specified by:
getAllLocationGroupElementsin interfaceGtfsDao
-
getAllStopAreaElements
- Specified by:
getAllStopAreaElementsin interfaceGtfsDao
-
getAllStopAreas
- Specified by:
getAllStopAreasin interfaceGtfsDao
-
getAllLocationGroups
- Specified by:
getAllLocationGroupsin interfaceGtfsDao
-
getAllLocations
- Specified by:
getAllLocationsin interfaceGtfsDao
-
getAllBookingRules
- Specified by:
getAllBookingRulesin interfaceGtfsDao
-
getAllTranslations
Description copied from interface:GtfsDaoTranslationMethods- Specified by:
getAllTranslationsin interfaceGtfsDao
-
getAllNetworks
Description copied from interface:GtfsDaoNetworkMethods- Specified by:
getAllNetworksin interfaceGtfsDao
-
getOptionalMetadataFilenames
- Specified by:
getOptionalMetadataFilenamesin interfaceGtfsDao
-
hasMetadata
- Specified by:
hasMetadatain interfaceGtfsDao
-
getMetadata
- Specified by:
getMetadatain interfaceGtfsDao
-
addMetadata
- Specified by:
addMetadatain interfaceGtfsDao
-
getRidershipForTrip
Description copied from interface:GtfsRelationalDao- Specified by:
getRidershipForTripin interfaceGtfsRelationalDao
-
getServiceIds
- Specified by:
getServiceIdsin interfaceCalendarService- Returns:
- the set of all service ids used in the data set
-
getServiceDatesForServiceId
- Specified by:
getServiceDatesForServiceIdin interfaceCalendarService- Parameters:
serviceId- the target service id- Returns:
- the set of all service dates for which the specified service id is active
-
getServiceIdsOnDate
Description copied from interface:CalendarServiceDetermine the set of service ids that are active on the specified service date.- Specified by:
getServiceIdsOnDatein interfaceCalendarService- Parameters:
date- the target service date- Returns:
- the set of service ids that are active on the specified service date
-
getTimeZoneForAgencyId
Description copied from interface:CalendarServiceReturns the instantiatedTimeZonefor the specified agency id- Specified by:
getTimeZoneForAgencyIdin interfaceCalendarService- Parameters:
agencyId-Agency.getId()- Returns:
- the time zone for the specified agency, or null if the agency was not found
-
getLocalizedServiceIdForAgencyAndServiceId
public LocalizedServiceId getLocalizedServiceIdForAgencyAndServiceId(String agencyId, AgencyAndId serviceId) Description copied from interface:CalendarServiceGiven an agency id and a service id, we return aLocalizedServiceIdwhich is just a service id with timezone information attached. We use the agencyId argument of the method call to lookup the timezone for requested agency. Note that the service id itself has an agencyId component as well, but we don't use that for the timezone lookup. The service id's agencyId is more of a prefix to guarantee dataset uniqueness. For example, multipleTripobjects, representing different agencies, can all reference the same service id. Its important that we look up agency timezone information using the trip's agencyId and not the serviceId's agencyId.- Specified by:
getLocalizedServiceIdForAgencyAndServiceIdin interfaceCalendarService- Parameters:
agencyId- the id of the Agency whose timezone info we will useserviceId- the service id to use- Returns:
- a localized service id with timezone info attached, or nul if the specified agency could not be found
-
getDatesForLocalizedServiceId
- Specified by:
getDatesForLocalizedServiceIdin interfaceCalendarService
-
isLocalizedServiceIdActiveOnDate
public boolean isLocalizedServiceIdActiveOnDate(LocalizedServiceId localizedServiceId, Date serviceDate) - Specified by:
isLocalizedServiceIdActiveOnDatein interfaceCalendarService
-
getServiceDatesWithinRange
public List<Date> getServiceDatesWithinRange(LocalizedServiceId serviceId, ServiceInterval interval, Date from, Date to) Description copied from interface:CalendarServiceGiven the specified localized service id, which has a corresponding set of localized service dates, determine the sublist of service dates that, when extended with the specifiedServiceInterval, overlap with the specified from-to time range. Let's consider a few concrete examples to describe what this method does. Consider a singleStopTimewith an arrival and departure time. That StopTime is part of aTrip, which means it has a service id attached to it. We wish to answer the question, What service dates would make the specified StopTime active in a particular time range? To answer that question, we'd need to consider each of the localized service dates for which the specified service id is active, add the StopTime arrival and departure offset to each, and see if the resulting time falls within the target range. This method can perform that comparison. By specifying the target service id, aServiceIntervalwhose min and max arrival and departure times are set to the arrival and departure time of theStopTime, and the target from-to time interval, the method will return the set of localized service dates that would make the StopTime arrival or departure times active in the specified target time range. As slightly different example, consider answering that same question for multipleStopTimeobjects, such as all the StopTimes for a particular trip or all the StopTimes for a particular stop. The question is the same, but the difference is now there are multiple arrival and departure times. Here, an appropriateServiceIntervalcan be constructed that includes the min and max arrival and departure times for the set ofStopTimeobjects and the calculation will be done looking for service dates that cause any part of the service interval to overlap with the target from-to range. Note that this method considers both the arrival and departure times when looking for overlaps. To consider only arrival times, check outCalendarService.getServiceDateArrivalsWithinRange(LocalizedServiceId, ServiceInterval, Date, Date)and for departures, check outCalendarService.getServiceDateDeparturesWithinRange(LocalizedServiceId, ServiceInterval, Date, Date)- Specified by:
getServiceDatesWithinRangein interfaceCalendarService- Parameters:
serviceId- the localized service id whose service dates we'll considerinterval- a range of arrival and departure times to considerfrom- - the min portion of the target time intervalto- - the max portion of the target time interval- Returns:
- the list of localized service dates that would make the specified service interval overlap with the specified from-to time range
-
getServiceDatesWithinRange
public Map<LocalizedServiceId,List<Date>> getServiceDatesWithinRange(ServiceIdIntervals serviceIdIntervals, Date from, Date to) Description copied from interface:CalendarServiceSee the description fromCalendarService.getServiceDatesWithinRange(LocalizedServiceId, ServiceInterval, Date, Date). This method does the same thing, except that it works with multiple service ids and intervals at the same time.- Specified by:
getServiceDatesWithinRangein interfaceCalendarService- Parameters:
serviceIdIntervals- - a set of service ids and service intervalsfrom- - time interval minto- - time interval max- Returns:
- the list of active service dates, keyed by service id
-
getServiceDateDeparturesWithinRange
public List<Date> getServiceDateDeparturesWithinRange(LocalizedServiceId serviceId, ServiceInterval interval, Date from, Date to) Description copied from interface:CalendarServiceSee the description fromCalendarService.getServiceDatesWithinRange(LocalizedServiceId, ServiceInterval, Date, Date). This method does the same thing, except that it only considers departure times.- Specified by:
getServiceDateDeparturesWithinRangein interfaceCalendarService- Parameters:
serviceId- the localized service id whose service dates we'll considerinterval- a range of departure times to considerfrom- - the min portion of the target time intervalto- - the max portion of the target time interval- Returns:
- the list of active service dates
-
getServiceDateDeparturesWithinRange
public Map<LocalizedServiceId,List<Date>> getServiceDateDeparturesWithinRange(ServiceIdIntervals serviceIdIntervals, Date from, Date to) Description copied from interface:CalendarServiceSee the description fromCalendarService.getServiceDateDeparturesWithinRange(LocalizedServiceId, ServiceInterval, Date, Date). This method does the same thing, except that it works with multiple service ids and intervals at the same time.- Specified by:
getServiceDateDeparturesWithinRangein interfaceCalendarService- Parameters:
serviceIdIntervals- - a set of service ids and service intervalsfrom- - time interval minto- - time interval max- Returns:
- the list of active service dates, keyed by service id
-
getServiceDateArrivalsWithinRange
public List<Date> getServiceDateArrivalsWithinRange(LocalizedServiceId serviceId, ServiceInterval interval, Date from, Date to) Description copied from interface:CalendarServiceSee the description fromCalendarService.getServiceDatesWithinRange(LocalizedServiceId, ServiceInterval, Date, Date). This method does the same thing, except that it only considers arrival times.- Specified by:
getServiceDateArrivalsWithinRangein interfaceCalendarService- Parameters:
serviceId- the localized service id whose service dates we'll considerinterval- a range of arrival times to considerfrom- - the min portion of the target time intervalto- - the max portion of the target time interval- Returns:
- the list of active service dates
-
isLocalizedServiceIdActiveInRange
public boolean isLocalizedServiceIdActiveInRange(LocalizedServiceId serviceId, ServiceInterval scheduledService, AgencyServiceInterval serviceInterval) - Specified by:
isLocalizedServiceIdActiveInRangein interfaceCalendarService
-
getServiceDateArrivalsWithinRange
public Map<LocalizedServiceId,List<Date>> getServiceDateArrivalsWithinRange(ServiceIdIntervals serviceIdIntervals, Date from, Date to) Description copied from interface:CalendarServiceSee the description fromCalendarService.getServiceDateArrivalsWithinRange(LocalizedServiceId, ServiceInterval, Date, Date). This method does the same thing, except that it works with multiple service ids and intervals at the same time.- Specified by:
getServiceDateArrivalsWithinRangein interfaceCalendarService- Parameters:
serviceIdIntervals- - a set of service ids and service intervalsfrom- - time interval minto- - time interval max- Returns:
- the list of active service dates, keyed by service id
-
getNextDepartureServiceDates
public List<Date> getNextDepartureServiceDates(LocalizedServiceId serviceId, ServiceInterval interval, long targetTime) Description copied from interface:CalendarServiceComputes the list of service dates whose departure service interval (min to max departure time) overlaps the specified target time. If no intervals overlaps, then the next service date whose full service interval comes immediately after (but does overlap) the target time is returned. This method is useful for finding the next scheduledStopTimeafter the target time at a particular stop . By calling this method with the serviceId and service interval for the specified stop, we return the set of service dates that overlap or the next service date if none do, guaranteeing that at least one service date instantiates a StopTime that occurs after the target time.- Specified by:
getNextDepartureServiceDatesin interfaceCalendarService- Parameters:
serviceId- the localized service id whose service dates we'll considerinterval- a range of departure times to considertargetTime- - time in UTC- Returns:
- the set of overlapping and next service dates
-
getNextDepartureServiceDates
public Map<LocalizedServiceId,List<Date>> getNextDepartureServiceDates(ServiceIdIntervals serviceIdIntervals, long targetTime) Description copied from interface:CalendarServiceSee the description forCalendarService.getNextDepartureServiceDates(LocalizedServiceId, ServiceInterval, long). This method does the same thing, except that it works with multiple service ids and intervals at the same time.- Specified by:
getNextDepartureServiceDatesin interfaceCalendarService- Parameters:
serviceIdIntervals- - set of service ids and service intervalstargetTime-- Returns:
- the set of overlapping and next service dates
-
getPreviousArrivalServiceDates
public List<Date> getPreviousArrivalServiceDates(LocalizedServiceId serviceId, ServiceInterval interval, long targetTime) Description copied from interface:CalendarServiceComputes the list of service dates whose arrival service interval (min to max departure time) overlaps the specified target time. If not intervals overlap, then the previous service date whose full service interval comes immediately before (but does overlap) the target time is returned. This method is useful for finding the previous scheduledStopTimebefore the target time at a particular stop . By calling this method with the serviceId and service interval for the specified stop, we return the set of service dates that potentially overlap or the previous service date if none do, guaranteeing that at least one service date instantiates a StopTime that occurs before the target time.- Specified by:
getPreviousArrivalServiceDatesin interfaceCalendarService- Parameters:
serviceId- the localized service id whose service dates we'll considerinterval- a range of arrival times to considertargetTime- - time in UTC- Returns:
- the set of overlapping and previous service dates
-
getPreviousArrivalServiceDates
public Map<LocalizedServiceId,List<Date>> getPreviousArrivalServiceDates(ServiceIdIntervals serviceIdIntervals, long targetTime) Description copied from interface:CalendarServiceSee the description forCalendarService.getPreviousArrivalServiceDates(LocalizedServiceId, ServiceInterval, long). This method does the same thing, except that it works with multiple service ids and intervals at the same time.- Specified by:
getPreviousArrivalServiceDatesin interfaceCalendarService- Parameters:
serviceIdIntervals- - set of service ids and service intervalstargetTime-- Returns:
- the set of overlapping and previous service dates
-
setData
Description copied from interface:CalendarServiceUpdate the underlying data structures.- Specified by:
setDatain interfaceCalendarService- Parameters:
data-
-
getFacilityForId
-
getFacilityPropertiesForId
-
getFacilityPropertiesDefinitionsForId
-
getRouteNameExceptionForId
-
getDirectionNameExceptionForId
-
getAlternateStopNameExceptionForId
-
getAllFacilities
-
getAllFacilityProperties
-
getAllFacilityPropertyDefinitions
-
getAllRouteNameExceptions
-
getAllDirectionNameExceptions
-
getAllAlternateStopNameExceptions
-
getAllDirectionEntries
- Specified by:
getAllDirectionEntriesin interfaceGtfsDao
-
getAllWrongWayConcurrencies
- Specified by:
getAllWrongWayConcurrenciesin interfaceGtfsDao
-