public class GtfsData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
logger |
Constructor and Description |
---|
GtfsData(int configRev,
java.lang.String notes,
java.util.Date zipFileLastModifiedTime,
boolean shouldStoreNewRevs,
java.lang.String projectId,
java.lang.String gtfsDirectoryName,
java.lang.String supplementDir,
boolean shouldCombineShortAndLongNamesForRoutes,
double pathOffsetDistance,
double maxStopToPathDistance,
double maxDistanceForEliminatingVertices,
int defaultWaitTimeAtStopMsec,
double maxSpeedKph,
double maxTravelTimeSegmentLength,
boolean trimPathBeforeFirstStopOfTrip,
TitleFormatter titleFormatter)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Agency> |
getAgencies() |
java.lang.String |
getAgencyId() |
java.util.List<Block> |
getBlocks() |
java.util.List<CalendarDate> |
getCalendarDates() |
java.util.List<Calendar> |
getCalendars() |
ConfigRevision |
getConfigRevision()
Returns information about the current revision.
|
java.util.List<FareAttribute> |
getFareAttributes() |
java.util.List<FareRule> |
getFareRules() |
java.util.Collection<Frequency> |
getFrequencies()
Returns collection of all the Frequency objects.
|
java.util.List<Frequency> |
getFrequencyList(java.lang.String tripId) |
GtfsRoute |
getGtfsRoute(java.lang.String routeId) |
java.util.Map<java.lang.String,GtfsRoute> |
getGtfsRoutesMap() |
GtfsStop |
getGtfsStop(java.lang.String stopId) |
java.util.List<GtfsStopTime> |
getGtfsStopTimesForTrip(java.lang.String tripId)
Returns list of GtfsStopTimes for the trip specified
|
GtfsTrip |
getGtfsTrip(java.lang.String tripId) |
StopPath |
getPath(java.lang.String tripPatternId,
java.lang.String pathId)
Returns the StopPath for the specified tripPatternId and pathId.
|
static java.lang.String |
getPathMapKey(java.lang.String tripPatternId,
java.lang.String pathId)
For use with pathsMap member.
|
java.util.Collection<StopPath> |
getPaths() |
java.lang.String |
getProperIdOfRoute(java.lang.String routeId)
If a route is configured to be a sub-route of a parent then this
method will return the route ID of the parent route.
|
java.util.List<Route> |
getRoutes() |
Stop |
getStop(java.lang.String stopId)
Gets the Stop from the stopsMap.
|
java.util.Collection<Stop> |
getStops() |
java.util.List<Transfer> |
getTransfers() |
TripPattern |
getTripPattern(java.lang.String tripPatternId)
Returns the specified trip pattern.
|
TripPattern |
getTripPatternByTripId(java.lang.String tripId) |
java.util.Map<TripPatternKey,TripPattern> |
getTripPatternMap() |
java.util.Collection<TripPattern> |
getTripPatterns() |
java.util.List<TripPattern> |
getTripPatterns(java.lang.String routeId) |
java.util.Collection<Trip> |
getTrips() |
boolean |
isStopTimesReadIn()
Returns true if GTFS stop times read in and are available
|
boolean |
isTripFrequencyBased(java.lang.String tripId)
Returns true if according to frequency.txt GTFS file that specified trip
is frequencies based and doesn't have exact_times set.
|
boolean |
isTripPatternIdAlreadyUsed(java.lang.String tripPatternId) |
boolean |
isTripsReadIn() |
void |
outputPathsAndStopsForGraphing(java.lang.String routeId)
Outputs data for specified route grouped by trip pattern.
|
void |
processData()
Does all the work.
|
void |
putPath(java.lang.String tripPatternId,
java.lang.String pathId,
StopPath path)
Adds the StopPath object to the pathMap.
|
static boolean |
routeNotFiltered(java.lang.String routeId)
Returns true if the routeId isn't supposed to be filtered out, as
specified by the transitime.gtfs.routeIdRegExPattern property.
|
static boolean |
tripNotFiltered(java.lang.String tripId)
Returns true if the tripId isn't supposed to be filtered out, as
specified by the transitime.gtfs.tripIdRegExPattern property.
|
public GtfsData(int configRev, java.lang.String notes, java.util.Date zipFileLastModifiedTime, boolean shouldStoreNewRevs, java.lang.String projectId, java.lang.String gtfsDirectoryName, java.lang.String supplementDir, boolean shouldCombineShortAndLongNamesForRoutes, double pathOffsetDistance, double maxStopToPathDistance, double maxDistanceForEliminatingVertices, int defaultWaitTimeAtStopMsec, double maxSpeedKph, double maxTravelTimeSegmentLength, boolean trimPathBeforeFirstStopOfTrip, TitleFormatter titleFormatter)
configRev
- notes
- zipFileLastModifiedTime
- shouldStoreNewRevs
- projectId
- gtfsDirectoryName
- supplementDir
- shouldCombineShortAndLongNamesForRoutes
- pathOffsetDistance
- maxStopToPathDistance
- maxDistanceForEliminatingVertices
- defaultWaitTimeAtStopMsec
- maxSpeedKph
- maxTravelTimeSegmentLength
- trimPathBeforeFirstStopOfTrip
- titleFormatter
- public java.lang.String getAgencyId()
public java.util.Map<java.lang.String,GtfsRoute> getGtfsRoutesMap()
public GtfsRoute getGtfsRoute(java.lang.String routeId)
routeId
- public GtfsTrip getGtfsTrip(java.lang.String tripId)
tripId
- public boolean isStopTimesReadIn()
public java.util.List<GtfsStopTime> getGtfsStopTimesForTrip(java.lang.String tripId)
tripId
- public java.util.Collection<Trip> getTrips()
public boolean isTripsReadIn()
public GtfsStop getGtfsStop(java.lang.String stopId)
public java.util.Collection<Stop> getStops()
public Stop getStop(java.lang.String stopId)
stopId
- public java.util.Collection<TripPattern> getTripPatterns()
public java.util.List<TripPattern> getTripPatterns(java.lang.String routeId)
routeId
- public TripPattern getTripPatternByTripId(java.lang.String tripId)
tripId
- The trip ID to return the TripPattern forpublic boolean isTripPatternIdAlreadyUsed(java.lang.String tripPatternId)
public java.util.Map<TripPatternKey,TripPattern> getTripPatternMap()
public TripPattern getTripPattern(java.lang.String tripPatternId)
tripPatternId
- public static java.lang.String getPathMapKey(java.lang.String tripPatternId, java.lang.String pathId)
tripPatternId
- pathId
- public StopPath getPath(java.lang.String tripPatternId, java.lang.String pathId)
tripPatternId
- pathId
- public java.util.Collection<StopPath> getPaths()
public void putPath(java.lang.String tripPatternId, java.lang.String pathId, StopPath path)
tripPatternId
- pathId
- path
- public java.util.List<Route> getRoutes()
public java.lang.String getProperIdOfRoute(java.lang.String routeId)
routeId
- public java.util.List<Block> getBlocks()
public java.util.List<Agency> getAgencies()
public boolean isTripFrequencyBased(java.lang.String tripId)
tripId
- public java.util.List<Frequency> getFrequencyList(java.lang.String tripId)
tripId
- public java.util.Collection<Frequency> getFrequencies()
public java.util.List<Calendar> getCalendars()
public java.util.List<CalendarDate> getCalendarDates()
public java.util.List<FareAttribute> getFareAttributes()
public java.util.List<FareRule> getFareRules()
public java.util.List<Transfer> getTransfers()
public ConfigRevision getConfigRevision()
public void outputPathsAndStopsForGraphing(java.lang.String routeId)
routeId
- public static boolean tripNotFiltered(java.lang.String tripId)
tripId
- public static boolean routeNotFiltered(java.lang.String routeId)
routeId
- public void processData()