@@ -41,8 +41,8 @@ public class FeedMetadata {
4141 public ArrayList <AgencyMetadata > agencies = new ArrayList <>();
4242 private ImmutableSortedSet <String > filenames ;
4343
44- // List of components that only require checking the presence of one record in the file.
45- private final List <Pair <String , String >> FILE_BASED_COMPONENTS =
44+ // List of features that only require checking the presence of one record in the file.
45+ private final List <Pair <String , String >> FILE_BASED_FEATURES =
4646 List .of (
4747 new Pair <>("Pathways (basic)" , GtfsPathway .FILENAME ),
4848 new Pair <>("Transfers" , GtfsTransfer .FILENAME ),
@@ -136,26 +136,26 @@ private void loadSpecFeatures(GtfsFeedContainer feedContainer) {
136136 }
137137
138138 private void loadSpecFeaturesBasedOnFilePresence (GtfsFeedContainer feedContainer ) {
139- for (Pair <String , String > entry : FILE_BASED_COMPONENTS ) {
139+ for (Pair <String , String > entry : FILE_BASED_FEATURES ) {
140140 specFeatures .put (entry .getKey (), hasAtLeastOneRecordInFile (feedContainer , entry .getValue ()));
141141 }
142142 }
143143
144144 private void loadSpecFeaturesBasedOnFieldPresence (GtfsFeedContainer feedContainer ) {
145- loadRouteColorsComponent (feedContainer );
146- loadHeadsignsComponent (feedContainer );
147- loadWheelchairAccessibilityComponent (feedContainer );
148- loadTTSComponent (feedContainer );
149- loadBikeAllowanceComponent (feedContainer );
150- loadLocationTypesComponent (feedContainer );
151- loadTraversalTimeComponent (feedContainer );
152- loadPathwayDirectionsComponent (feedContainer );
153- loadPathwayExtraComponent (feedContainer );
154- loadRouteBasedFaresComponent (feedContainer );
155- loadContinuousStopsComponent (feedContainer );
145+ loadRouteColorsFeature (feedContainer );
146+ loadHeadsignsFeature (feedContainer );
147+ loadWheelchairAccessibilityFeature (feedContainer );
148+ loadTTSFeature (feedContainer );
149+ loadBikeAllowanceFeature (feedContainer );
150+ loadLocationTypesFeature (feedContainer );
151+ loadTraversalTimeFeature (feedContainer );
152+ loadPathwayDirectionsFeature (feedContainer );
153+ loadPathwayExtraFeature (feedContainer );
154+ loadRouteBasedFaresFeature (feedContainer );
155+ loadContinuousStopsFeature (feedContainer );
156156 }
157157
158- private void loadContinuousStopsComponent (GtfsFeedContainer feedContainer ) {
158+ private void loadContinuousStopsFeature (GtfsFeedContainer feedContainer ) {
159159 specFeatures .put (
160160 "Continuous Stops" ,
161161 hasAtLeastOneRecordForFields (
@@ -176,7 +176,7 @@ private void loadContinuousStopsComponent(GtfsFeedContainer feedContainer) {
176176 List .of ((Function <GtfsStopTime , Boolean >) GtfsStopTime ::hasContinuousPickup )));
177177 }
178178
179- private void loadRouteBasedFaresComponent (GtfsFeedContainer feedContainer ) {
179+ private void loadRouteBasedFaresFeature (GtfsFeedContainer feedContainer ) {
180180 specFeatures .put (
181181 "Route-Based Fares" ,
182182 hasAtLeastOneRecordForFields (
@@ -186,7 +186,7 @@ private void loadRouteBasedFaresComponent(GtfsFeedContainer feedContainer) {
186186 || hasAtLeastOneRecordInFile (feedContainer , GtfsNetwork .FILENAME ));
187187 }
188188
189- private void loadPathwayDirectionsComponent (GtfsFeedContainer feedContainer ) {
189+ private void loadPathwayDirectionsFeature (GtfsFeedContainer feedContainer ) {
190190 specFeatures .put (
191191 "Pathways Directions" ,
192192 hasAtLeastOneRecordForFields (
@@ -197,7 +197,7 @@ private void loadPathwayDirectionsComponent(GtfsFeedContainer feedContainer) {
197197 (Function <GtfsPathway , Boolean >) GtfsPathway ::hasReversedSignpostedAs )));
198198 }
199199
200- private void loadPathwayExtraComponent (GtfsFeedContainer feedContainer ) {
200+ private void loadPathwayExtraFeature (GtfsFeedContainer feedContainer ) {
201201 specFeatures .put (
202202 "Pathways (extra)" ,
203203 hasAtLeastOneRecordForFields (
@@ -218,7 +218,7 @@ private void loadPathwayExtraComponent(GtfsFeedContainer feedContainer) {
218218 List .of ((Function <GtfsPathway , Boolean >) GtfsPathway ::hasStairCount )));
219219 }
220220
221- private void loadTraversalTimeComponent (GtfsFeedContainer feedContainer ) {
221+ private void loadTraversalTimeFeature (GtfsFeedContainer feedContainer ) {
222222 specFeatures .put (
223223 "Traversal Time" ,
224224 hasAtLeastOneRecordForFields (
@@ -227,7 +227,7 @@ private void loadTraversalTimeComponent(GtfsFeedContainer feedContainer) {
227227 List .of ((Function <GtfsPathway , Boolean >) GtfsPathway ::hasTraversalTime )));
228228 }
229229
230- private void loadLocationTypesComponent (GtfsFeedContainer feedContainer ) {
230+ private void loadLocationTypesFeature (GtfsFeedContainer feedContainer ) {
231231 specFeatures .put (
232232 "Location Types" ,
233233 hasAtLeastOneRecordForFields (
@@ -236,7 +236,7 @@ private void loadLocationTypesComponent(GtfsFeedContainer feedContainer) {
236236 List .of ((Function <GtfsStop , Boolean >) GtfsStop ::hasLocationType )));
237237 }
238238
239- private void loadBikeAllowanceComponent (GtfsFeedContainer feedContainer ) {
239+ private void loadBikeAllowanceFeature (GtfsFeedContainer feedContainer ) {
240240 specFeatures .put (
241241 "Bikes Allowance" ,
242242 hasAtLeastOneRecordForFields (
@@ -245,7 +245,7 @@ private void loadBikeAllowanceComponent(GtfsFeedContainer feedContainer) {
245245 List .of ((Function <GtfsTrip , Boolean >) (GtfsTrip ::hasBikesAllowed ))));
246246 }
247247
248- private void loadTTSComponent (GtfsFeedContainer feedContainer ) {
248+ private void loadTTSFeature (GtfsFeedContainer feedContainer ) {
249249 specFeatures .put (
250250 "Text-To-Speech" ,
251251 hasAtLeastOneRecordForFields (
@@ -254,7 +254,7 @@ private void loadTTSComponent(GtfsFeedContainer feedContainer) {
254254 List .of (((Function <GtfsStop , Boolean >) GtfsStop ::hasTtsStopName ))));
255255 }
256256
257- private void loadWheelchairAccessibilityComponent (GtfsFeedContainer feedContainer ) {
257+ private void loadWheelchairAccessibilityFeature (GtfsFeedContainer feedContainer ) {
258258 specFeatures .put (
259259 "Wheelchair Accessibility" ,
260260 hasAtLeastOneRecordForFields (
@@ -267,7 +267,7 @@ private void loadWheelchairAccessibilityComponent(GtfsFeedContainer feedContaine
267267 List .of ((Function <GtfsStop , Boolean >) GtfsStop ::hasWheelchairBoarding )));
268268 }
269269
270- private void loadHeadsignsComponent (GtfsFeedContainer feedContainer ) {
270+ private void loadHeadsignsFeature (GtfsFeedContainer feedContainer ) {
271271 specFeatures .put (
272272 "Headsigns" ,
273273 hasAtLeastOneRecordForFields (
@@ -280,7 +280,7 @@ private void loadHeadsignsComponent(GtfsFeedContainer feedContainer) {
280280 List .of ((Function <GtfsStopTime , Boolean >) GtfsStopTime ::hasStopHeadsign )));
281281 }
282282
283- private void loadRouteColorsComponent (GtfsFeedContainer feedContainer ) {
283+ private void loadRouteColorsFeature (GtfsFeedContainer feedContainer ) {
284284 specFeatures .put (
285285 "Route Colors" ,
286286 hasAtLeastOneRecordForFields (
@@ -319,17 +319,17 @@ private void loadFeedInfo(GtfsTableContainer<GtfsFeedInfo> feedTable) {
319319 }
320320
321321 private boolean hasAtLeastOneRecordInFile (
322- GtfsFeedContainer feedContainer , String componentFilename ) {
323- var table = feedContainer .getTableForFilename (componentFilename );
322+ GtfsFeedContainer feedContainer , String featureFilename ) {
323+ var table = feedContainer .getTableForFilename (featureFilename );
324324 return table .isPresent () && table .get ().entityCount () > 0 ;
325325 }
326326
327327 private <T extends GtfsEntity > boolean hasAtLeastOneRecordForFields (
328328 GtfsFeedContainer feedContainer ,
329- String componentFilename ,
329+ String featureFilename ,
330330 List <Function <T , Boolean >> conditions ) {
331331 return feedContainer
332- .getTableForFilename (componentFilename )
332+ .getTableForFilename (featureFilename )
333333 .map (
334334 table ->
335335 table .getEntities ().stream ()
0 commit comments