org.onebusaway.transit_data_federation.services.blocks
Interface BlockCalendarService


public interface BlockCalendarService

Methods for determining which BlockInstance instances are active for given time ranges and other criteria. Note that this only considers SCHEDULE data, not real-time data, when determining which blocks are active at a particular point in time.

Author:
bdferris
See Also:
BlockInstance, BlockTripIndex, FrequencyBlockTripIndex

Method Summary
 List<BlockInstance> getActiveBlocks(org.onebusaway.gtfs.model.AgencyAndId blockId, long timeFrom, long timeTo)
           
 List<BlockInstance> getActiveBlocksForAgencyInTimeRange(String agencyId, long timeFrom, long timeTo)
           
 List<BlockInstance> getActiveBlocksForRouteInTimeRange(org.onebusaway.gtfs.model.AgencyAndId routeId, long timeFrom, long timeTo)
           
 List<BlockInstance> getActiveBlocksInTimeRange(Iterable<BlockTripIndex> indices, Iterable<BlockLayoverIndex> layoverIndices, Iterable<FrequencyBlockTripIndex> frequencyIndices, long timeFrom, long timeTo)
           
 List<BlockInstance> getActiveBlocksInTimeRange(long timeFrom, long timeTo)
           
 BlockInstance getBlockInstance(org.onebusaway.gtfs.model.AgencyAndId blockId, long serviceDate)
          Returns the BlockInstance for the block active on the specified service date.
 List<BlockInstance> getClosestActiveBlocks(org.onebusaway.gtfs.model.AgencyAndId blockId, long time)
           
 BlockTripEntry getTargetBlockTrip(BlockInstance blockInstance, TripEntry trip)
           
 

Method Detail

getBlockInstance

BlockInstance getBlockInstance(org.onebusaway.gtfs.model.AgencyAndId blockId,
                               long serviceDate)
Returns the BlockInstance for the block active on the specified service date. Note that this function assumes an EXACT service date match. If you aren't quite sure what your service date is, try the getActiveBlocks(AgencyAndId, long, long) method.

Parameters:
blockId -
serviceDate -
Returns:
the block instance, or null if not found

getTargetBlockTrip

BlockTripEntry getTargetBlockTrip(BlockInstance blockInstance,
                                  TripEntry trip)

getActiveBlocks

List<BlockInstance> getActiveBlocks(org.onebusaway.gtfs.model.AgencyAndId blockId,
                                    long timeFrom,
                                    long timeTo)

getClosestActiveBlocks

List<BlockInstance> getClosestActiveBlocks(org.onebusaway.gtfs.model.AgencyAndId blockId,
                                           long time)

getActiveBlocksInTimeRange

List<BlockInstance> getActiveBlocksInTimeRange(long timeFrom,
                                               long timeTo)

getActiveBlocksForAgencyInTimeRange

List<BlockInstance> getActiveBlocksForAgencyInTimeRange(String agencyId,
                                                        long timeFrom,
                                                        long timeTo)

getActiveBlocksForRouteInTimeRange

List<BlockInstance> getActiveBlocksForRouteInTimeRange(org.onebusaway.gtfs.model.AgencyAndId routeId,
                                                       long timeFrom,
                                                       long timeTo)

getActiveBlocksInTimeRange

List<BlockInstance> getActiveBlocksInTimeRange(Iterable<BlockTripIndex> indices,
                                               Iterable<BlockLayoverIndex> layoverIndices,
                                               Iterable<FrequencyBlockTripIndex> frequencyIndices,
                                               long timeFrom,
                                               long timeTo)


Copyright © 2011 OneBusAway. All Rights Reserved.