@Override public List<AgencyAndId> getShapePointIdsForRoutes(Collection<Route> routes) { if (routes.isEmpty()) return new ArrayList<AgencyAndId>(); List<AgencyAndId> shapePointIds = _ops.findByNamedQueryAndNamedParam( "shapePointIdsForRoutes", "routes", routes); List<AgencyAndId> validShapePointIds = new ArrayList<AgencyAndId>(); for (AgencyAndId shapePointId : shapePointIds) { if (shapePointId != null && shapePointId.hasValues()) validShapePointIds.add(shapePointId); } return validShapePointIds; }
private Set<AgencyAndId> getShapeIdsForStopSequenceBlock( StopSequenceCollection block) { Set<AgencyAndId> shapeIds = new HashSet<AgencyAndId>(); for (StopSequence sequence : block.getStopSequences()) { for (BlockTripEntry blockTrip : sequence.getTrips()) { TripEntry trip = blockTrip.getTrip(); AgencyAndId shapeId = trip.getShapeId(); if (shapeId != null && shapeId.hasValues()) shapeIds.add(shapeId); } } return shapeIds; }
private Set<AgencyAndId> getShapeIdsForStopSequenceBlock( StopSequenceCollection block) { Set<AgencyAndId> shapeIds = new HashSet<AgencyAndId>(); for (StopSequence sequence : block.getStopSequences()) { for (BlockTripEntry blockTrip : sequence.getTrips()) { TripEntry trip = blockTrip.getTrip(); AgencyAndId shapeId = trip.getShapeId(); if (shapeId != null && shapeId.hasValues()) shapeIds.add(shapeId); } } return shapeIds; }
@Override public ListBean<String> getShapeIdsForAgencyId(String agencyId) { Set<AgencyAndId> shapeIds = new HashSet<AgencyAndId>(); for (TripEntry trip : _transitGraphDao.getAllTrips()) { AgencyAndId shapeId = trip.getShapeId(); if (shapeId == null || !shapeId.hasValues()) continue; if (!shapeId.getAgencyId().equals(agencyId)) continue; shapeIds.add(shapeId); } List<String> ids = new ArrayList<String>(); for (AgencyAndId shapeId : shapeIds) { String id = AgencyAndIdLibrary.convertToString(shapeId); ids.add(id); } Collections.sort(ids); return new ListBean<String>(ids, false); }
directionId = NO_DIRECTION_ID; AgencyAndId shapeId = trip.getShapeId(); if (shapeId == null || !shapeId.hasValues()) shapeId = NO_SHAPE_ID; List<StopEntry> stops = getStopTimesAsStops(trip.getStopTimes());
directionId = NO_DIRECTION_ID; AgencyAndId shapeId = trip.getShapeId(); if (shapeId == null || !shapeId.hasValues()) shapeId = NO_SHAPE_ID; List<StopEntry> stops = getStopTimesAsStops(trip.getStopTimes());
for (TripEntry trip : _transitGraphDao.getAllTrips()) { AgencyAndId shapeId = trip.getShapeId(); if (shapeId != null && shapeId.hasValues()) shapeIds.add(shapeId);
for (TripEntry trip : _transitGraphDao.getAllTrips()) { AgencyAndId shapeId = trip.getShapeId(); if (shapeId != null && shapeId.hasValues()) shapeIds.add(shapeId);
for (TripEntry trip : _transitGraphDao.getAllTrips()) { AgencyAndId shapeId = trip.getShapeId(); if (shapeId != null && shapeId.hasValues()) shapeIds.add(shapeId);
if (shapeId == null || !shapeId.hasValues()) { return;
if (shapeId == null || !shapeId.hasValues()) { return;
for (TripEntry trip : _transitGraphDao.getAllTrips()) { AgencyAndId shapeId = trip.getShapeId(); if (shapeId != null && shapeId.hasValues()) shapeIds.add(shapeId);
if (shapeId != null && shapeId.hasValues()) { List<ProjectedPoint> shapePoints = getShapePointsForShapeId( shapePointCache, shapeId);
private void retainTrip(Trip trip, boolean retainUp) { if (retainUp) { for (StopTime stopTime : _dao.getStopTimesForTrip(trip)) retainUp(stopTime); if (_retainBlocks && trip.getBlockId() != null) { AgencyAndId blockId = new AgencyAndId(trip.getId().getAgencyId(), trip.getBlockId()); retainUp(new BlockIdKey(blockId)); } for (Frequency frequency : _dao.getFrequenciesForTrip(trip)) retainUp(frequency); } else { retainDown(trip.getRoute()); retainDown(new ServiceIdKey(trip.getServiceId())); AgencyAndId shapeId = trip.getShapeId(); if (shapeId != null && shapeId.hasValues()) retainDown(new ShapeIdKey(shapeId)); } }
if (shapeId != null && shapeId.hasValues()) tripBean.setShapeId(ApplicationBeanLibrary.getId(shapeId));
if (shapeId != null && shapeId.hasValues()) tripBean.setShapeId(ApplicationBeanLibrary.getId(shapeId));