Package org.goplanit.gtfs.reader
Class GtfsReader
- java.lang.Object
-
- org.goplanit.gtfs.reader.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 Summary
Constructors Modifier Constructor Description protected
GtfsReader(URL gtfsLocation)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GtfsFileReaderBase
addFileHandler(GtfsFileHandler<? extends GtfsObject> gtfsFileHandler)
Register a handler for a specific file typevoid
read()
Read GTFS files based on the registered file handlers
-
-
-
Constructor Detail
-
GtfsReader
protected GtfsReader(URL gtfsLocation)
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
-
-
Method Detail
-
read
public void read()
Read GTFS files based on the registered file handlers
-
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
-
-