Skip to content

Commit 0b41a94

Browse files
authored
Merge 5b18112 into 4df6de3
2 parents 4df6de3 + 5b18112 commit 0b41a94

File tree

5 files changed

+66
-66
lines changed

5 files changed

+66
-66
lines changed

main/src/main/java/org/mobilitydata/gtfsvalidator/report/JsonReportSummary.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class JsonReportSummary {
3737
@SerializedName("counts")
3838
private JsonReportCounts jsonReportCounts;
3939

40-
private List<String> gtfsComponents;
40+
private List<String> gtfsFeatures;
4141

4242
public JsonReportSummary(
4343
FeedMetadata feedMetadata,
@@ -89,7 +89,7 @@ public JsonReportSummary(
8989
+ ", there will be missing data in the report.");
9090
}
9191

92-
this.gtfsComponents =
92+
this.gtfsFeatures =
9393
feedMetadata.specFeatures == null
9494
? null
9595
: feedMetadata.specFeatures.entrySet().stream()

main/src/main/java/org/mobilitydata/gtfsvalidator/report/model/FeedMetadata.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -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()

main/src/main/resources/report.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
display: table-row;
210210
}
211211

212-
#gtfs-components-container > div {
212+
#gtfs-features-container > div {
213213
display: flex;
214214
justify-content: center;
215215
align-content: center;
@@ -285,11 +285,11 @@ <h4>Counts</h4>
285285
<li th:each="count: ${metadata.counts}"><span th:text="${count.key} + ': ' + ${count.value}" /></li>
286286
</ul>
287287
</div>
288-
<div class="summary-cell summary_list" id="gtfs-components-container">
288+
<div class="summary-cell summary_list" id="gtfs-features-container">
289289
<h4>
290-
GTFS Components included
290+
GTFS Features included
291291
<a href="#" class="tooltip" onclick="event.preventDefault();"><span>(?)</span>
292-
<span class="tooltiptext" style="transform: translateX(-100%)">GTFS components provide a standardized vocabulary to define and describe features that are officially adopted in GTFS.</span>
292+
<span class="tooltiptext" style="transform: translateX(-100%)">GTFS features provide a standardized vocabulary to define and describe features that are officially adopted in GTFS.</span>
293293
</a>
294294
</h4>
295295
<hr />

0 commit comments

Comments
 (0)