for (StopBean stop : stopsList) { _stopCodeToStopIdMap.put(agency.getAgency().getId() + "_" + stop.getCode().toUpperCase(), stop.getId());
private void groupByStop(StopSelectionTreeBean tree, Iterable<StopBean> stops) { for (StopBean stop : stops) { StopSelectionTreeBean subTree = tree; if (_splitStopNames) { List<NameBean> names = _locationNameSplitStrategy.splitLocationNameIntoParts(stop.getName()); for (NameBean name : names) subTree = subTree.getSubTree(name); } else { NameBean name = new NameBean(SelectionNameTypes.STOP_NAME, stop.getName()); subTree = subTree.getSubTree(name); } // As a last resort, we extend the tree by the stop number (guaranteed to // be unique) String code = stop.getCode() != null ? stop.getCode() : stop.getId(); NameBean name = new NameBean(SelectionNameTypes.STOP_DESCRIPTION, "Stop # " + code); subTree = subTree.getSubTree(name); subTree.setStop(stop); } }
private void groupByStop(StopSelectionTreeBean tree, Iterable<StopBean> stops) { for (StopBean stop : stops) { StopSelectionTreeBean subTree = tree; if (_splitStopNames) { List<NameBean> names = _locationNameSplitStrategy.splitLocationNameIntoParts(stop.getName()); for (NameBean name : names) subTree = subTree.getSubTree(name); } else { NameBean name = new NameBean(SelectionNameTypes.STOP_NAME, stop.getName()); subTree = subTree.getSubTree(name); } // As a last resort, we extend the tree by the stop number (guaranteed to // be unique) String code = stop.getCode() != null ? stop.getCode() : stop.getId(); NameBean name = new NameBean(SelectionNameTypes.STOP_DESCRIPTION, "Stop # " + code); subTree = subTree.getSubTree(name); subTree.setStop(stop); } }
public StopV2Bean getStop(StopBean stop) { StopV2Bean bean = new StopV2Bean(); bean.setCode(stop.getCode()); bean.setDirection(stop.getDirection()); bean.setId(stop.getId()); bean.setLat(stop.getLat()); bean.setLon(stop.getLon()); bean.setLocationType(stop.getLocationType()); bean.setName(stop.getName()); bean.setWheelchairBoarding(stop.getWheelchairBoarding()); List<String> routeIds = new ArrayList<String>(); for (RouteBean route : stop.getRoutes()) { routeIds.add(route.getId()); addToReferences(route); } bean.setRouteIds(routeIds); return bean; }
public StopV2Bean getStop(StopBean stop) { StopV2Bean bean = new StopV2Bean(); bean.setCode(stop.getCode()); bean.setDirection(stop.getDirection()); bean.setId(stop.getId()); bean.setLat(stop.getLat()); bean.setLon(stop.getLon()); bean.setLocationType(stop.getLocationType()); bean.setName(stop.getName()); bean.setWheelchairBoarding(stop.getWheelchairBoarding()); List<String> routeIds = new ArrayList<String>(); for (RouteBean route : stop.getRoutes()) { routeIds.add(route.getId()); addToReferences(route); } bean.setRouteIds(routeIds); return bean; }
addText(stop.getCode());