org.onebusaway.transit_data_federation.impl.blocks
Class BlockStatusServiceImpl

java.lang.Object
  extended by org.onebusaway.transit_data_federation.impl.blocks.BlockStatusServiceImpl
All Implemented Interfaces:
BlockStatusService

@Component
public class BlockStatusServiceImpl
extends Object
implements BlockStatusService


Constructor Summary
BlockStatusServiceImpl()
           
 
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)
          BlockStatusService Interface
 List<BlockLocation> getBlocksForBounds(CoordinateBounds bounds, long time)
           
 Map<BlockInstance,List<List<BlockLocation>>> getBlocksForIndex(BlockSequenceIndex index, List<Date> timestamps)
           
 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.
 void setActive(BlockCalendarService activeCalendarService)
           
 void setBlockGeospatialService(BlockGeospatialService blockGeospatialService)
           
 void setBlockLocationService(BlockLocationService blockLocationService)
           
 void setExtendedCalendarService(ExtendedCalendarService extendedCalendarSerivce)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockStatusServiceImpl

public BlockStatusServiceImpl()
Method Detail

setActive

public void setActive(BlockCalendarService activeCalendarService)

setBlockLocationService

public void setBlockLocationService(BlockLocationService blockLocationService)

setBlockGeospatialService

public void setBlockGeospatialService(BlockGeospatialService blockGeospatialService)

setExtendedCalendarService

public void setExtendedCalendarService(ExtendedCalendarService extendedCalendarSerivce)

getBlocks

public Map<BlockInstance,List<BlockLocation>> getBlocks(org.onebusaway.gtfs.model.AgencyAndId blockId,
                                                        long serviceDate,
                                                        org.onebusaway.gtfs.model.AgencyAndId vehicleId,
                                                        long time)
BlockStatusService Interface

Specified by:
getBlocks in interface BlockStatusService
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

public BlockLocation getBlockForVehicle(org.onebusaway.gtfs.model.AgencyAndId vehicleId,
                                        long time)
Specified by:
getBlockForVehicle in interface BlockStatusService
Returns:
trip details for the trip operated by the specified vehicle at the specified time, or null if not found

getAllActiveBlocks

public List<BlockLocation> getAllActiveBlocks(long time)
Description copied from interface: BlockStatusService
Returns all active blocks, both with and without real-time information.

Specified by:
getAllActiveBlocks in interface BlockStatusService
Parameters:
time - only blocks active at the specified time will be returned
Returns:
the list of active blocks at the specified time

getActiveBlocksForAgency

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

Specified by:
getActiveBlocksForAgency in interface BlockStatusService
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

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

Specified by:
getBlocksForRoute in interface BlockStatusService
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

getBlocksForBounds

public List<BlockLocation> getBlocksForBounds(CoordinateBounds bounds,
                                              long time)
Specified by:
getBlocksForBounds in interface BlockStatusService
Returns:
the list of active blocks matching the query criteria

getBlocksForIndex

public Map<BlockInstance,List<List<BlockLocation>>> getBlocksForIndex(BlockSequenceIndex index,
                                                                      List<Date> timestamps)
Specified by:
getBlocksForIndex in interface BlockStatusService
Returns:


Copyright © 2012 OneBusAway. All Rights Reserved.