-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 1776 add flex features to list (#1780)
* GtfsBookingRulesSchema and GtfsBookingTypeEnum * added Flex features - Booking Rules: At least one record in booking_rules.txt * added flex rule: Fixed-Stops Demand Responsive Transit: At least one record in location_groups.txt * added Flex rules: Zone-based Demand Responsive Transit and Deviated Fixed Route * updated Zone-based Demand Responsive Transit * no message * updated GtfsBookingRulesSchema * updated Deviated Fixed Route features * updated Zone-Based Demand Responsive Transit * modified Zone-Based Demand Responsive Transit logic * updated logic * Update main/src/main/java/org/mobilitydata/gtfsvalidator/report/model/FeedMetadata.java Co-authored-by: cka-y <[email protected]> * updated .gitignore * fix Java syntax error * Delete web/client/static/RULES.md * removed the @required for stopId, since stop_times.txt without stopid is unparsable * added back @required * addressed PR comments --------- Co-authored-by: cka-y <[email protected]>
- Loading branch information
Showing
6 changed files
with
164 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,3 +104,5 @@ app/pkg/bin/ | |
processor/notices/bin/ | ||
processor/notices/tests/bin/ | ||
web/service/bin/ | ||
|
||
RULES.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GtfsBookingRulesSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package org.mobilitydata.gtfsvalidator.table; | ||
|
||
import org.mobilitydata.gtfsvalidator.annotation.ConditionallyRequired; | ||
import org.mobilitydata.gtfsvalidator.annotation.FieldType; | ||
import org.mobilitydata.gtfsvalidator.annotation.FieldTypeEnum; | ||
import org.mobilitydata.gtfsvalidator.annotation.GtfsTable; | ||
import org.mobilitydata.gtfsvalidator.annotation.MixedCase; | ||
import org.mobilitydata.gtfsvalidator.annotation.PrimaryKey; | ||
import org.mobilitydata.gtfsvalidator.annotation.Required; | ||
import org.mobilitydata.gtfsvalidator.type.GtfsTime; | ||
|
||
@GtfsTable("booking_rules.txt") | ||
public interface GtfsBookingRulesSchema extends GtfsEntity { | ||
@FieldType(FieldTypeEnum.ID) | ||
@PrimaryKey | ||
@Required | ||
String bookingRuleId(); | ||
|
||
@Required | ||
GtfsBookingType bookingType(); | ||
|
||
@ConditionallyRequired | ||
int priorNoticeDurationMin(); | ||
|
||
@ConditionallyRequired | ||
int priorNoticeDurationMax(); | ||
|
||
@ConditionallyRequired | ||
int priorNoticeStartDay(); | ||
|
||
@ConditionallyRequired | ||
GtfsTime priorNoticeStartTime(); | ||
|
||
@ConditionallyRequired | ||
int priorNoticeLastDay(); | ||
|
||
@ConditionallyRequired | ||
GtfsTime priorNoticeLastTime(); | ||
|
||
@ConditionallyRequired | ||
String priorNoticeServiceId(); | ||
|
||
@MixedCase | ||
String message(); | ||
|
||
@MixedCase | ||
String pickupMessage(); | ||
|
||
@MixedCase | ||
String dropOffMessage(); | ||
|
||
@FieldType(FieldTypeEnum.PHONE_NUMBER) | ||
String phoneNumber(); | ||
|
||
@FieldType(FieldTypeEnum.URL) | ||
String infoUrl(); | ||
|
||
@FieldType(FieldTypeEnum.URL) | ||
String bookingUrl(); | ||
} |
23 changes: 23 additions & 0 deletions
23
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GtfsBookingTypeEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright 2020 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.mobilitydata.gtfsvalidator.table; | ||
|
||
import org.mobilitydata.gtfsvalidator.annotation.GtfsEnumValue; | ||
|
||
@GtfsEnumValue(name = "REALTIME", value = 0) | ||
@GtfsEnumValue(name = "SAMEDAY", value = 1) | ||
@GtfsEnumValue(name = "PRIORDAY", value = 2) | ||
public interface GtfsBookingTypeEnum {} |
19 changes: 19 additions & 0 deletions
19
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GtfsLocationGroupsSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.mobilitydata.gtfsvalidator.table; | ||
|
||
import org.mobilitydata.gtfsvalidator.annotation.FieldType; | ||
import org.mobilitydata.gtfsvalidator.annotation.FieldTypeEnum; | ||
import org.mobilitydata.gtfsvalidator.annotation.GtfsTable; | ||
import org.mobilitydata.gtfsvalidator.annotation.MixedCase; | ||
import org.mobilitydata.gtfsvalidator.annotation.PrimaryKey; | ||
import org.mobilitydata.gtfsvalidator.annotation.Required; | ||
|
||
@GtfsTable("location_groups.txt") | ||
public interface GtfsLocationGroupsSchema extends GtfsEntity { | ||
@FieldType(FieldTypeEnum.ID) | ||
@PrimaryKey | ||
@Required | ||
String locationGroupId(); | ||
|
||
@MixedCase | ||
String locationGroupName(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters