Examples of GtfsBundles


Examples of org.onebusaway.transit_data_federation.bundle.model.GtfsBundles

    if (context.containsBean("entityReplacementStrategy")) {
      EntityReplacementStrategy strategy = (EntityReplacementStrategy) context.getBean("entityReplacementStrategy");
      multiReader.setEntityReplacementStrategy(strategy);
    }

    GtfsBundles gtfsBundles = getGtfsBundles(context);

    for (GtfsBundle gtfsBundle : gtfsBundles.getBundles()) {

      System.out.println("gtfs=" + gtfsBundle.getPath());

      GtfsReader reader = new GtfsReader();
      reader.setEntitySchemaFactory(factory);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.bundle.model.GtfsBundles

   * @param context
   * @return
   */
  private static GtfsBundles getGtfsBundles(ApplicationContext context) {

    GtfsBundles bundles = (GtfsBundles) context.getBean("gtfs-bundles");
    if (bundles != null)
      return bundles;

    GtfsBundle bundle = (GtfsBundle) context.getBean("gtfs-bundle");
    if (bundle != null) {
      bundles = new GtfsBundles();
      bundles.getBundles().add(bundle);
      return bundles;
    }

    throw new IllegalStateException(
        "must define either \"gtfs-bundles\" or \"gtfs-bundle\" in config");
View Full Code Here

Examples of org.onebusaway.transit_data_federation.bundle.model.GtfsBundles

      // This will get us basic behavior like property expansion
      contextPaths.add(0,
          "classpath:org/onebusaway/container/application-context-common.xml");

      ConfigurableApplicationContext context = ContainerLibrary.createContext(contextPaths);
      GtfsBundles bundles = (GtfsBundles) context.getBean("gtfs-bundles");
      allBundles.addAll(bundles.getBundles());
    }

    return allBundles;
  }
View Full Code Here

Examples of org.opentripplanner.graph_builder.model.GtfsBundles

        // allowed.
        MockGtfs gtfs = getSimpleGtfs();
        gtfs.putTrips(2, "r0", "sid0", "bikes_allowed=0,1");
        gtfs.putStopTimes("t0,t1", "s0,s1");

        GtfsBundles bundles = getGtfsAsBundles(gtfs);
        bundles.getBundles().get(0).setDefaultBikesAllowed(false);
        _builder.setGtfsBundles(bundles);

        Graph graph = new Graph();
        _builder.buildGraph(graph, _extra);
        graph.index(new DefaultStreetVertexIndexFactory());
View Full Code Here

Examples of org.opentripplanner.graph_builder.model.GtfsBundles

        // allowed.
        MockGtfs gtfs = getSimpleGtfs();
        gtfs.putTrips(2, "r0", "sid0", "bikes_allowed=0,2");
        gtfs.putStopTimes("t0,t1", "s0,s1");

        GtfsBundles bundles = getGtfsAsBundles(gtfs);
        bundles.getBundles().get(0).setDefaultBikesAllowed(true);
        _builder.setGtfsBundles(bundles);

        Graph graph = new Graph();
        _builder.buildGraph(graph, _extra);
        graph.index(new DefaultStreetVertexIndexFactory());
View Full Code Here

Examples of org.opentripplanner.graph_builder.model.GtfsBundles

    }

    private static GtfsBundles getGtfsAsBundles(MockGtfs gtfs) {
        GtfsBundle bundle = new GtfsBundle();
        bundle.setPath(gtfs.getPath());
        GtfsBundles bundles = new GtfsBundles();
        bundles.getBundles().add(bundle);
        return bundles;
    }
View Full Code Here

Examples of org.opentripplanner.graph_builder.model.GtfsBundles

        GtfsBundle bundle = new GtfsBundle();
        bundle.setPath(new File("src/test/resources/google_transit.zip"));

        ArrayList<GtfsBundle> bundleList = new ArrayList<GtfsBundle>();
        bundleList.add(bundle);
        GtfsBundles bundles = new GtfsBundles();
        bundles.setBundles(bundleList);
        gtfsBuilder.setGtfsBundles(bundles);

        HashMap<Class<?>, Object> extra = new HashMap<Class<?>, Object>();
        gtfsBuilder.buildGraph(graph, extra);
View Full Code Here

Examples of org.opentripplanner.graph_builder.model.GtfsBundles

     * Construct and set bundles all at once.
     * TODO why is there a wrapper class around a list of GTFS files?
     * TODO why is there a wrapper around GTFS files at all?
     */
    public GtfsGraphBuilderImpl (List<GtfsBundle> gtfsBundles) {
        GtfsBundles gtfsb = new GtfsBundles();
        gtfsb.setBundles(gtfsBundles);
        this.setGtfsBundles(gtfsb);
    }
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.