Permalink
Browse files

route_type_name support

  • Loading branch information...
1 parent 7c02503 commit 4f9ad7a9d8bf7cff441fd542882b881e5ec28c38 novalis committed Jun 28, 2012
View
10 opentripplanner-routing/src/main/java/org/opentripplanner/routing/core/EdgeNarrative.java
@@ -36,8 +36,14 @@
public TraverseMode getMode();
public String getName();
-
- /* True if the name is automatically generated rather than coming from OSM or GTFS */
+
+ /** The name of the transit mode used; null when no name is specified, or
+ * the edge is not a transit edge
+ * @return
+ */
+ public String getTransitModeName();
+
+ /** True if the name is automatically generated rather than coming from OSM or GTFS */
public boolean hasBogusName();
public Geometry getGeometry();
View
4 ...pplanner-routing/src/main/java/org/opentripplanner/routing/edgetype/TransitNarrative.java
@@ -43,6 +43,10 @@ public String getName() {
return GtfsLibrary.getRouteName(trip.getRoute());
}
+ public String getTransitModeName() {
+ return trip.getRoute().getTypeName();
+ }
+
@Override
public Trip getTrip() {
if (headsign == null) {
View
4 opentripplanner-routing/src/main/java/org/opentripplanner/routing/graph/AbstractEdge.java
@@ -248,4 +248,8 @@ public boolean isValid (Vertex from, Vertex to) {
}
}
+ @Override
+ public String getTransitModeName() {
+ return null;
+ }
}

0 comments on commit 4f9ad7a

Please sign in to comment.