Skip to content

Commit

Permalink
remove vehicleRentalStationsByBbox from gtfs graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
JustCris654 committed Oct 30, 2024
1 parent 8bfa8e2 commit 8399fea
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -928,33 +928,6 @@ public DataFetcher<Iterable<VehicleRentalStation>> vehicleRentalStations() {
};
}

@Override
public DataFetcher<Iterable<VehicleRentalStation>> vehicleRentalStationsByBbox() {
return environment -> {
VehicleRentalService vehicleRentalStationService = environment
.<GraphQLRequestContext>getContext()
.vehicleRentalService();

var args = new GraphQLTypes.GraphQLQueryTypeVehicleRentalStationsByBboxArgs(
environment.getArguments()
);

Envelope envelope = new Envelope(
new Coordinate(args.getGraphQLMinimumLongitude(), args.getGraphQLMinimumLatitude()),
new Coordinate(args.getGraphQLMaximumLongitude(), args.getGraphQLMaximumLatitude())
);

Stream<VehicleRentalStation> stationStream = vehicleRentalStationService
.getVehicleRentalStations()
.stream()
.filter(station ->
envelope.contains(new Coordinate(station.getLongitude(), station.getLatitude()))
);

return stationStream.toList();
};
}

@Override
public DataFetcher<Iterable<Object>> vehicleRentalsByBbox() {
return environment -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,6 @@ public interface GraphQLQueryType {

public DataFetcher<Iterable<VehicleRentalStation>> vehicleRentalStations();

public DataFetcher<Iterable<VehicleRentalStation>> vehicleRentalStationsByBbox();

public DataFetcher<Iterable<Object>> vehicleRentalsByBbox();

public DataFetcher<Object> viewer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3976,55 +3976,6 @@ public void setGraphQLIds(List<String> ids) {
}
}

public static class GraphQLQueryTypeVehicleRentalStationsByBboxArgs {

private Double maximumLatitude;
private Double maximumLongitude;
private Double minimumLatitude;
private Double minimumLongitude;

public GraphQLQueryTypeVehicleRentalStationsByBboxArgs(Map<String, Object> args) {
if (args != null) {
this.maximumLatitude = (Double) args.get("maximumLatitude");
this.maximumLongitude = (Double) args.get("maximumLongitude");
this.minimumLatitude = (Double) args.get("minimumLatitude");
this.minimumLongitude = (Double) args.get("minimumLongitude");
}
}

public Double getGraphQLMaximumLatitude() {
return this.maximumLatitude;
}

public Double getGraphQLMaximumLongitude() {
return this.maximumLongitude;
}

public Double getGraphQLMinimumLatitude() {
return this.minimumLatitude;
}

public Double getGraphQLMinimumLongitude() {
return this.minimumLongitude;
}

public void setGraphQLMaximumLatitude(Double maximumLatitude) {
this.maximumLatitude = maximumLatitude;
}

public void setGraphQLMaximumLongitude(Double maximumLongitude) {
this.maximumLongitude = maximumLongitude;
}

public void setGraphQLMinimumLatitude(Double minimumLatitude) {
this.minimumLatitude = minimumLatitude;
}

public void setGraphQLMinimumLongitude(Double minimumLongitude) {
this.minimumLongitude = minimumLongitude;
}
}

public static class GraphQLQueryTypeVehicleRentalsByBboxArgs {

private Double maximumLatitude;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1748,17 +1748,6 @@ type QueryType {
"""
ids: [String]
): [VehicleRentalStation]
"Get all vehicle rental stations within the specified bounding box"
vehicleRentalStationsByBbox(
"Northern bound of the bounding box"
maximumLatitude: CoordinateValue!,
"Eastern bound of the bounding box"
maximumLongitude: CoordinateValue!,
"Southern bound of the bounding box"
minimumLatitude: CoordinateValue!,
"Western bound of the bounding box"
minimumLongitude: CoordinateValue!
): [VehicleRentalStation]
"Get all rental vehicles within the specified bounding box"
vehicleRentalsByBbox(
"Northern bound of the bounding box"
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 8399fea

Please # to comment.