stop.getId().setAgencyId(reader.getDefaultAgencyId());
private Stop doMap(org.onebusaway.gtfs.model.Stop rhs) { Stop lhs = new Stop(); lhs.setId(mapAgencyAndId(rhs.getId())); lhs.setName(rhs.getName()); lhs.setLat(rhs.getLat()); lhs.setLon(rhs.getLon()); lhs.setCode(rhs.getCode()); lhs.setDesc(rhs.getDesc()); lhs.setZoneId(rhs.getZoneId()); lhs.setUrl(rhs.getUrl()); lhs.setLocationType(rhs.getLocationType()); lhs.setParentStation(rhs.getParentStation()); lhs.setWheelchairBoarding(rhs.getWheelchairBoarding()); lhs.setDirection(rhs.getDirection()); lhs.setTimezone(rhs.getTimezone()); lhs.setVehicleType(rhs.getVehicleType()); lhs.setPlatformCode(rhs.getPlatformCode()); return lhs; } }
@Override public void handleEntity(Object bean) { if (!(bean instanceof Stop)) return; Stop stop = (Stop) bean; _ids.add(stop.getId()); }
@Override public void handleEntity(Object bean) { if (!(bean instanceof Stop)) return; Stop stop = (Stop) bean; _ids.add(stop.getId()); }
@Override public void handleEntity(Object bean) { if (!(bean instanceof Stop)) return; Stop stop = (Stop) bean; _ids.add(stop.getId()); }
private Map<String, Integer> getStopIndices(List<StopTime> stopTimes) { Map<String, Integer> indices = new HashMap<String, Integer>(); int index = 0; for (StopTime stopTime : stopTimes) { String id = stopTime.getStop().getId().getId(); if (!indices.containsKey(id)) { indices.put(id, index); } index++; } return indices; }
private Map<String, Integer> getStopIndices(List<StopTime> stopTimes) { Map<String, Integer> indices = new HashMap<String, Integer>(); int index = 0; for (StopTime stopTime : stopTimes) { String id = stopTime.getStop().getId().getId(); if (!indices.containsKey(id)) { indices.put(id, index); } index++; } return indices; }
private void fillRoutesForStopBean(Stop stop, StopBean sb) { Set<AgencyAndId> routeCollectionIds = _routeService.getRouteCollectionIdsForStop(stop.getId()); List<RouteBean> routeBeans = new ArrayList<RouteBean>( routeCollectionIds.size()); for (AgencyAndId routeCollectionId : routeCollectionIds) { RouteBean bean = _routeBeanService.getRouteForId(routeCollectionId); routeBeans.add(bean); } Collections.sort(routeBeans, _routeBeanComparator); sb.setRoutes(routeBeans); }
private Collection<Stop> getStopsForAgency(GtfsDao dao, Agency agency) { List<Stop> stops = new ArrayList<Stop>(); for (Stop stop : dao.getAllStops()) { if (agency.getId().equals(stop.getId().getAgencyId())) { stops.add(stop); } } return stops; }
private Map<String, Stop> getStopMap(GtfsDao dao) { Map<String, Stop> map = new HashMap<>(); for (Stop stop : dao.getAllStops()) { if (stop.getLocationType() == 0) { map.put(stop.getId().getId(), stop); } } return map; }
@Override public void handleEntity(Object bean) { Stop stop = (Stop) bean; Point point = _factory.createPoint(new Coordinate(stop.getLat(),stop.getLon())); if (_geometry.contains(point)) System.out.println(stop.getLat() + " " + stop.getLon() + " " + stop.getId()); }
@Override public void handleEntity(Object bean) { Stop stop = (Stop) bean; Point point = _factory.createPoint(new Coordinate(stop.getLat(),stop.getLon())); if (_geometry.contains(point)) System.out.println(stop.getLat() + " " + stop.getLon() + " " + stop.getId()); }
@Override public void handleEntity(Object bean) { Stop stop = (Stop) bean; Point point = _factory.createPoint(new Coordinate(stop.getLat(),stop.getLon())); if (_geometry.contains(point)) System.out.println(stop.getLat() + " " + stop.getLon() + " " + stop.getId()); }
@Override public void handleEntity(Object bean) { Stop stop = (Stop) bean; if (_bounds.contains(stop.getLat(), stop.getLon())) System.out.println(stop.getLat() + " " + stop.getLon() + " " + stop.getId()); }
@Override public void handleEntity(Object bean) { Stop stop = (Stop) bean; if (_bounds.contains(stop.getLat(), stop.getLon())) System.out.println(stop.getLat() + " " + stop.getLon() + " " + stop.getId()); }
@Override public void handleEntity(Object bean) { Stop stop = (Stop) bean; if (_bounds.contains(stop.getLat(), stop.getLon())) System.out.println(stop.getLat() + " " + stop.getLon() + " " + stop.getId()); }
@Override public String toString() { return "StopTime(seq=" + getStopSequence() + " stop=" + getStop().getId() + " trip=" + getTrip().getId() + " times=" + StopTimeFieldMappingFactory.getSecondsAsString(getArrivalTime()) + "-" + StopTimeFieldMappingFactory.getSecondsAsString(getDepartureTime()) + ")"; } }
@Override public String toString() { return "StopTime(seq=" + getStopSequence() + " stop=" + (getStop() == null?"NuLl":getStop().getId()) + " trip=" + (getTrip() == null?"NuLl":getTrip().getId()) + " times=" + StopTimeFieldMappingFactory.getSecondsAsString(getArrivalTime()) + "-" + StopTimeFieldMappingFactory.getSecondsAsString(getDepartureTime()) + ")"; } }