Class GtfsReader


  • public class GtfsReader
    extends Object
    Top level GTFS reader for one or more GTFS files. The ordering in which the file are read (presuming a handler has been registered for them) is:
    • /
    Author:
    markr
    • Constructor Detail

      • GtfsReader

        protected GtfsReader​(URL gtfsLocation,
                             GtfsColumnType gtfsColumnConfiguration)
        Constructor
        Parameters:
        gtfsLocation - url of the location of the GTFS files, this should either be a directory containing uncompressed *.txt files or alternatively a *.zip file containing the *.txt files
        gtfsColumnConfiguration - initial column configuration for all created readers/handlers
    • Method Detail

      • read

        public void read​(Charset charSet)
        Read GTFS files based on the registered file handlers
        Parameters:
        charSet - to use for reading
      • addFileHandler

        public GtfsFileReaderBase addFileHandler​(GtfsFileHandler<? extends GtfsObject> gtfsFileHandler)
        Register a handler for a specific file type
        Parameters:
        gtfsFileHandler - to register
        Returns:
        the file reader that goes with this handler, it is newly created if no reader existed for the file type, otherwise the existing reader is returned