Examples of AgencyEntry


Examples of org.onebusaway.transit_data_federation.services.transit_graph.AgencyEntry

    return constructResult(stopBeans, limitExceeded);
  }

  @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));
    }
    return new ListBean<String>(ids, false);
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.AgencyEntry

    AgencyEntriesFactory factory = new AgencyEntriesFactory();
    factory.setGtfsDao(gtfsDao);
    factory.setUniqueService(new UniqueServiceImpl());
    factory.processAgencies(graph);

    AgencyEntry agencyEntryA = graph.getAgencyForId("A");
    assertEquals("A", agencyEntryA.getId());

    AgencyEntry agencyEntryB = graph.getAgencyForId("B");
    assertEquals("B", agencyEntryB.getId());

    List<AgencyEntry> agencies = graph.getAllAgencies();
    assertEquals(2, agencies.size());
    assertTrue(agencies.contains(agencyEntryA));
    assertTrue(agencies.contains(agencyEntryB));
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.AgencyEntry

  }

  @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));
    }
    return new ListBean<String>(ids, false);
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.AgencyEntry

  }

  @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);
    }
    return new ListBean<RouteBean>(routes, false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.