@Entity
public class Route
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Route(int configRev,
GtfsRoute gtfsRoute,
java.util.List<TripPattern> tripPatternsForRoute,
TitleFormatter titleFormatter,
boolean shouldCombineShortAndLongNamesForRoutes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static int |
deleteFromRev(org.hibernate.Session session,
int configRev)
Deletes rev from the Routes table
|
boolean |
equals(java.lang.Object obj)
Needed because have a composite ID for Hibernate storage
|
java.lang.String |
getColor() |
int |
getConfigRev() |
java.lang.String |
getDescription() |
java.util.List<java.lang.String> |
getDirectionIds()
Returns list of direction IDs for the route.
|
Extent |
getExtent() |
java.lang.String |
getId() |
TripPattern |
getLongestTripPatternForDirection(java.lang.String directionId)
Returns longest trip pattern for the directionId specified.
|
java.util.List<TripPattern> |
getLongestTripPatternForEachDirection()
Returns the longest trip pattern for each direction ID for the route.
|
double |
getMaxAllowableDistanceFromSegment()
For specifying on a per route basis how far AVL report can be from
segment and still have it be considered a match.
|
java.lang.String |
getName() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getOrderedStopsByDirection()
For each GTFS direction ID returns list of stops that in the appropriate
order for the direction.
|
java.util.Collection<Vector> |
getPathSegments()
Returns unordered collection of path vectors associated with route
|
java.lang.Integer |
getRouteOrder() |
static java.util.List<Route> |
getRoutes(org.hibernate.Session session,
int configRev)
Returns List of Route objects for the specified database revision.
|
java.lang.String |
getShortName()
The short name is either specified by route_short_name in the routes.txt
GTFS file or if that is null it will be the long name name.
|
java.util.Collection<Stop> |
getStops()
Returns unordered collection of stops associated with route.
|
java.lang.String |
getTextColor() |
TripPattern |
getTripPattern(java.lang.String tripPatternId)
Returns the specified trip pattern, or null if that trip pattern doesn't
exist for the route.
|
java.util.List<TripPattern> |
getTripPatterns(java.lang.String directionId)
Returns list of trip patterns for the directionId specified.
|
java.lang.String |
getType() |
int |
hashCode()
Needed because have a composite ID for Hibernate storage
|
boolean |
isHidden() |
static void |
main(java.lang.String[] args)
Just for debugging
|
java.lang.String |
toString() |
public Route(int configRev, GtfsRoute gtfsRoute, java.util.List<TripPattern> tripPatternsForRoute, TitleFormatter titleFormatter, boolean shouldCombineShortAndLongNamesForRoutes)
configRev
- gtfsRoute
- tripPatternsForRoute
- titleFormatter
- shouldCombineShortAndLongNamesForRoutes
- public static int deleteFromRev(org.hibernate.Session session, int configRev) throws org.hibernate.HibernateException
session
- configRev
- org.hibernate.HibernateException
public static java.util.List<Route> getRoutes(org.hibernate.Session session, int configRev) throws org.hibernate.HibernateException
session
- configRev
- org.hibernate.HibernateException
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.Collection<Stop> getStops()
Synchronized because caching stops.
public TripPattern getTripPattern(java.lang.String tripPatternId)
tripPatternId
- public TripPattern getLongestTripPatternForDirection(java.lang.String directionId)
directionId
- public java.util.List<TripPattern> getLongestTripPatternForEachDirection()
public java.util.List<TripPattern> getTripPatterns(java.lang.String directionId)
directionId
- public java.util.List<java.lang.String> getDirectionIds()
public java.util.Collection<Vector> getPathSegments()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getOrderedStopsByDirection()
public int getConfigRev()
public java.lang.String getName()
public java.lang.String getShortName()
public java.lang.String getId()
public java.lang.String getColor()
public java.lang.String getTextColor()
public java.lang.Integer getRouteOrder()
public boolean isHidden()
public java.lang.String getType()
public java.lang.String getDescription()
public Extent getExtent()
public double getMaxAllowableDistanceFromSegment()
public static void main(java.lang.String[] args)
args
-