Package org.onebusaway.transit_data_federation.impl.transit_graph

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.RouteEntryImpl


    RouteEntriesFactory factory = new RouteEntriesFactory();
    factory.setGtfsDao(gtfsDao);
    factory.setUniqueService(new UniqueServiceImpl());
    factory.processRoutes(graph);

    RouteEntryImpl routeEntryA = graph.getRouteForId(routeA.getId());

    RouteEntryImpl routeEntryB = graph.getRouteForId(routeB.getId());

    List<RouteEntry> routes = graph.getAllRoutes();
    assertEquals(2, routes.size());
    assertTrue(routes.contains(routeEntryA));
    assertTrue(routes.contains(routeEntryB));
View Full Code Here


      List<Trip> tripsForRoute = _gtfsDao.getTripsForRoute(route);

      _log.info("trips to process: " + tripsForRoute.size());
      int tripIndex = 0;
      RouteEntryImpl routeEntry = graph.getRouteForId(route.getId());
      ArrayList<TripEntry> tripEntries = new ArrayList<TripEntry>();

      for (Trip trip : tripsForRoute) {
        tripIndex++;
        if (tripIndex % 500 == 0)
          _log.info("trips processed: " + tripIndex + "/"
              + tripsForRoute.size());
        TripEntryImpl tripEntry = processTrip(graph, trip);
        if (tripEntry != null) {
          tripEntry.setRoute(routeEntry);
          tripEntries.add(tripEntry);
        }
      }

      tripEntries.trimToSize();
      routeEntry.setTrips(tripEntries);
    }

    if (_stopTimeEntriesFactory.getInvalidStopToShapeMappingExceptionCount() > 0
        && _throwExceptionOnInvalidStopToShapeMappingException) {
      throw new IllegalStateException(
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.impl.transit_graph.RouteEntryImpl

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.