use of org.onebusaway.transit_data_federation.impl.blocks.BlockStopTimeIndicesFactory in project onebusaway-application-modules by camsys.
the class BlockIndicesTask method run.
@Override
public void run() {
try {
Iterable<BlockEntry> blocks = _transitGraphDao.getAllBlocks();
List<BlockTripIndexData> tripData = _blockIndexFactoryService.createTripData(blocks);
List<BlockLayoverIndexData> layoverData = _blockIndexFactoryService.createLayoverData(blocks);
List<FrequencyBlockTripIndexData> frequencyTripData = _blockIndexFactoryService.createFrequencyTripData(blocks);
ObjectSerializationLibrary.writeObject(_bundle.getBlockTripIndicesPath(), tripData);
ObjectSerializationLibrary.writeObject(_bundle.getBlockLayoverIndicesPath(), layoverData);
ObjectSerializationLibrary.writeObject(_bundle.getFrequencyBlockTripIndicesPath(), frequencyTripData);
BlockStopTimeIndicesFactory stopFactory = new BlockStopTimeIndicesFactory();
stopFactory.createIndices(blocks);
_refreshService.refresh(RefreshableResources.BLOCK_INDEX_DATA);
} catch (Exception ex) {
throw new IllegalStateException(ex);
}
}
Aggregations