Class TripStatusBean
- java.lang.Object
-
- 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
Constructors Constructor Description TripStatusBean()
-
Method Summary
-
-
-
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)
-
getOccupancyStatus
public String getOccupancyStatus()
-
setOccupancyStatus
public void setOccupancyStatus(OccupancyStatus occupancyStatus)
-
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)
-
getVehicleType
public String getVehicleType()
-
setVehicleType
public void setVehicleType(String vehicleType)
-
isDistanceAlongTripSet
public boolean isDistanceAlongTripSet()
- Returns:
- true if
getDistanceAlongTrip()
has been set
-
setDistanceAlongTrip
public void setDistanceAlongTrip(double distanceAlongTrip)
See description ingetDistanceAlongTrip()
.- 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 ingetClosestStopTimeOffset()
.- 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)
-
getPreviousStop
public StopBean getPreviousStop()
-
setPreviousStop
public void setPreviousStop(StopBean previousStop)
-
getPreviousStopTimeOffset
public int getPreviousStopTimeOffset()
-
setPreviousStopTimeOffset
public void setPreviousStopTimeOffset(int previousStopTimeOffset)
-
getPreviousStopDistanceFromVehicle
public double getPreviousStopDistanceFromVehicle()
-
setPreviousStopDistanceFromVehicle
public void setPreviousStopDistanceFromVehicle(double previousStopDistanceFromVehicle)
-
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)
-
getTimepointPredictions
public List<TimepointPredictionBean> getTimepointPredictions()
-
setTimepointPredictions
public void setTimepointPredictions(List<TimepointPredictionBean> timepointPredictions)
-
-