org.onebusaway.transit_data.model.trips
Class TripStatusBean

java.lang.Object
  extended by org.onebusaway.transit_data.model.trips.TripStatusBean
All Implemented Interfaces:
Serializable

public final class TripStatusBean
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
TripStatusBean()
           
 
Method Summary
 TripBean getActiveTrip()
           
 int getBlockTripSequence()
           
 StopBean getClosestStop()
           
 int getClosestStopTimeOffset()
          The time offset, in seconds, from the closest stop to the current position of the transit vehicle among the stop times of the current trip.
 double getDistanceAlongTrip()
          The vehicle's distance along the trip.
 FrequencyBean getFrequency()
           
 double getLastKnownDistanceAlongTrip()
           
 CoordinatePoint getLastKnownLocation()
           
 double getLastKnownOrientation()
           
 long getLastLocationUpdateTime()
           
 long getLastUpdateTime()
           
 CoordinatePoint getLocation()
           
 StopBean getNextStop()
           
 double getNextStopDistanceFromVehicle()
           
 int getNextStopTimeOffset()
          The time offset, in seconds, from the next stop to the current position of the transit vehicle according to the schedule.
 double getOrientation()
          In degrees, 0º is East, 90º is North, 180º is West, and 270º is South
 String getPhase()
           
 double getScheduledDistanceAlongTrip()
          The vehicle's scheduled distance along the trip.
 double getScheduleDeviation()
           
 long getServiceDate()
           
 List<ServiceAlertBean> getSituations()
           
 String getStatus()
           
 double getTotalDistanceAlongTrip()
           
 String getVehicleId()
           
 boolean isDistanceAlongTripSet()
           
 boolean isLastKnownDistanceAlongTripSet()
           
 boolean isLastKnownOrientationSet()
           
 boolean isOrientationSet()
           
 boolean isPredicted()
           
 boolean isScheduleDeviationSet()
           
 void setActiveTrip(TripBean activeTrip)
           
 void setBlockTripSequence(int blockTripSequence)
           
 void setClosestStop(StopBean closestStop)
           
 void setClosestStopTimeOffset(int closestStopTimeOffset)
          See description in getClosestStopTimeOffset().
 void setDistanceAlongTrip(double distanceAlongTrip)
          See description in getDistanceAlongTrip().
 void setFrequency(FrequencyBean frequency)
           
 void setLastKnownDistanceAlongTrip(double lastKnownDistanceAlongTrip)
           
 void setLastKnownLocation(CoordinatePoint lastKnownLocation)
           
 void setLastKnownOrientation(double lastKnownOrientation)
           
 void setLastLocationUpdateTime(long lastLocationUpdateTime)
           
 void setLastUpdateTime(long time)
           
 void setLocation(CoordinatePoint location)
           
 void setNextStop(StopBean nextStop)
           
 void setNextStopDistanceFromVehicle(double d)
           
 void setNextStopTimeOffset(int nextStopTimeOffset)
           
 void setOrientation(double orientation)
           
 void setPhase(String phase)
           
 void setPredicted(boolean predicted)
           
 void setScheduledDistanceAlongTrip(double scheduledDistanceAlongTrip)
           
 void setScheduleDeviation(double scheduleDeviation)
           
 void setServiceDate(long serviceDate)
           
 void setSituations(List<ServiceAlertBean> situations)
           
 void setStatus(String status)
           
 void setTotalDistanceAlongTrip(double totalDistanceAlongTrip)
           
 void setVehicleId(String vehicleId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TripStatusBean

public TripStatusBean()
Method Detail

getActiveTrip

public TripBean getActiveTrip()

setActiveTrip

public void setActiveTrip(TripBean activeTrip)

getBlockTripSequence

public int getBlockTripSequence()

setBlockTripSequence

public void setBlockTripSequence(int blockTripSequence)

getServiceDate

public long getServiceDate()

setServiceDate

public void setServiceDate(long serviceDate)

getFrequency

public FrequencyBean getFrequency()

setFrequency

public void setFrequency(FrequencyBean frequency)

getScheduledDistanceAlongTrip

public double getScheduledDistanceAlongTrip()
The vehicle's scheduled distance along the trip.

Returns:
distance, in meters

setScheduledDistanceAlongTrip

public void setScheduledDistanceAlongTrip(double scheduledDistanceAlongTrip)

getTotalDistanceAlongTrip

public double getTotalDistanceAlongTrip()

setTotalDistanceAlongTrip

public void setTotalDistanceAlongTrip(double totalDistanceAlongTrip)

getPhase

public String getPhase()

setPhase

public void setPhase(String phase)

getStatus

public String getStatus()

setStatus

public void setStatus(String status)

isDistanceAlongTripSet

public boolean isDistanceAlongTripSet()
Returns:
true if getDistanceAlongTrip() has been set

setDistanceAlongTrip

public void setDistanceAlongTrip(double distanceAlongTrip)
See description in getDistanceAlongTrip().

Parameters:
distanceAlongTrip -

getDistanceAlongTrip

public double getDistanceAlongTrip()
The vehicle's distance along the trip.

Returns:
distance, in meters

getLocation

public CoordinatePoint getLocation()

setLocation

public void setLocation(CoordinatePoint location)

isOrientationSet

public boolean isOrientationSet()

getOrientation

public double getOrientation()
In degrees, 0º is East, 90º is North, 180º is West, and 270º is South


setOrientation

public void setOrientation(double orientation)

getClosestStop

public StopBean getClosestStop()

setClosestStop

public void setClosestStop(StopBean closestStop)

getClosestStopTimeOffset

public int getClosestStopTimeOffset()
The time offset, in seconds, from the closest stop to the current position of the transit vehicle among the stop times of the current trip. If the number is positive, the stop is coming up. If negative, the stop has already been passed.

Returns:
time, in seconds

setClosestStopTimeOffset

public void setClosestStopTimeOffset(int closestStopTimeOffset)
See description in getClosestStopTimeOffset().

Parameters:
closestStopTimeOffset - the time offset from the closest stop, in seconds

getNextStop

public StopBean getNextStop()

setNextStop

public void setNextStop(StopBean nextStop)

getNextStopTimeOffset

public int getNextStopTimeOffset()
The time offset, in seconds, from the next stop to the current position of the transit vehicle according to the schedule.

Returns:
time, in seconds

setNextStopTimeOffset

public void setNextStopTimeOffset(int nextStopTimeOffset)

getNextStopDistanceFromVehicle

public double getNextStopDistanceFromVehicle()

setNextStopDistanceFromVehicle

public void setNextStopDistanceFromVehicle(double d)

isPredicted

public boolean isPredicted()
Returns:
true if there is an real-time data for this trip, whether prediction or location

setPredicted

public void setPredicted(boolean predicted)

setLastUpdateTime

public void setLastUpdateTime(long time)

getLastUpdateTime

public long getLastUpdateTime()
Returns:
the time we last heard from the bus (Unix-time)

getLastLocationUpdateTime

public long getLastLocationUpdateTime()
Returns:
the time we last received a location update from the bus (Unix-time)

setLastLocationUpdateTime

public void setLastLocationUpdateTime(long lastLocationUpdateTime)

isLastKnownDistanceAlongTripSet

public boolean isLastKnownDistanceAlongTripSet()

getLastKnownDistanceAlongTrip

public double getLastKnownDistanceAlongTrip()

setLastKnownDistanceAlongTrip

public void setLastKnownDistanceAlongTrip(double lastKnownDistanceAlongTrip)

getLastKnownLocation

public CoordinatePoint getLastKnownLocation()

setLastKnownLocation

public void setLastKnownLocation(CoordinatePoint lastKnownLocation)

isLastKnownOrientationSet

public boolean isLastKnownOrientationSet()

getLastKnownOrientation

public double getLastKnownOrientation()

setLastKnownOrientation

public void setLastKnownOrientation(double lastKnownOrientation)

isScheduleDeviationSet

public boolean isScheduleDeviationSet()

getScheduleDeviation

public double getScheduleDeviation()

setScheduleDeviation

public void setScheduleDeviation(double scheduleDeviation)

getVehicleId

public String getVehicleId()

setVehicleId

public void setVehicleId(String vehicleId)

getSituations

public List<ServiceAlertBean> getSituations()

setSituations

public void setSituations(List<ServiceAlertBean> situations)


Copyright © 2011 OneBusAway. All Rights Reserved.