Package org.onebusaway.exceptions

Examples of org.onebusaway.exceptions.NoSuchAgencyServiceException


  @Cacheable
  public TimeZone getTimeZoneForAgencyId(String agencyId) {
    AgencyNarrative narrative = _narrativeService.getAgencyForId(agencyId);
    if (narrative == null)
      throw new NoSuchAgencyServiceException(agencyId);
    return TimeZone.getTimeZone(narrative.getTimezone());
  }
View Full Code Here


  @Override
  public ListBean<String> getStopsIdsForAgencyId(String agencyId) {
    AgencyEntry agency = _transitGraphDao.getAgencyForId(agencyId);
    if (agency == null)
      throw new NoSuchAgencyServiceException(agencyId);
    List<String> ids = new ArrayList<String>();
    for (StopEntry stop : agency.getStops()) {
      AgencyAndId id = stop.getId();
      ids.add(AgencyAndIdLibrary.convertToString(id));
    }
View Full Code Here

  @Cacheable
  @Override
  public ListBean<String> getRouteIdsForAgencyId(String agencyId) {
    AgencyEntry agency = _graphDao.getAgencyForId(agencyId);
    if (agency == null)
      throw new NoSuchAgencyServiceException(agencyId);
    List<String> ids = new ArrayList<String>();
    for (RouteCollectionEntry routeCollection : agency.getRouteCollections()) {
      AgencyAndId id = routeCollection.getId();
      ids.add(AgencyAndIdLibrary.convertToString(id));
    }
View Full Code Here

  @Cacheable
  @Override
  public ListBean<RouteBean> getRoutesForAgencyId(String agencyId) {
    AgencyEntry agency = _graphDao.getAgencyForId(agencyId);
    if (agency == null)
      throw new NoSuchAgencyServiceException(agencyId);
    List<RouteBean> routes = new ArrayList<RouteBean>();
    for (RouteCollectionEntry routeCollection : agency.getRouteCollections()) {
      AgencyAndId routeId = routeCollection.getId();
      RouteBean route = _routeBeanService.getRouteForId(routeId);
      routes.add(route);
View Full Code Here

  @Override
  public FederatedService getServiceForAgencyId(String agencyId)
      throws ServiceAreaServiceException {
    FederatedService provider = _servicesByAgencyId.get(agencyId);
    if (provider == null)
      throw new NoSuchAgencyServiceException(agencyId);
    return provider;
  }
View Full Code Here

      throws ServiceAreaServiceException {
    Set<FederatedService> providers = new HashSet<FederatedService>();
    for (String id : agencyIds) {
      FederatedService provider = getServiceForAgencyId(id);
      if (provider == null)
        throw new NoSuchAgencyServiceException(id);
      providers.add(provider);
    }
    return getProviderFromProviders(providers);
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.exceptions.NoSuchAgencyServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.