Examples of BlockInstance


Examples of org.onebusaway.transit_data_federation.services.blocks.BlockInstance

      @RequestParam(defaultValue = "0") int scheduleDeviation,
      @RequestParam(defaultValue = "0.0") double noise) {

    AgencyAndId bid = AgencyAndIdLibrary.convertFromString(blockId);

    BlockInstance blockInstance = _blockCalendarService.getBlockInstance(bid,
        serviceDate);

    CurrentVehicleEstimateQueryBean bean = new CurrentVehicleEstimateQueryBean();

    long time = System.currentTimeMillis();

    List<Record> records = new ArrayList<Record>();

    for (int i = 0; i < 5 * 60; i += 30) {

      int scheduleTime = (int) ((time - blockInstance.getServiceDate()) / 1000
          - scheduleDeviation - i);

      ScheduledBlockLocation location = _scheduledBlockLocationService.getScheduledBlockLocationFromScheduledTime(
          blockInstance.getBlock(), scheduleTime);

      if (location != null) {

        CoordinatePoint p = applyNoiseToLocation(location.getLocation(), noise);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.