Search in sources :

Example 16 with SituationQueryBean

use of org.onebusaway.transit_data.model.service_alerts.SituationQueryBean in project onebusaway-application-modules by camsys.

the class ArrivalsAndDeparturesAction method getServiceAlertsForStop.

private List<ServiceAlertBean> getServiceAlertsForStop(String stopId) {
    SituationQueryBean query = new SituationQueryBean();
    SituationQueryBean.AffectsBean affects = new SituationQueryBean.AffectsBean();
    query.getAffects().add(affects);
    affects.setStopId(stopId);
    ListBean<ServiceAlertBean> alerts = _transitDataService.getServiceAlerts(query);
    if (alerts != null) {
        return alerts.getList();
    }
    return Collections.emptyList();
}
Also used : SituationQueryBean(org.onebusaway.transit_data.model.service_alerts.SituationQueryBean) ServiceAlertBean(org.onebusaway.transit_data.model.service_alerts.ServiceAlertBean)

Aggregations

SituationQueryBean (org.onebusaway.transit_data.model.service_alerts.SituationQueryBean)16 ServiceAlertBean (org.onebusaway.transit_data.model.service_alerts.ServiceAlertBean)10 SituationAffectsBean (org.onebusaway.transit_data.model.service_alerts.SituationAffectsBean)6 AgencyAndId (org.onebusaway.gtfs.model.AgencyAndId)5 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)4 StopGroupBean (org.onebusaway.transit_data.model.StopGroupBean)4 RouteBean (org.onebusaway.transit_data.model.RouteBean)2 StopBean (org.onebusaway.transit_data.model.StopBean)2 StopGroupingBean (org.onebusaway.transit_data.model.StopGroupingBean)2 StopsForRouteBean (org.onebusaway.transit_data.model.StopsForRouteBean)2 PtSituationElementStructure (uk.org.siri.siri.PtSituationElementStructure)2 PtSituationElementStructure (uk.org.siri.siri_2.PtSituationElementStructure)2 StatusGroup (org.onebusaway.enterprise.webapp.actions.status.model.StatusGroup)1 StatusItem (org.onebusaway.enterprise.webapp.actions.status.model.StatusItem)1 AgencyWithCoverageBean (org.onebusaway.transit_data.model.AgencyWithCoverageBean)1 AffectsBean (org.onebusaway.transit_data.model.service_alerts.SituationQueryBean.AffectsBean)1 MonitoredStopVisitStructure (uk.org.siri.siri.MonitoredStopVisitStructure)1 VehicleActivityStructure (uk.org.siri.siri.VehicleActivityStructure)1 MonitoredStopVisitStructure (uk.org.siri.siri_2.MonitoredStopVisitStructure)1