use of org.onebusaway.transit_data_federation.impl.realtime.BlockLocationRecord in project onebusaway-application-modules by camsys.
the class VehicleStatusBeanServiceImpl method getVehicleLocations.
@Override
public ListBean<VehicleLocationRecordBean> getVehicleLocations(VehicleLocationRecordQueryBean query) {
AgencyAndId blockId = AgencyAndIdLibrary.convertFromString(query.getBlockId());
AgencyAndId tripId = AgencyAndIdLibrary.convertFromString(query.getTripId());
AgencyAndId vehicleId = AgencyAndIdLibrary.convertFromString(query.getVehicleId());
List<BlockLocationRecord> records = _blockLocationRecordDao.getBlockLocationRecords(blockId, tripId, vehicleId, query.getServiceDate(), query.getFromTime(), query.getToTime(), 1000);
List<VehicleLocationRecordBean> beans = new ArrayList<VehicleLocationRecordBean>(records.size());
for (BlockLocationRecord record : records) {
VehicleLocationRecordBean bean = getBlockLocationRecordAsVehicleLocationRecord(record);
beans.add(bean);
}
return new ListBean<VehicleLocationRecordBean>(beans, false);
}
Aggregations