Package org.onebusaway.gtfs.serialization

Examples of org.onebusaway.gtfs.serialization.GtfsReader.run()


       
        File gtfsFile = new File(Play.configuration.getProperty("application.publicGtfsDataDirectory"), snapshotMerge.snapshot.getFilename());
       
        reader.setInputLocation(gtfsFile);
          reader.setEntityStore(store);
          reader.run();
           
          Logger.info("GtfsImporter: listing agencies...");
         
        for (org.onebusaway.gtfs.model.Agency gtfsAgency : reader.getAgencies()) {
          
View Full Code Here


       
        File gtfsFile = new File(Play.configuration.getProperty("application.publicDataDirectory"), snapshotMerge.snapshot.getFilename());
       
        reader.setInputLocation(gtfsFile);
          reader.setEntityStore(store);
          reader.run();
           
          Logger.info("GtfsImporter: importing agencies...");
       
          GtfsSnapshotMergeTask agencyTask = new GtfsSnapshotMergeTask(snapshotMerge);
          agencyTask.startTask();
View Full Code Here

        reader.setEntityStore(dao);

        if (defaultAgencyId != null)
            reader.setDefaultAgencyId(defaultAgencyId);

        reader.run();

        CalendarService calendarService = createCalendarService(dao);

        return new GtfsContextImpl(dao, calendarService);
    }
View Full Code Here

    GtfsReader reader = new GtfsReader();
    reader.setDefaultAgencyId("1");
    reader.getEntityClasses().retainAll(Arrays.asList(Stop.class));
    reader.setInputLocation(new File(args[0]));
    reader.addEntityHandler(new EntityHandlerImpl(bounds));
    reader.run();
  }

  private static class EntityHandlerImpl implements EntityHandler {

    private CoordinateBounds _bounds;
View Full Code Here

    GtfsReader reader = new GtfsReader();
    reader.setDefaultAgencyId("1");
    reader.getEntityClasses().retainAll(Arrays.asList(Stop.class));
    reader.setInputLocation(new File(args[0]));
    reader.addEntityHandler(new EntityHandlerImpl(points));
    reader.run();
  }

  private static Geometry readPoints(String arg) throws NumberFormatException, IOException {
   
    BufferedReader reader = new BufferedReader(new FileReader(arg));
View Full Code Here

      for (Map.Entry<String, String> entry : bundle.getAgencyIdMappings().entrySet())
        reader.addAgencyIdMapping(entry.getKey(), entry.getValue());
      reader.getEntityClasses().retainAll(
          Arrays.asList(Agency.class, Stop.class));
      reader.addEntityHandler(handler);
      reader.run();
    }

    Set<AgencyAndId> ids = handler.getIds();

    InputStream in = IOLibrary.getPathAsInputStream(args[0]);
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.