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

Examples of org.onebusaway.transit_data_federation.impl.realtime.BlockLocationRecord.Builder.create()


    b.setBlockId(new AgencyAndId("1", blockId));
    b.setServiceDate(serviceDate);
    b.setVehicleId(new AgencyAndId("1", vehicleId));
    b.setDistanceAlongBlock(distanceAlongBlock);
    b.setTime(t);
    return b.create();
  }

  private static class RecordSource implements Runnable {

    private BlockInstance _blockInstance;
View Full Code Here


        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

    builder.setDistanceAlongBlock(distanceAlongBlock);
    builder.setLocation(location);
    builder.setOrientation(orientation);
    builder.setPhase(phase);
    builder.setStatus(status);
    return builder.create();
  }

  private void addRecord(SortedMap<Long, BlockLocationRecord> records,
      BlockLocationRecord record) {
    records.put(record.getTime(), record);
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.