Search in sources :

Example 1 with VehicleDetailBuilder

use of org.onebusaway.admin.util.VehicleDetailBuilder in project onebusaway-application-modules by camsys.

the class VehicleStatusServiceImpl method getVehicleDetail.

@Override
public VehicleDetail getVehicleDetail(String vehicleId) {
    VehicleDetailBuilder builder = new VehicleDetailBuilder();
    VehicleLastKnownRecord lastKnownRecord = getLastKnownRecordData(vehicleId);
    if (lastKnownRecord != null) {
        VehiclePullout pullout = getPulloutData(vehicleId);
        String headSign = getHeadSign(lastKnownRecord.getDestinationSignCode());
        String inferredHeadSign = getHeadSign(lastKnownRecord.getInferredDSC());
        return builder.buildVehicleDetail(pullout, lastKnownRecord, headSign, inferredHeadSign);
    }
    return null;
}
Also used : VehicleDetailBuilder(org.onebusaway.admin.util.VehicleDetailBuilder) VehiclePullout(org.onebusaway.admin.model.json.VehiclePullout) VehicleLastKnownRecord(org.onebusaway.admin.model.json.VehicleLastKnownRecord)

Aggregations

VehicleLastKnownRecord (org.onebusaway.admin.model.json.VehicleLastKnownRecord)1 VehiclePullout (org.onebusaway.admin.model.json.VehiclePullout)1 VehicleDetailBuilder (org.onebusaway.admin.util.VehicleDetailBuilder)1