private List<String> getAgencyIds() { if (_agencyIds == null) { List<String> agencyIds = new ArrayList<String>(); for(AgencyWithCoverageBean agenciesWithCoverage : _transitDataService.getAgenciesWithCoverage()) { agencyIds.add(agenciesWithCoverage.getAgency().getId()); } // see if another thread beat us to it if (_agencyIds == null) { _agencyIds = agencyIds; } } return _agencyIds; }
@Override public List<RouteBean> getRoutes() { List<RouteBean> allRoutes = new ArrayList<RouteBean>(); List<AgencyWithCoverageBean> agencies = _transitDataService.getAgenciesWithCoverage(); for (AgencyWithCoverageBean agency : agencies) { allRoutes.addAll(_transitDataService.getRoutesForAgencyId(agency.getAgency().getId()).getList()); } Collections.sort(allRoutes, (getShowAgencyNames() ? new AgencyAndRouteComparator() : new RouteComparator())); return allRoutes; } }
.getAgenciesWithCoverage()) { for (RouteBean routeBean : _transitDataService .getRoutesForAgencyId(agency.getAgency().getId()).getList()) { if (routeBean.getShortName() != null) if (_routeShortNameToRouteBeanMap.containsKey(routeBean.getShortName().toUpperCase())) { _stopCodeToStopIdMap.put(agency.getAgency().getId() + "_" + stop.getCode().toUpperCase(), stop.getId());
AgencyAndId potentialStopId = new AgencyAndId(agency.getAgency() .getId(), id);
public AgencyWithCoverageV2Bean getAgencyWithCoverage( AgencyWithCoverageBean awc) { AgencyWithCoverageV2Bean bean = new AgencyWithCoverageV2Bean(); bean.setAgencyId(awc.getAgency().getId()); bean.setLat(awc.getLat()); bean.setLon(awc.getLon()); bean.setLatSpan(awc.getLatSpan()); bean.setLonSpan(awc.getLonSpan()); addToReferences(awc.getAgency()); return bean; }
public AgencyWithCoverageV2Bean getAgencyWithCoverage( AgencyWithCoverageBean awc) { AgencyWithCoverageV2Bean bean = new AgencyWithCoverageV2Bean(); bean.setAgencyId(awc.getAgency().getId()); bean.setLat(awc.getLat()); bean.setLon(awc.getLon()); bean.setLatSpan(awc.getLatSpan()); bean.setLonSpan(awc.getLonSpan()); addToReferences(awc.getAgency()); return bean; }
AgencyBean agency = agencyWithCoverage.getAgency(); System.out.println("agency=" + agency.getId());
AgencyBean agency = agencyWithCoverage.getAgency(); System.out.println("agency=" + agency.getId());
AgencyBean agency = agencyWithCoverage.getAgency(); System.out.println("agency=" + agency.getId());
AgencyBean agency = agencyWithCoverage.getAgency();
public List<StopBean> getAllRevenueStops(AgencyWithCoverageBean agency) { SearchQueryBean query = new SearchQueryBean(); CoordinateBounds bounds = new CoordinateBounds(); double lat = agency.getLat(); double lon = agency.getLon(); double latSpan = agency.getLatSpan() / 2; double lonSpan = agency.getLonSpan() / 2; bounds.addPoint(lat - latSpan, lon - lonSpan); bounds.addPoint(lat + latSpan, lon + lonSpan); query.setBounds(bounds); query.setMaxCount(Integer.MAX_VALUE); return _scheduleHelperService.filterRevenueService(agency.getAgency(), getStops(query)); }