stopId = informed.getStopId();
for (GtfsRealtime.EntitySelector entitySelector : informedEntityList) { if (entitySelector.hasStopId()) { String prefix = "alert entity ID " + entityId + " stop_id " + entitySelector.getStopId(); if (!gtfsMetadata.getStopIds().contains(entitySelector.getStopId())) { Integer locationType = gtfsMetadata.getStopToLocationTypeMap().get(entitySelector.getStopId()); if (locationType != null && locationType != 0) {
private Affects.Builder getEntitySelectorAsAffects(EntitySelector selector, Map agencyIdMap) { Affects.Builder affects = Affects.newBuilder(); if (selector.hasAgencyId()) { String agencyId = selector.getAgencyId(); if (agencyIdMap != null && agencyIdMap.get(agencyId) != null) { agencyId = (String) agencyIdMap.get(agencyId); } affects.setAgencyId(agencyId); } if (selector.hasRouteId()) { Id routeId = _entitySource.getRouteId(selector.getRouteId()); affects.setRouteId(routeId); } if (selector.hasStopId()) { Id stopId = _entitySource.getStopId(selector.getStopId()); affects.setStopId(stopId); } if (selector.hasTrip()) { TripDescriptor trip = selector.getTrip(); if (trip.hasTripId()) affects.setTripId(_entitySource.getTripId(trip.getTripId())); else if (trip.hasRouteId()) affects.setRouteId(_entitySource.getRouteId(trip.getRouteId())); } return affects; }
esm.setStopId(es.getStopId());
/** * <code>optional string stop_id = 5;</code> */ public Builder clearStopId() { bitField0_ = (bitField0_ & ~0x00000010); stopId_ = getDefaultInstance().getStopId(); onChanged(); return this; } /**
private String createId(String id, EntitySelector informed) { return id + " " + (informed.hasAgencyId () ? informed.getAgencyId () : " null ") + " " + (informed.hasRouteId () ? informed.getRouteId () : " null ") + " " + (informed.hasTrip() && informed.getTrip().hasDirectionId() ? informed.getTrip().hasDirectionId() : " null ") + " " + (informed.hasRouteType () ? informed.getRouteType () : " null ") + " " + (informed.hasStopId () ? informed.getStopId () : " null ") + " " + (informed.hasTrip() && informed.getTrip().hasTripId() ? informed.getTrip().getTripId() : " null "); }
/** * <code>optional string stop_id = 5;</code> */ public Builder clearStopId() { bitField0_ = (bitField0_ & ~0x00000010); stopId_ = getDefaultInstance().getStopId(); onChanged(); return this; } /**