diff --git a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/ArrivalAndDepartureFilterByRouteType.java b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/ArrivalAndDepartureFilterByRouteType.java index bd4d7bfbf..ee7eec3ab 100644 --- a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/ArrivalAndDepartureFilterByRouteType.java +++ b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/ArrivalAndDepartureFilterByRouteType.java @@ -41,6 +41,10 @@ public ArrivalAndDepartureFilterByRouteType(String routeTypeCommaDelimited) { } + public List getRouteTypes() { + return routeTypes; + } + public boolean matches(ArrivalAndDepartureBean bean) { if (routeTypes == null || routeTypes.isEmpty()) return true; // no filter, everything matches diff --git a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/ArrivalsAndDeparturesQueryBean.java b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/ArrivalsAndDeparturesQueryBean.java index f40f507cd..d4159507b 100644 --- a/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/ArrivalsAndDeparturesQueryBean.java +++ b/onebusaway-transit-data/src/main/java/org/onebusaway/transit_data/model/ArrivalsAndDeparturesQueryBean.java @@ -49,6 +49,7 @@ public final class ArrivalsAndDeparturesQueryBean implements Serializable { private FilterChain systemFilterChain = new FilterChain(); private FilterChain instanceFilterChain = new FilterChain(); + private List routeTypes; public ArrivalsAndDeparturesQueryBean() { } @@ -143,9 +144,16 @@ public void setRouteTypes(List types) { if (types == null || types.isEmpty()) return; instanceFilterChain.add(new ArrivalAndDepartureFilterByRouteType(types)); } + public void setRouteType(String routeType) { if (routeType == null) return; - instanceFilterChain.add(new ArrivalAndDepartureFilterByRouteType(routeType)); + ArrivalAndDepartureFilterByRouteType arrivalAndDepartureFilterByRouteType = new ArrivalAndDepartureFilterByRouteType(routeType); + routeTypes = arrivalAndDepartureFilterByRouteType.getRouteTypes(); + instanceFilterChain.add(arrivalAndDepartureFilterByRouteType); + } + + public List getRouteTypes(){ + return routeTypes; } public void setAgenciesExcludingScheduled(HashSet agencies){