@Override protected void renameKey(GtfsMergeContext context, AgencyAndId oldId, AgencyAndId newId) { GtfsRelationalDao source = context.getSource(); for (ShapePoint shapePoint : source.getShapePointsForShapeId(oldId)) { shapePoint.setShapeId(newId); } for (Trip trip : source.getTripsForShapeId(oldId)) { trip.setShapeId(newId); } }
@Override protected void renameKey(GtfsMergeContext context, AgencyAndId oldId, AgencyAndId newId) { GtfsRelationalDao source = context.getSource(); for (ShapePoint shapePoint : source.getShapePointsForShapeId(oldId)) { shapePoint.setShapeId(newId); } for (Trip trip : source.getTripsForShapeId(oldId)) { trip.setShapeId(newId); } }
private void updateShape(GtfsMutableRelationalDao dao, Trip trip, List<StopTime> stopTimes, Set<AgencyAndId> newShapeIds) { if (stopTimes.size() < 2) { trip.setShapeId(null); return; + lastStop.getId().getId(); AgencyAndId newShapeId = new AgencyAndId("1", id); trip.setShapeId(newShapeId);
private void updateShape(GtfsMutableRelationalDao dao, Trip trip, List<StopTime> stopTimes, Set<AgencyAndId> newShapeIds) { if (stopTimes.size() < 2) { trip.setShapeId(null); return; + lastStop.getId().getId(); AgencyAndId newShapeId = new AgencyAndId(shapeId.getAgencyId(), id); trip.setShapeId(newShapeId);
t.setShapeId(newShapeId);
private Trip createTrip(GtfsMutableRelationalDao dao, Trip referenceTrip, Trip atisTrip) { Trip trip = new Trip(); trip.setRoute(atisTrip.getRoute()); trip.setId(referenceTrip.getId()); trip.setTripHeadsign(atisTrip.getTripHeadsign()); trip.setDirectionId(atisTrip.getDirectionId()); trip.setShapeId(atisTrip.getShapeId()); trip.setPeakOffpeak(atisTrip.getPeakOffpeak()); trip.setMtaTripId(referenceTrip.getId().getId()); dao.saveOrUpdateEntity(trip); //_log.info("Created new trip: {}", trip.getId().getId()); return trip; }