public abstract class GTFS extends Object
| Constructor and Description |
|---|
GTFS() |
| Modifier and Type | Method and Description |
|---|---|
static DataSource |
createDataSource(String url,
String username,
String password)
Create an automatically managed pool of database connections to the supplied JDBC database URL.
|
static void |
delete(String feedId,
DataSource dataSource)
Deletes all tables for the specified feed.
|
static FeedLoadResult |
export(String feedId,
String outFile,
DataSource dataSource,
boolean fromEditor)
Export a feed ID from the database to a zipped GTFS file in the specified export directory.
|
static FeedLoadResult |
load(String filePath,
DataSource dataSource)
Load the GTFS data in the specified file into the given JDBC DataSource.
|
static void |
main(String[] args)
A command-line interface that lets you load GTFS feeds into a database and validate the loaded feeds.
|
static SnapshotResult |
makeSnapshot(String feedId,
DataSource dataSource)
Copy all tables for a given feed ID (schema namespace) into a new namespace in the given JDBC DataSource.
|
static ValidationResult |
validate(String feedId,
DataSource dataSource)
Once a feed has been loaded into the database, examine its contents looking for various problems and errors.
|
public static FeedLoadResult export(String feedId, String outFile, DataSource dataSource, boolean fromEditor)
public static FeedLoadResult load(String filePath, DataSource dataSource)
public static SnapshotResult makeSnapshot(String feedId, DataSource dataSource)
feedId - feed ID (schema namespace) to copy fromdataSource - JDBC connection to existing databasepublic static ValidationResult validate(String feedId, DataSource dataSource)
public static void delete(String feedId, DataSource dataSource) throws SQLException, InvalidNamespaceException
public static DataSource createDataSource(String url, String username, String password)
public static void main(String[] args) throws IOException
IOExceptionCopyright © 2019. All rights reserved.