Skip to content

Commit

Permalink
Change to obtain the feed id from the route, for opentripplanner#1990
Browse files Browse the repository at this point in the history
  • Loading branch information
johannilsson committed Jun 30, 2015
1 parent 1748647 commit 001ec02
Showing 1 changed file with 1 addition and 6 deletions.
Expand Up @@ -700,12 +700,7 @@ public FrequencyEntry getSingleFrequencyEntry() {
* @return feed id for this trip pattern
*/
public String getFeedId() {
if (code != null && code.length() > 0) {
// The key stored in patternForId is the pattern code that is constructed as.
// Agency:RouteId:DirectionId:PatternNumber, the first part is the feed id.
return code.substring(0, code.indexOf(':'));
}
// If we cant obtain the feed id from the code, we can get it from the route.
// The feed id is the same as the agency id on the route, this allows us to obtain it from there.
return route.getId().getAgencyId();
}
}

0 comments on commit 001ec02

Please sign in to comment.