use of cl.smartcities.isci.transportinspector.database.BusStopHelper in project androidApp by InspectorIncognito.
the class BusSearchResultActivity method setRouteLists.
private void setRouteLists(Service service) {
RouteHelper routeHelper = new RouteHelper(this);
ServiceHelper serviceHelper = new ServiceHelper(this);
BusStopHelper busStopHelper = new BusStopHelper(this);
activePoints = routeHelper.getRoute(service.getName(), "I");
if (activePoints == null) {
activePoints = new ArrayList<>();
}
inactivePoints = routeHelper.getRoute(service.getName(), "R");
if (inactivePoints == null) {
inactivePoints = new ArrayList<>();
}
String busStopByService = serviceHelper.getBusStopByService(service.getName(), "I");
if (busStopByService == null || busStopByService.equals("")) {
activeBusStops = new ArrayList<>();
} else {
activeBusStops = busStopHelper.getAllBusStopsIn(busStopByService.split("-"));
}
busStopByService = serviceHelper.getBusStopByService(service.getName(), "R");
if (busStopByService == null || busStopByService.equals("")) {
inactiveBusStops = new ArrayList<>();
} else {
inactiveBusStops = busStopHelper.getAllBusStopsIn(busStopByService.split("-"));
}
}
Aggregations