@Entity
public class StopPath
extends java.lang.Object
implements java.io.Serializable, org.hibernate.classic.Lifecycle
Constructor and Description |
---|
StopPath(int configRev,
java.lang.String pathId,
java.lang.String stopId,
int gtfsStopSeq,
boolean lastStopInTrip,
java.lang.String routeId,
boolean layoverStop,
boolean waitStop,
boolean scheduleAdherenceStop,
java.lang.Integer breakTime)
Simple constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
basicEquals(java.lang.Object obj)
For when seeing if TripPatternBase is unique in a collection.
|
int |
basicHashCode()
For when seeing if TripPatternBase is unique in a collection.
|
static java.lang.String |
determinePathId(java.lang.String previousStopId,
java.lang.String stopId)
For consistently naming the path Id.
|
boolean |
equals(java.lang.Object obj)
Needed because have a composite ID for Hibernate storage
|
double |
getAfterStopDistance()
How far a vehicle can be past a stop and still be considered at the stop.
|
double |
getBeforeStopDistance()
How far a vehicle can be ahead of a stop and be considered to have
arrived.
|
int |
getBreakTimeSec()
Returns how long driver is expected to have a break for at this stop.
|
int |
getConfigRev() |
Location |
getEndOfPathLocation()
Returns the end of the path, which is where the stop is.
|
int |
getGtfsStopSeq()
The stop_sequence for the trip from the GTFS stop_times.txt file
|
java.lang.String |
getId() |
double |
getLength() |
Location |
getLocation(int index) |
java.util.List<Location> |
getLocations() |
int |
getNumberSegments() |
static java.util.List<StopPath> |
getPaths(org.hibernate.Session session,
int configRev)
Returns List of StopPath objects for the specified database revision.
|
java.lang.String |
getRouteId() |
VectorWithHeading |
getSegmentVector(int segmentIndex)
Returns the vector for the specified segment.
|
java.util.List<VectorWithHeading> |
getSegmentVectors() |
java.lang.String |
getStopId() |
Location |
getStopLocation()
Returns the location of the stop at the end of the path.
|
java.lang.String |
getStopName()
Provides the name of the stop as obtained by a Core predictor.
|
java.lang.String |
getStopPathId() |
java.lang.String |
getTripPatternId() |
int |
hashCode()
Needed because have a composite ID for Hibernate storage
|
boolean |
isLastStopInTrip() |
boolean |
isLayoverStop()
Indicates that vehicle can leave route path before departing this stop
since the driver is taking a break.
|
boolean |
isScheduleAdherenceStop() |
boolean |
isWaitStop()
Indicates that vehicle is not supposed to depart the stop until the
scheduled departure time.
|
double |
length()
Returns the distance to travel along the path.
|
boolean |
onDelete(org.hibernate.Session arg0) |
void |
onLoad(org.hibernate.Session arg0,
java.io.Serializable arg1) |
boolean |
onSave(org.hibernate.Session arg0) |
boolean |
onUpdate(org.hibernate.Session arg0) |
void |
setLocations(java.util.ArrayList<Location> locations)
Locations are not available when StopPath is first created so
need to be able to set them after construction.
|
void |
setTripPatternId(java.lang.String tripPatternId)
So can set the tripPatternId once it is known (which happens after
StopPath is constructed).
|
java.lang.String |
toString() |
public StopPath(int configRev, java.lang.String pathId, java.lang.String stopId, int gtfsStopSeq, boolean lastStopInTrip, java.lang.String routeId, boolean layoverStop, boolean waitStop, boolean scheduleAdherenceStop, java.lang.Integer breakTime)
configRev
- pathId
- stopId
- gtfsStopSeq
- lastStopInTrip
- routeId
- layoverStop
- waitStop
- scheduleAdherenceStop
- breakTime
- public static java.util.List<StopPath> getPaths(org.hibernate.Session session, int configRev) throws org.hibernate.HibernateException
session
- configRev
- org.hibernate.HibernateException
public static java.lang.String determinePathId(java.lang.String previousStopId, java.lang.String stopId)
previousStopId
- stopId
- public double length()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int basicHashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean basicEquals(java.lang.Object obj)
public int getConfigRev()
public java.lang.String getId()
public java.lang.String getStopId()
public int getGtfsStopSeq()
public boolean isLastStopInTrip()
public java.lang.String getStopPathId()
public java.lang.String getStopName()
public java.lang.String getTripPatternId()
public java.lang.String getRouteId()
public void setLocations(java.util.ArrayList<Location> locations)
locations
- public Location getStopLocation()
public void setTripPatternId(java.lang.String tripPatternId)
tripPatternId
- public java.util.List<Location> getLocations()
public int getNumberSegments()
public Location getEndOfPathLocation()
public double getLength()
public java.util.List<VectorWithHeading> getSegmentVectors()
public VectorWithHeading getSegmentVector(int segmentIndex)
segmentIndex
- public Location getLocation(int index)
index
- public boolean isLayoverStop()
public int getBreakTimeSec()
public boolean isWaitStop()
public boolean isScheduleAdherenceStop()
public double getBeforeStopDistance()
public double getAfterStopDistance()
public boolean onDelete(org.hibernate.Session arg0) throws org.hibernate.CallbackException
onDelete
in interface org.hibernate.classic.Lifecycle
org.hibernate.CallbackException
public void onLoad(org.hibernate.Session arg0, java.io.Serializable arg1)
onLoad
in interface org.hibernate.classic.Lifecycle
public boolean onSave(org.hibernate.Session arg0) throws org.hibernate.CallbackException
onSave
in interface org.hibernate.classic.Lifecycle
org.hibernate.CallbackException
public boolean onUpdate(org.hibernate.Session arg0) throws org.hibernate.CallbackException
onUpdate
in interface org.hibernate.classic.Lifecycle
org.hibernate.CallbackException