org.onebusaway.transit_data_federation.services.blocks
Interface BlockStatusService

All Known Implementing Classes:
BlockStatusServiceImpl

public interface BlockStatusService

Service methods for querying the real-time status and position of a particular block of trips.

Author:
bdferris
See Also:
BlockLocation

Method Summary
 List<BlockLocation> getActiveBlocksForAgency(String agencyId, long time)
          Returns all active blocks for the specified agency, both with and without real-time information.
 List<BlockLocation> getAllActiveBlocks(long time)
          Returns all active blocks, both with and without real-time information.
 BlockLocation getBlockForVehicle(org.onebusaway.gtfs.model.AgencyAndId vehicleId, long time)
           
 Map<BlockInstance,List<BlockLocation>> getBlocks(org.onebusaway.gtfs.model.AgencyAndId blockId, long serviceDate, org.onebusaway.gtfs.model.AgencyAndId vehicleId, long time)
           
 List<BlockLocation> getBlocksForBounds(CoordinateBounds bounds, long time)
           
 Map<BlockInstance,List<List<BlockLocation>>> getBlocksForIndex(BlockSequenceIndex index, List<Date> timetamps)
           
 List<BlockLocation> getBlocksForRoute(org.onebusaway.gtfs.model.AgencyAndId routeId, long time)
          Returns all active blocks for the specified route, both with and without real-time information.
 

Method Detail

getBlocks

Map<BlockInstance,List<BlockLocation>> getBlocks(org.onebusaway.gtfs.model.AgencyAndId blockId,
                                                 long serviceDate,
                                                 org.onebusaway.gtfs.model.AgencyAndId vehicleId,
                                                 long time)
Parameters:
blockId - see Trip.getBlockId()
serviceDate - the service date the block is operating under (Unix-time)
vehicleId - TODO
time - the time of operation to query
Returns:
the status info for a particular block operating on the specified service date and time

getBlockForVehicle

BlockLocation getBlockForVehicle(org.onebusaway.gtfs.model.AgencyAndId vehicleId,
                                 long time)
Parameters:
vehicleId -
time -
detailsInclusionBean - controls what will be included in the response
Returns:
trip details for the trip operated by the specified vehicle at the specified time, or null if not found

getAllActiveBlocks

List<BlockLocation> getAllActiveBlocks(long time)
Returns all active blocks, both with and without real-time information.

Parameters:
time - only blocks active at the specified time will be returned
Returns:
the list of active blocks at the specified time

getActiveBlocksForAgency

List<BlockLocation> getActiveBlocksForAgency(String agencyId,
                                             long time)
Returns all active blocks for the specified agency, both with and without real-time information.

Parameters:
agencyId - only blocks with the specified agency id will be returned
time - only blocks active at the specified time will be returned
Returns:
the list of active blocks matching agency query criteria

getBlocksForRoute

List<BlockLocation> getBlocksForRoute(org.onebusaway.gtfs.model.AgencyAndId routeId,
                                      long time)
Returns all active blocks for the specified route, both with and without real-time information.

Parameters:
routeId - only blocks with the specified route id will be returned
time - only blocks active at the specified time will be returned
Returns:
the list of active blocks matching the route query criteria

getBlocksForIndex

Map<BlockInstance,List<List<BlockLocation>>> getBlocksForIndex(BlockSequenceIndex index,
                                                               List<Date> timetamps)
Parameters:
index -
timetamps -
Returns:

getBlocksForBounds

List<BlockLocation> getBlocksForBounds(CoordinateBounds bounds,
                                       long time)
Parameters:
query -
Returns:
the list of active blocks matching the query criteria


Copyright © 2012 OneBusAway. All Rights Reserved.