org.onebusaway.transit_data_federation.services
Interface ArrivalAndDepartureService


public interface ArrivalAndDepartureService

Service methods for determining the set of active stop times at a particular stop and time.

Author:
bdferris
See Also:
StopTimeInstance

Method Summary
 ArrivalAndDepartureInstance getArrivalAndDepartureForStop(ArrivalAndDepartureQuery query)
           
 List<ArrivalAndDepartureInstance> getArrivalsAndDeparturesForStopInTimeRange(StopEntry stop, TargetTime targetTime, long fromTime, long toTime)
          Determines the set of active arrivals and departures at a given stop, taking into account real-time arrival information.
 List<org.onebusaway.collections.tuple.Pair<ArrivalAndDepartureInstance>> getNextDeparturesForStopPair(StopEntry fromStop, StopEntry toStop, TargetTime targetTime, ArrivalAndDeparturePairQuery query)
           
 List<ArrivalAndDepartureInstance> getNextScheduledBlockTripDeparturesForStop(StopEntry stop, long time, boolean includePrivateService)
           
 ArrivalAndDepartureInstance getNextStopArrivalAndDeparture(ArrivalAndDepartureInstance instance)
          Given an arrival and departure instance, compute the arrival and departure instance for the next stop along the block.
 ArrivalAndDepartureInstance getNextTransferStopArrivalAndDeparture(ArrivalAndDepartureInstance instance)
          Given an arrival and departure instance, compute the arrival and departure instance for the next stop along the block.
 List<org.onebusaway.collections.tuple.Pair<ArrivalAndDepartureInstance>> getPreviousArrivalsForStopPair(StopEntry fromStop, StopEntry toStop, TargetTime targetTime, ArrivalAndDeparturePairQuery query)
           
 ArrivalAndDepartureInstance getPreviousStopArrivalAndDeparture(ArrivalAndDepartureInstance instance)
          Given an arrival and departure instance, compute the arrival and departure instance for the previous stop along the block.
 List<ArrivalAndDepartureInstance> getScheduledArrivalsAndDeparturesForStopInTimeRange(StopEntry stop, long currentTime, long fromTime, long toTime)
          Determines the set of active arrivals and departures at a given stop, NOT taking into account real-time arrival information.
 

Method Detail

getArrivalsAndDeparturesForStopInTimeRange

List<ArrivalAndDepartureInstance> getArrivalsAndDeparturesForStopInTimeRange(StopEntry stop,
                                                                             TargetTime targetTime,
                                                                             long fromTime,
                                                                             long toTime)
Determines the set of active arrivals and departures at a given stop, taking into account real-time arrival information.


getScheduledArrivalsAndDeparturesForStopInTimeRange

List<ArrivalAndDepartureInstance> getScheduledArrivalsAndDeparturesForStopInTimeRange(StopEntry stop,
                                                                                      long currentTime,
                                                                                      long fromTime,
                                                                                      long toTime)
Determines the set of active arrivals and departures at a given stop, NOT taking into account real-time arrival information.


getNextScheduledBlockTripDeparturesForStop

List<ArrivalAndDepartureInstance> getNextScheduledBlockTripDeparturesForStop(StopEntry stop,
                                                                             long time,
                                                                             boolean includePrivateService)
Parameters:
stop -
time -
includePrivateService - TODO
Returns:

getArrivalAndDepartureForStop

ArrivalAndDepartureInstance getArrivalAndDepartureForStop(ArrivalAndDepartureQuery query)

getPreviousStopArrivalAndDeparture

ArrivalAndDepartureInstance getPreviousStopArrivalAndDeparture(ArrivalAndDepartureInstance instance)
Given an arrival and departure instance, compute the arrival and departure instance for the previous stop along the block. If at the start of the block, this method will return null.

Parameters:
instance -
Returns:

getNextStopArrivalAndDeparture

ArrivalAndDepartureInstance getNextStopArrivalAndDeparture(ArrivalAndDepartureInstance instance)
Given an arrival and departure instance, compute the arrival and departure instance for the next stop along the block. If at the end of the block, this method will return null.

Parameters:
instance -
Returns:

getNextTransferStopArrivalAndDeparture

ArrivalAndDepartureInstance getNextTransferStopArrivalAndDeparture(ArrivalAndDepartureInstance instance)
Given an arrival and departure instance, compute the arrival and departure instance for the next stop along the block. If at the end of the block, this method will return null.

Parameters:
instance -
Returns:

getNextDeparturesForStopPair

List<org.onebusaway.collections.tuple.Pair<ArrivalAndDepartureInstance>> getNextDeparturesForStopPair(StopEntry fromStop,
                                                                                                      StopEntry toStop,
                                                                                                      TargetTime targetTime,
                                                                                                      ArrivalAndDeparturePairQuery query)
Parameters:
fromStop -
toStop -
targetTime -
query - query parameters
Returns:

getPreviousArrivalsForStopPair

List<org.onebusaway.collections.tuple.Pair<ArrivalAndDepartureInstance>> getPreviousArrivalsForStopPair(StopEntry fromStop,
                                                                                                        StopEntry toStop,
                                                                                                        TargetTime targetTime,
                                                                                                        ArrivalAndDeparturePairQuery query)
Parameters:
fromStop -
toStop -
targetTime -
query - query parameters
Returns:


Copyright © 2012 OneBusAway. All Rights Reserved.