private void readDao(GtfsReader reader) throws IOException { dao = new GtfsRelationalDaoImpl(); reader.setEntityStore(dao); reader.setDefaultAgencyId(getFeedId().getId()); reader.run(); }
reader.setEntityStore(store); reader.setInternStrings(true); reader.setDefaultAgencyId(gtfsFeedId.getId());
/**** * Private Methods ****/ private void readGtfs() throws IOException { GenericMutableDao dao = _dao; if (!_entityTransformStrategies.isEmpty()) dao = new DaoInterceptor(_dao); _reader.setEntityStore(dao); if (_agencyId != null) _reader.setDefaultAgencyId(_agencyId); for (File path : _gtfsInputDirectories) { _log.info("reading gtfs from " + path); _reader.setInputLocation(path); _reader.run(); } }
/** * Read the GTFS data into an internal data model * * @return the amount of time to read the GTFS data, in seconds as a decimal (0.22) * @throws IOException */ private double readGtfsData() throws IOException { _log.info("Reading GTFS data from " + mPathToGtfsFile + "..."); mGtfsData = new GtfsDaoImpl(); mReader = new GtfsReader(); mReader.setInputLocation(mPathToGtfsFile); mReader.setEntityStore(mGtfsData); long startGtfsRead = System.nanoTime(); mReader.run(); double readTime = getElapsedTime(startGtfsRead, System.nanoTime()); _log.info(mPathToGtfsFile.getName() + " read in " + getElapsedTimeString(readTime)); return readTime; }
private void readReferenceGtfs() throws IOException { _log.info("reading reference GTFS at " + _gtfsReferenceDirectory); GenericMutableDao dao = new GtfsRelationalDaoImpl(); _referenceReader.setEntityStore(dao); if (_agencyId != null) _referenceReader.setDefaultAgencyId(_agencyId); _referenceReader.setInputLocation(_gtfsReferenceDirectory); _referenceReader.run(); _context.setReferenceReader(_referenceReader); }
public GtfsMutableRelationalDao read(GtfsReader reader) throws IOException { reader.setInputLocation(_path); GtfsRelationalDaoImpl dao = new GtfsRelationalDaoImpl(); reader.setEntityStore(dao); try { reader.run(); } finally { reader.close(); } return dao; }
public GtfsMutableRelationalDao read(GtfsReader reader) throws IOException { reader.setInputLocation(_path); GtfsRelationalDaoImpl dao = new GtfsRelationalDaoImpl(); reader.setEntityStore(dao); try { reader.run(); } finally { reader.close(); } return dao; }
reader.setEntityStore(store); reader.addEntityHandler(new EntityCounter());
reader.setEntityStore(store); reader.addEntityHandler(new EntityCounter());
reader.setEntityStore(store); reader.addEntityHandler(new EntityCounter());
dao.setPackShapePoints(true); dao.setPackStopTimes(true); reader.setEntityStore(dao); reader.run();
dao.setPackShapePoints(true); dao.setPackStopTimes(true); reader.setEntityStore(dao); reader.run();
reader.setEntityStore(dao); reader.run(); reader.close();
public static GtfsContext readGtfs(File path, String defaultAgencyId) throws IOException { GtfsRelationalDaoImpl dao = new GtfsRelationalDaoImpl(); GtfsReader reader = new GtfsReader(); reader.setInputLocation(path); reader.setEntityStore(dao); if (defaultAgencyId != null) reader.setDefaultAgencyId(defaultAgencyId); reader.run(); CalendarService calendarService = createCalendarService(dao); return new GtfsContextImpl(dao, calendarService); }