Search in sources :

Example 1 with FrequencyBlockStopTimeEntryImpl

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

the class BlockStopTimeIndicesFactory method getStopTimesAsFrequencyStopTimes.

private List<FrequencyBlockStopTimeEntry> getStopTimesAsFrequencyStopTimes(List<BlockStopTimeEntry> stopTimes) {
    List<FrequencyBlockStopTimeEntry> frequencyStopTimes = new ArrayList<FrequencyBlockStopTimeEntry>();
    for (BlockStopTimeEntry blockStopTime : stopTimes) {
        BlockTripEntry trip = blockStopTime.getTrip();
        BlockConfigurationEntry blockConfig = trip.getBlockConfiguration();
        for (FrequencyEntry frequency : blockConfig.getFrequencies()) {
            FrequencyBlockStopTimeEntry frequencyStopTime = new FrequencyBlockStopTimeEntryImpl(blockStopTime, frequency);
            frequencyStopTimes.add(frequencyStopTime);
        }
    }
    return frequencyStopTimes;
}
Also used : BlockTripEntry(org.onebusaway.transit_data_federation.services.transit_graph.BlockTripEntry) ArrayList(java.util.ArrayList) FrequencyEntry(org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry) BlockConfigurationEntry(org.onebusaway.transit_data_federation.services.transit_graph.BlockConfigurationEntry) BlockStopTimeEntry(org.onebusaway.transit_data_federation.services.transit_graph.BlockStopTimeEntry) FrequencyBlockStopTimeEntry(org.onebusaway.transit_data_federation.services.transit_graph.FrequencyBlockStopTimeEntry) FrequencyBlockStopTimeEntryImpl(org.onebusaway.transit_data_federation.impl.transit_graph.FrequencyBlockStopTimeEntryImpl) FrequencyBlockStopTimeEntry(org.onebusaway.transit_data_federation.services.transit_graph.FrequencyBlockStopTimeEntry)

Aggregations

ArrayList (java.util.ArrayList)1 FrequencyBlockStopTimeEntryImpl (org.onebusaway.transit_data_federation.impl.transit_graph.FrequencyBlockStopTimeEntryImpl)1 BlockConfigurationEntry (org.onebusaway.transit_data_federation.services.transit_graph.BlockConfigurationEntry)1 BlockStopTimeEntry (org.onebusaway.transit_data_federation.services.transit_graph.BlockStopTimeEntry)1 BlockTripEntry (org.onebusaway.transit_data_federation.services.transit_graph.BlockTripEntry)1 FrequencyBlockStopTimeEntry (org.onebusaway.transit_data_federation.services.transit_graph.FrequencyBlockStopTimeEntry)1 FrequencyEntry (org.onebusaway.transit_data_federation.services.transit_graph.FrequencyEntry)1