Package org.onebusaway.gtfs.serialization

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


        if (gtfsBundle.getDefaultBikesAllowed())
            reader.addEntityHandler(new EntityBikeability(true));

        for (Class<?> entityClass : reader.getEntityClasses()) {
            LOG.info("reading entities: " + entityClass.getName());
            reader.readEntities(entityClass);
            store.flush();
            // NOTE that agencies are first in the list and read before all other entity types, so it is effective to
            // set the agencyId here. Each feed ("bundle") is loaded by a separate reader, so there is no risk of
            // agency mappings accumulating.
            if (entityClass == Agency.class) {
View Full Code Here


        GtfsReader reader = new GtfsReader();
        reader.addEntityHandler(handler);
        reader.setInputLocation(bundle.getPath());
        if (bundle.getDefaultAgencyId() != null)
          reader.setDefaultAgencyId(bundle.getDefaultAgencyId());
        reader.readEntities(Stop.class);
      }

      PrintWriter out = getOutputAsPrinter(remainingArgs[remainingArgs.length - 1]);

      switch (format) {
View Full Code Here

    reader.setInputLocation(new File(path));

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

    reader.readEntities(Agency.class);
    reader.readEntities(Stop.class);
    return reader.getEntityStore().getAllEntitiesForType(Stop.class);
  }

  private static TreeUnionFind<AgencyAndId> loadExistingConsolidatedStops(
View Full Code Here

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

    reader.readEntities(Agency.class);
    reader.readEntities(Stop.class);
    return reader.getEntityStore().getAllEntitiesForType(Stop.class);
  }

  private static TreeUnionFind<AgencyAndId> loadExistingConsolidatedStops(
      String path) throws IOException {
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.