Class CSVWindSpeedController
java.lang.Object
eu.acclimatize.unison.csvcontroller.CSVWindSpeedController
A controller to obtain wind speed data in CSV format.
-
Constructor Summary
ConstructorsConstructorDescriptionCSVWindSpeedController(CSVResponder windSpeedResponder) Creates an instance of CSVWindSpeedController. -
Method Summary
-
Constructor Details
-
CSVWindSpeedController
Creates an instance of CSVWindSpeedController.- Parameters:
windSpeedResponder- A responder that writes wind speed data in a CSV format.
-
-
Method Details
-
windSpeed
@GetMapping("/locationCollection/{name}/windSpeed") public void windSpeed(@PathVariable("name") String location, @RequestParam("fromDate") @DateTimeFormat(pattern="d-M-yyyy") Date fromDate, @RequestParam("toDate") @DateTimeFormat(pattern="d-M-yyyy") Date toDate, javax.servlet.http.HttpServletResponse response) throws IOException Prints wind speed data to the HTTP servlet response object.- Parameters:
location- The location of interest.fromDate- The start date for the data (inclusive).toDate- The end date for the data (inclusive).response- Data is written to the writer of the response object.- Throws:
IOException- Thrown if there is a problem obtaining the writer of the response object.
-