org.onebusaway.transit_data_federation.services.realtime
Interface BlockLocationService

All Known Implementing Classes:
BlockLocationServiceImpl

public interface BlockLocationService

Service methods for accessing/interpolating the position of a transit vehicle give a trip instance and target time.

Author:
bdferris

Method Summary
 BlockLocation getLocationForBlockInstance(BlockInstance blockInstance, TargetTime time)
          Given a block instance and a target time, determine the vehicle position at that time, using real-time data when available.
 BlockLocation getLocationForBlockInstanceAndScheduledBlockLocation(BlockInstance blockInstance, ScheduledBlockLocation scheduledLocation, long targetTime)
           
 BlockLocation getLocationForVehicleAndTime(org.onebusaway.gtfs.model.AgencyAndId vehicleId, TargetTime time)
           
 Map<org.onebusaway.gtfs.model.AgencyAndId,List<BlockLocation>> getLocationsForBlockInstance(BlockInstance blockInstance, List<Date> times, long currentTime)
           
 List<BlockLocation> getLocationsForBlockInstance(BlockInstance blockInstance, TargetTime time)
          Given a block instance and a target time, determine the vehicle locations at that time using real-time data when available.
 BlockLocation getScheduledLocationForBlockInstance(BlockInstance blockInstance, long targetTime)
          Determines the scheduled vehicle location of a given block instance at the specified time.
 

Method Detail

getLocationForBlockInstance

BlockLocation getLocationForBlockInstance(BlockInstance blockInstance,
                                          TargetTime time)
Given a block instance and a target time, determine the vehicle position at that time, using real-time data when available. If multiple vehicles are currently active for a block, we just return the first instance.

Parameters:
blockInstance - the block instance to query
time - the target time (Unix-time)
Returns:
the block location, or null if the block instance is not active at the specified time

getLocationsForBlockInstance

Map<org.onebusaway.gtfs.model.AgencyAndId,List<BlockLocation>> getLocationsForBlockInstance(BlockInstance blockInstance,
                                                                                            List<Date> times,
                                                                                            long currentTime)

getLocationForBlockInstanceAndScheduledBlockLocation

BlockLocation getLocationForBlockInstanceAndScheduledBlockLocation(BlockInstance blockInstance,
                                                                   ScheduledBlockLocation scheduledLocation,
                                                                   long targetTime)

getLocationsForBlockInstance

List<BlockLocation> getLocationsForBlockInstance(BlockInstance blockInstance,
                                                 TargetTime time)
Given a block instance and a target time, determine the vehicle locations at that time using real-time data when available.

Parameters:
blockInstance - the trip instance to query
time - TODO
Returns:
the block locations, or empty if no block locations are active at the specified time

getScheduledLocationForBlockInstance

BlockLocation getScheduledLocationForBlockInstance(BlockInstance blockInstance,
                                                   long targetTime)
Determines the scheduled vehicle location of a given block instance at the specified time.

Parameters:
blockInstance -
targetTime -
Returns:
the scheduled location of a particular block instance, or null if not active at the specified time

getLocationForVehicleAndTime

BlockLocation getLocationForVehicleAndTime(org.onebusaway.gtfs.model.AgencyAndId vehicleId,
                                           TargetTime time)


Copyright © 2012 OneBusAway. All Rights Reserved.