Package org.onebusaway.transit_data_federation.impl.realtime.BlockLocationRecord

Examples of org.onebusaway.transit_data_federation.impl.realtime.BlockLocationRecord.Builder


    }
  }

  private BlockLocationRecord record(long t, String blockId, long serviceDate,
      String vehicleId, double distanceAlongBlock) {
    Builder b = BlockLocationRecord.builder();
    b.setBlockId(new AgencyAndId("1", blockId));
    b.setServiceDate(serviceDate);
    b.setVehicleId(new AgencyAndId("1", vehicleId));
    b.setDistanceAlongBlock(distanceAlongBlock);
    b.setTime(t);
    return b.create();
  }
View Full Code Here


      for (int i = 0; i < 100; i++) {

        if (i % 10 == 0)
          _cache.clearRecordsForVehicleId(_vehicleId);

        Builder b = BlockLocationRecord.builder();
        b.setBlockId(_blockInstance.getBlock().getBlock().getId());
        b.setServiceDate(_blockInstance.getServiceDate());
        b.setVehicleId(_vehicleId);
        b.setDistanceAlongBlock((double)i * 100);
        b.setTime(i * 1000);

        _cache.addRecord(_blockInstance, b.create());

        List<BlockLocationRecordCollection> records = _cache.getRecordsForBlockInstance(_blockInstance);
        BlockLocationRecordCollection collection = getCollectionForVehicleId(records);
        if (collection == null)
          fail();
View Full Code Here

  }

  private BlockLocationRecord record(long time, double scheduleDeviation,
      double distanceAlongBlock, CoordinatePoint location, double orientation,
      EVehiclePhase phase, String status) {
    Builder builder = BlockLocationRecord.builder();
    builder.setTime(time);
    builder.setScheduleDeviation(scheduleDeviation);
    builder.setDistanceAlongBlock(distanceAlongBlock);
    builder.setLocation(location);
    builder.setOrientation(orientation);
    builder.setPhase(phase);
    builder.setStatus(status);
    return builder.create();
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.impl.realtime.BlockLocationRecord.Builder

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.