Package com.google.transit.realtime.GtfsRealtime

Examples of com.google.transit.realtime.GtfsRealtime.VehicleDescriptor


      FeedEntity vehiclePositionEntity = vehiclePositionsByBlockDescriptor.get(update.block);
      if (vehiclePositionEntity != null) {
        VehiclePosition vehiclePosition = vehiclePositionEntity.getVehicle();
        update.vehiclePosition = vehiclePosition;
        if (vehiclePosition.hasVehicle()) {
          VehicleDescriptor vehicle = vehiclePosition.getVehicle();
          if (vehicle.hasId()) {
            update.block.setVehicleId(vehicle.getId());
          }
        }
      }

      if (update.block.getVehicleId() == null) {
        for (TripUpdate tripUpdate : update.tripUpdates) {
          if (tripUpdate.hasVehicle()) {
            VehicleDescriptor vehicle = tripUpdate.getVehicle();
            if (vehicle.hasId()) {
              update.block.setVehicleId(vehicle.getId());
            }
          }
        }
      }
View Full Code Here

TOP

Related Classes of com.google.transit.realtime.GtfsRealtime.VehicleDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.