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()); + } }