Package org.onebusaway.realtime.api

Examples of org.onebusaway.realtime.api.EVehiclePhase


      bean.setPreviousStopTimeOffset(blockLocation.getPreviousStopTimeOffset());
      bean.setPreviousStopDistanceFromVehicle(blockLocation.getPreviousStop().getDistanceAlongBlock()
          - blockLocation.getDistanceAlongBlock());
    }

    EVehiclePhase phase = blockLocation.getPhase();
    if (phase != null)
      bean.setPhase(phase.toLabel());

    String status = blockLocation.getStatus();
    if (status != null)
      bean.setStatus(status);
View Full Code Here


    CoordinatePoint p1 = new CoordinatePoint(47.0, -122.0);
    CoordinatePoint p2 = new CoordinatePoint(47.1, -122.1);
    CoordinatePoint p3 = new CoordinatePoint(47.2, -122.2);

    EVehiclePhase inProgress = EVehiclePhase.IN_PROGRESS;
    EVehiclePhase layover = EVehiclePhase.LAYOVER_DURING;

    addRecord(records, record(t(4, 10), 10.0, 100.0, p1, 0.0, inProgress, "ok"));
    addRecord(records,
        record(t(8, 20), 18.0, 200.0, p2, 90.0, layover, "not ok"));
    addRecord(records,
View Full Code Here

    VehicleStatusBean bean = new VehicleStatusBean();
    bean.setLastUpdateTime(record.getTimeOfRecord());
    bean.setLastLocationUpdateTime(record.getTimeOfLocationUpdate());

    EVehiclePhase phase = record.getPhase();
    if (phase != null)
      bean.setPhase(phase.toLabel());

    bean.setStatus(record.getStatus());

    if (record.isCurrentLocationSet())
      bean.setLocation(new CoordinatePoint(record.getCurrentLocationLat(),
View Full Code Here

TOP

Related Classes of org.onebusaway.realtime.api.EVehiclePhase

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.