org.onebusaway.transit_data_federation.services.service_alerts
Interface ServiceAlertsService


public interface ServiceAlertsService


Method Summary
 ServiceAlerts.ServiceAlert createOrUpdateServiceAlert(ServiceAlerts.ServiceAlert.Builder builder, String defaultAgencyId)
          Create a service alert.
 List<ServiceAlerts.ServiceAlert> getAllServiceAlerts()
           
 ServiceAlerts.ServiceAlert getServiceAlertForId(org.onebusaway.gtfs.model.AgencyAndId serviceAlertId)
           
 List<ServiceAlerts.ServiceAlert> getServiceAlerts(SituationQueryBean query)
           
 List<ServiceAlerts.ServiceAlert> getServiceAlertsForAgencyId(long time, String agencyId)
          This returns the set of service alerts affecting a particular agency, as determined by ServiceAlerts.Affects.getAgencyId().
 List<ServiceAlerts.ServiceAlert> getServiceAlertsForFederatedAgencyId(String agencyId)
          This returns all the service alerts with the specified federated agency id, as set in ServiceAlerts.ServiceAlert.getId() and in the call to #createServiceAlert(String, org.onebusaway.transit_data_federation.services.service_alerts.ServiceAlerts.ServiceAlert.Builder) .
 List<ServiceAlerts.ServiceAlert> getServiceAlertsForStopCall(long time, BlockInstance blockInstance, BlockStopTimeEntry blockStopTime, org.onebusaway.gtfs.model.AgencyAndId vehicleId)
           
 List<ServiceAlerts.ServiceAlert> getServiceAlertsForStopId(long time, org.onebusaway.gtfs.model.AgencyAndId stopId)
           
 List<ServiceAlerts.ServiceAlert> getServiceAlertsForStopIds(long time, Iterable<org.onebusaway.gtfs.model.AgencyAndId> stopIds)
           
 List<ServiceAlerts.ServiceAlert> getServiceAlertsForVehicleJourney(long time, BlockTripInstance blockTripInstance, org.onebusaway.gtfs.model.AgencyAndId vehicleId)
           
 void removeAllServiceAlertsForFederatedAgencyId(String agencyId)
          Remove all service alerts with the specified agency id.
 void removeServiceAlert(org.onebusaway.gtfs.model.AgencyAndId serviceAlertId)
           
 void removeServiceAlerts(List<org.onebusaway.gtfs.model.AgencyAndId> serviceAlertIds)
           
 

Method Detail

createOrUpdateServiceAlert

ServiceAlerts.ServiceAlert createOrUpdateServiceAlert(ServiceAlerts.ServiceAlert.Builder builder,
                                                      String defaultAgencyId)
Create a service alert. To assist with data federation in the TransitDataService, each service alert is assigned to an agency, as determined by the 'agencyId' parameter. This doesn't mean that the service alert is 'active' for the agency (as returned by getServiceAlertsForAgencyId(long, String)) but it will be returned in a call to getServiceAlertsForFederatedAgencyId(String). This also determines the agency id used in the service alerts id ( ServiceAlerts.ServiceAlert.getId()).

Parameters:
builder - the filled-in service alert builder
defaultAgencyId - the agency to assign the service alert to
Returns:
the built service alert

removeServiceAlert

void removeServiceAlert(org.onebusaway.gtfs.model.AgencyAndId serviceAlertId)

removeServiceAlerts

void removeServiceAlerts(List<org.onebusaway.gtfs.model.AgencyAndId> serviceAlertIds)

removeAllServiceAlertsForFederatedAgencyId

void removeAllServiceAlertsForFederatedAgencyId(String agencyId)
Remove all service alerts with the specified agency id. This would remove all the service alerts returned by a call to getServiceAlertsForFederatedAgencyId(String).

Parameters:
agencyId -

getServiceAlertForId

ServiceAlerts.ServiceAlert getServiceAlertForId(org.onebusaway.gtfs.model.AgencyAndId serviceAlertId)

getAllServiceAlerts

List<ServiceAlerts.ServiceAlert> getAllServiceAlerts()

getServiceAlertsForFederatedAgencyId

List<ServiceAlerts.ServiceAlert> getServiceAlertsForFederatedAgencyId(String agencyId)
This returns all the service alerts with the specified federated agency id, as set in ServiceAlerts.ServiceAlert.getId() and in the call to #createServiceAlert(String, org.onebusaway.transit_data_federation.services.service_alerts.ServiceAlerts.ServiceAlert.Builder) . Contrast this with getServiceAlertsForAgencyId(long, String), which find service alerts affecting a particular agency.

Parameters:
agencyId -
Returns:

getServiceAlertsForAgencyId

List<ServiceAlerts.ServiceAlert> getServiceAlertsForAgencyId(long time,
                                                             String agencyId)
This returns the set of service alerts affecting a particular agency, as determined by ServiceAlerts.Affects.getAgencyId().

Parameters:
time -
agencyId -
Returns:
the set of service alerts affecting the specified agency

getServiceAlertsForStopId

List<ServiceAlerts.ServiceAlert> getServiceAlertsForStopId(long time,
                                                           org.onebusaway.gtfs.model.AgencyAndId stopId)

getServiceAlertsForStopIds

List<ServiceAlerts.ServiceAlert> getServiceAlertsForStopIds(long time,
                                                            Iterable<org.onebusaway.gtfs.model.AgencyAndId> stopIds)

getServiceAlertsForStopCall

List<ServiceAlerts.ServiceAlert> getServiceAlertsForStopCall(long time,
                                                             BlockInstance blockInstance,
                                                             BlockStopTimeEntry blockStopTime,
                                                             org.onebusaway.gtfs.model.AgencyAndId vehicleId)

getServiceAlertsForVehicleJourney

List<ServiceAlerts.ServiceAlert> getServiceAlertsForVehicleJourney(long time,
                                                                   BlockTripInstance blockTripInstance,
                                                                   org.onebusaway.gtfs.model.AgencyAndId vehicleId)

getServiceAlerts

List<ServiceAlerts.ServiceAlert> getServiceAlerts(SituationQueryBean query)


Copyright © 2012 OneBusAway. All Rights Reserved.