use of org.onebusaway.transit_data_federation.services.transit_graph.FrequencyBlockStopTimeEntry in project onebusaway-application-modules by camsys.
the class BlockStopTimeIndicesFactory method createFrequencyIndicesFromGroups.
/**
**
*
***
*/
private List<FrequencyBlockStopTimeIndex> createFrequencyIndicesFromGroups(Map<BlockStopTimeKey, List<BlockStopTimeEntry>> stopTimesByKey) {
List<FrequencyBlockStopTimeIndex> allIndices = new ArrayList<FrequencyBlockStopTimeIndex>();
int count = 0;
for (List<BlockStopTimeEntry> stopTimes : stopTimesByKey.values()) {
if (_verbose && count % 100 == 0)
_log.info("groups processed: " + count + "/" + stopTimesByKey.size());
count++;
List<FrequencyBlockStopTimeEntry> frequencyStopTimes = getStopTimesAsFrequencyStopTimes(stopTimes);
List<List<FrequencyBlockStopTimeEntry>> groupedStopTimes = BlockLibrary.createStrictlyOrderedGroups(frequencyStopTimes, _frequencyBlockStopTimeLooseComparator, _frequencyBlockStopTimeStrictComparator);
for (List<FrequencyBlockStopTimeEntry> group : groupedStopTimes) {
FrequencyBlockStopTimeIndex index = createFrequencyBlockStopTimeIndexForGroup(group);
allIndices.add(index);
}
}
return allIndices;
}
Aggregations