From a05761f1f1ebe94d4459203c70ca8cdec8d199b1 Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Fri, 17 Mar 2023 11:01:27 +0200 Subject: [PATCH] Use style instead of operative field as operative doesn't tell anything... --- src/ext-test/resources/smoovebikerental/smoove.json | 10 +++++----- .../smoovebikerental/SmooveBikeRentalDataSource.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ext-test/resources/smoovebikerental/smoove.json b/src/ext-test/resources/smoovebikerental/smoove.json index 7bc97f6d69f..364d947b504 100644 --- a/src/ext-test/resources/smoovebikerental/smoove.json +++ b/src/ext-test/resources/smoovebikerental/smoove.json @@ -4,7 +4,7 @@ "name" : "A04 Hamn", "operative" : true, "coordinates" : "60.167913, 24.952269", - "style" : "", + "style" : "Station on", "avl_bikes" : 1, "free_slots" : 11, "total_slots" : 12 @@ -13,7 +13,7 @@ "name" : "B05 Fake", "operative" : false, "coordinates" : "60, 24", - "style" : "", + "style" : "Station off", "avl_bikes" : 5, "free_slots" : 5, "total_slots" : 5 @@ -22,7 +22,7 @@ "name" : "B06 Foo", "operative" : true, "coordinates" : "61,25", - "style" : "", + "style" : "Station on", "avl_bikes" : 5, "free_slots" : 5, "total_slots" : 5 @@ -31,7 +31,7 @@ "name" : "B08 Invalid", "operative" : true, "coordinates" : "", - "style" : "", + "style" : "Station on", "avl_bikes" : 5, "free_slots" : 5, "total_slots" : 5 @@ -40,7 +40,7 @@ "name" : "B09 Full", "operative" : true, "coordinates" : "60.168913, 24.953269", - "style" : "", + "style" : "Station on", "avl_bikes" : 12, "free_slots" : 0, "total_slots" : 12 diff --git a/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSource.java b/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSource.java index 4ad394eb595..c8622d53bbb 100644 --- a/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSource.java +++ b/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSource.java @@ -70,7 +70,7 @@ protected VehicleRentalStation parseElement(JsonNode node) { log.warn("Error parsing bike rental station {}", station.id, e); return null; } - if (!node.path("operative").asText().equals("true")) { + if (!node.path("style").asText().equals("Station on")) { station.isRenting = false; station.isReturning = false; station.vehiclesAvailable = 0;