Skip to content

Commit

Permalink
refactor(Addressed merge conflicts): Fixed merging conflicts with dev…
Browse files Browse the repository at this point in the history
… into dev-flex
  • Loading branch information
br648 committed Nov 8, 2023
2 parents 2d7d77c + bde0936 commit 41aecec
Show file tree
Hide file tree
Showing 17 changed files with 759 additions and 455 deletions.
12 changes: 7 additions & 5 deletions src/main/java/com/conveyal/gtfs/GTFS.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ public abstract class GTFS {
/**
* Export a feed ID from the database to a zipped GTFS file in the specified export directory.
*/
public static FeedLoadResult export (String feedId, String outFile, DataSource dataSource, boolean fromEditor) {
JdbcGtfsExporter exporter = new JdbcGtfsExporter(feedId, outFile, dataSource, fromEditor);
FeedLoadResult result = exporter.exportTables();
return result;
public static FeedLoadResult export (String feedId, String outFile, DataSource dataSource, boolean fromEditor, boolean publishProprietaryFiles) {
JdbcGtfsExporter exporter = new JdbcGtfsExporter(feedId, outFile, dataSource, fromEditor, publishProprietaryFiles);
return exporter.exportTables();
}

/**
Expand Down Expand Up @@ -299,13 +298,16 @@ public static void main (String[] args) throws IOException {

if (cmd.hasOption("export")) {
String namespaceToExport = cmd.getOptionValue("export");
boolean exportProprietaryFiles = (cmd.getOptionValue("exportProprietaryFiles") != null)
&& Boolean.parseBoolean(cmd.getOptionValue("exportProprietaryFiles"));

String outFile = cmd.getOptionValue("outFile");
if (namespaceToExport == null && loadResult != null) {
namespaceToExport = loadResult.uniqueIdentifier;
}
if (namespaceToExport != null) {
LOG.info("Exporting feed with unique identifier {}", namespaceToExport);
FeedLoadResult exportResult = export(namespaceToExport, outFile, dataSource, true);
export(namespaceToExport, outFile, dataSource, true, exportProprietaryFiles);
LOG.info("Done exporting.");
} else {
LOG.error("No feed to export. Specify one, or load a feed in the same command.");
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/conveyal/gtfs/GTFSFeed.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ else if (feedId == null || feedId.isEmpty()) {
new BookingRule.Loader(this).loadTable(zip);
new Location.Loader(this).loadTable(zip);
new LocationShape.Loader(this).loadTable(zip);

new Pattern.Loader(this).loadTable(zip);
new Route.Loader(this).loadTable(zip);
new ShapePoint.Loader(this).loadTable(zip);
new Stop.Loader(this).loadTable(zip);
Expand Down Expand Up @@ -234,6 +234,7 @@ public void toFile (String file) {
new Transfer.Writer(this).writeTable(zip);
new Trip.Writer(this).writeTable(zip);
new StopTime.Writer(this).writeTable(zip);
new Pattern.Writer(this).writeTable(zip);

if (!this.bookingRules.isEmpty()) new BookingRule.Writer(this).writeTable(zip);
if (!this.stopAreas.isEmpty()) {
Expand Down Expand Up @@ -374,6 +375,7 @@ public Shape getShape (String shape_id) {
}

/**
<<<<<<< HEAD
* MapDB-based implementation to find patterns.
*
* FIXME: Remove and make pattern finding happen during validation? We want to share the pattern finder between the
Expand Down Expand Up @@ -401,6 +403,8 @@ public void findPatterns () {
}

/**
=======
>>>>>>> dev
* For the given trip ID, fetch all the stop times in order, and interpolate stop-to-stop travel times.
*/
public Iterable<StopTime> getInterpolatedStopTimesForTrip (String trip_id) throws FirstAndLastStopsDoNotHaveTimes {
Expand Down
Loading

0 comments on commit 41aecec

Please sign in to comment.