org.onebusaway.transit_data_federation.impl.realtime
Class BlockLocationRecord
java.lang.Object
org.onebusaway.transit_data_federation.impl.realtime.BlockLocationRecord
public class BlockLocationRecord
- extends Object
A block location record is a database-serializable record that captures the
real-time position and schedule deviation for a transit vehicle at a
particular point in time. The record includes trip instance data and vehicle
id where available.
This class is mean for internal use.
- Author:
- bdferris
BlockLocationRecord
public BlockLocationRecord()
builder
public static BlockLocationRecord.Builder builder()
getId
public int getId()
- Returns:
- a generated numeric id for this record
getBlockId
public org.onebusaway.gtfs.model.AgencyAndId getBlockId()
- Returns:
- the block id of the transit trip
getTripId
public org.onebusaway.gtfs.model.AgencyAndId getTripId()
- Returns:
- the trip id of the transit trip
getServiceDate
public long getServiceDate()
- Returns:
- the service date for the trip instance (Unix-time)
getTime
public long getTime()
- Returns:
- the time the record was recorded (Unix-time)
isScheduleDeviationSet
public boolean isScheduleDeviationSet()
getScheduleDeviation
public Double getScheduleDeviation()
- Returns:
- schedule deviation, in seconds, (+deviation is late, -deviation is
early)
isDistanceAlongBlockSet
public boolean isDistanceAlongBlockSet()
getDistanceAlongBlock
public Double getDistanceAlongBlock()
- Returns:
- the distance traveled along the block
getDistanceAlongTrip
public Double getDistanceAlongTrip()
isLocationSet
public boolean isLocationSet()
getLocationLat
public Double getLocationLat()
getLocationLon
public Double getLocationLon()
getLocation
public CoordinatePoint getLocation()
isOrientationSet
public boolean isOrientationSet()
getOrientation
public Double getOrientation()
- In degrees, 0º is East, 90º is North, 180º is West, and 270º is South
getTimepointId
public org.onebusaway.gtfs.model.AgencyAndId getTimepointId()
getTimepointScheduledTime
public long getTimepointScheduledTime()
getTimepointPredictedTime
public long getTimepointPredictedTime()
getPhase
public EVehiclePhase getPhase()
getStatus
public String getStatus()
getVehicleId
public org.onebusaway.gtfs.model.AgencyAndId getVehicleId()
- Returns:
- the vehicle id of the transit vehicle servicing the trip, when
available
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012 OneBusAway. All Rights Reserved.