use of org.onebusaway.gtfs_transformer.collections.ServiceIdKey in project onebusaway-gtfs-modules by OneBusAway.
the class EntityRetentionGraph method retainTrip.
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));
}
}
Aggregations