From 6e88b42ffbb97efeb75869330d77ed1bf8ac5a10 Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Tue, 2 Jan 2018 17:08:51 +0100 Subject: [PATCH] added Javadoc and the Statistics URL Change-Id: I36f2e9d375ed455f0d1d13d3091dc6f51b0b6637 --- .../sap/sailing/domain/windfinderadapter/Spot.java | 11 +++++++++++ .../domain/windfinderadapter/impl/SpotImpl.java | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/java/com.sap.sailing.domain.windfinderadapter/src/com/sap/sailing/domain/windfinderadapter/Spot.java b/java/com.sap.sailing.domain.windfinderadapter/src/com/sap/sailing/domain/windfinderadapter/Spot.java index bcf814921db..c1984c0f141 100755 --- a/java/com.sap.sailing.domain.windfinderadapter/src/com/sap/sailing/domain/windfinderadapter/Spot.java +++ b/java/com.sap.sailing.domain.windfinderadapter/src/com/sap/sailing/domain/windfinderadapter/Spot.java @@ -25,7 +25,18 @@ public interface Spot extends NamedWithID, Positioned { */ String getKeyword(); + /** + * @return the URL of a web page showing a current weather report for this spot + */ URL getReportUrl() throws MalformedURLException; + /** + * @return the URL of a web page showing a weather forecast for this spot + */ URL getForecastUrl() throws MalformedURLException; + + /** + * @return the URL of a web page showing general wind statistics for this spot + */ + URL getStatisticsUrl() throws MalformedURLException; } diff --git a/java/com.sap.sailing.domain.windfinderadapter/src/com/sap/sailing/domain/windfinderadapter/impl/SpotImpl.java b/java/com.sap.sailing.domain.windfinderadapter/src/com/sap/sailing/domain/windfinderadapter/impl/SpotImpl.java index 0fae0623e63..106ed8ba5f5 100755 --- a/java/com.sap.sailing.domain.windfinderadapter/src/com/sap/sailing/domain/windfinderadapter/impl/SpotImpl.java +++ b/java/com.sap.sailing.domain.windfinderadapter/src/com/sap/sailing/domain/windfinderadapter/impl/SpotImpl.java @@ -12,6 +12,7 @@ public class SpotImpl extends NamedImpl implements Spot { private static final String BASE_URL = "https://www.windfinder.com"; private static final String BASE_REPORT_URL = BASE_URL + "/report"; private static final String BASE_FORECAST_URL = BASE_URL + "/forecast"; + private static final String BASE_STATISTICS_URL = BASE_URL + "/windstatistics"; private final String id; private final String keyword; @@ -49,4 +50,8 @@ public class SpotImpl extends NamedImpl implements Spot { return new URL(BASE_FORECAST_URL+"/"+getKeyword()); } + @Override + public URL getStatisticsUrl() throws MalformedURLException { + return new URL(BASE_STATISTICS_URL+"/"+getKeyword()); + } }