Package org.onebusaway.transit_data_federation.bundle.model

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


   * @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

      // 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

TOP

Related Classes of org.onebusaway.transit_data_federation.bundle.model.GtfsBundles

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.