Search in sources :

Example 1 with BlockConfigurationEntryImpl

use of org.onebusaway.transit_data_federation.impl.transit_graph.BlockConfigurationEntryImpl in project onebusaway-application-modules by camsys.

the class FrequencyEntriesFactory method applyFrequenciesToBlockTrips.

private void applyFrequenciesToBlockTrips(List<TripEntryImpl> tripsInBlock, Map<AgencyAndId, List<FrequencyEntry>> frequenciesAlongBlockByTripId) {
    BlockEntryImpl blockEntry = tripsInBlock.get(0).getBlock();
    List<BlockConfigurationEntry> configurations = blockEntry.getConfigurations();
    for (int i = 0; i < configurations.size(); i++) {
        BlockConfigurationEntryImpl blockConfig = (BlockConfigurationEntryImpl) configurations.get(i);
        List<FrequencyEntry> frequencies = computeBlockFrequencies(blockEntry, blockConfig.getTrips(), frequenciesAlongBlockByTripId);
        blockConfig.setFrequencies(frequencies);
    }
}
Also used : BlockConfigurationEntryImpl(org.onebusaway.transit_data_federation.impl.transit_graph.BlockConfigurationEntryImpl) FrequencyEntry(org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry) BlockEntryImpl(org.onebusaway.transit_data_federation.impl.transit_graph.BlockEntryImpl) BlockConfigurationEntry(org.onebusaway.transit_data_federation.services.transit_graph.BlockConfigurationEntry)

Aggregations

BlockConfigurationEntryImpl (org.onebusaway.transit_data_federation.impl.transit_graph.BlockConfigurationEntryImpl)1 BlockEntryImpl (org.onebusaway.transit_data_federation.impl.transit_graph.BlockEntryImpl)1 BlockConfigurationEntry (org.onebusaway.transit_data_federation.services.transit_graph.BlockConfigurationEntry)1 FrequencyEntry (org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry)1