diff --git a/java/com.google.gwt.dev/META-INF/MANIFEST.MF b/java/com.google.gwt.dev/META-INF/MANIFEST.MF
index 599d78f8748..f1bad3cb695 100644
--- a/java/com.google.gwt.dev/META-INF/MANIFEST.MF
+++ b/java/com.google.gwt.dev/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: gwt-dev
Bundle-SymbolicName: com.google.gwt.dev
-Bundle-Version: 2.8.1
+Bundle-Version: 2.8.2
Bundle-Vendor: GOOGLE
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: lib/gwt-dev.jar,
diff --git a/java/com.google.gwt.dev/lib/gwt-dev.jar b/java/com.google.gwt.dev/lib/gwt-dev.jar
index 1ddb4c5895e..30d16cb740e 100644
Binary files a/java/com.google.gwt.dev/lib/gwt-dev.jar and b/java/com.google.gwt.dev/lib/gwt-dev.jar differ
diff --git a/java/com.google.gwt.dev/pom.xml b/java/com.google.gwt.dev/pom.xml
index d98224f3ece..4f26a246167 100644
--- a/java/com.google.gwt.dev/pom.xml
+++ b/java/com.google.gwt.dev/pom.xml
@@ -8,6 +8,6 @@
1.0.0-SNAPSHOT
com.google.gwt.dev
- 2.8.1
+ 2.8.2
eclipse-plugin
diff --git a/java/com.google.gwt.servlet/META-INF/MANIFEST.MF b/java/com.google.gwt.servlet/META-INF/MANIFEST.MF
index 6c96b8d13c3..4998709609d 100644
--- a/java/com.google.gwt.servlet/META-INF/MANIFEST.MF
+++ b/java/com.google.gwt.servlet/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Dev
Bundle-SymbolicName: com.google.gwt.servlet
-Bundle-Version: 2.8.1
+Bundle-Version: 2.8.2
Bundle-Vendor: GOOGLE
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: lib/gwt-servlet.jar,
diff --git a/java/com.google.gwt.servlet/lib/gwt-servlet-deps.jar b/java/com.google.gwt.servlet/lib/gwt-servlet-deps.jar
index be26accc5d3..430b627cd97 100644
Binary files a/java/com.google.gwt.servlet/lib/gwt-servlet-deps.jar and b/java/com.google.gwt.servlet/lib/gwt-servlet-deps.jar differ
diff --git a/java/com.google.gwt.servlet/lib/gwt-servlet.jar b/java/com.google.gwt.servlet/lib/gwt-servlet.jar
index 8088f0ab778..eee1e90525c 100644
Binary files a/java/com.google.gwt.servlet/lib/gwt-servlet.jar and b/java/com.google.gwt.servlet/lib/gwt-servlet.jar differ
diff --git a/java/com.google.gwt.servlet/pom.xml b/java/com.google.gwt.servlet/pom.xml
index 0375728464c..e4095b23ea9 100644
--- a/java/com.google.gwt.servlet/pom.xml
+++ b/java/com.google.gwt.servlet/pom.xml
@@ -8,6 +8,6 @@
1.0.0-SNAPSHOT
com.google.gwt.servlet
- 2.8.1
+ 2.8.2
eclipse-plugin
diff --git a/java/com.google.gwt.user/META-INF/MANIFEST.MF b/java/com.google.gwt.user/META-INF/MANIFEST.MF
index 970dfcb6845..75da7da6be4 100755
--- a/java/com.google.gwt.user/META-INF/MANIFEST.MF
+++ b/java/com.google.gwt.user/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: gwt-user
Bundle-SymbolicName: com.google.gwt.user
-Bundle-Version: 2.8.1
+Bundle-Version: 2.8.2
Bundle-Vendor: GOOGLE
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: lib/gwt-user.jar,
@@ -187,4 +187,4 @@ Export-Package: com.google.gwt.activity.shared,
jsinterop.annotations
Require-Bundle: javax.servlet;bundle-version="3.1.0",
org.junit;bundle-version="4.8.2";resolution:=optional,
- com.google.gwt.dev;bundle-version="2.8.1"
+ com.google.gwt.dev;bundle-version="2.8.2"
diff --git a/java/com.google.gwt.user/lib/gwt-user.jar b/java/com.google.gwt.user/lib/gwt-user.jar
index 5f3b97fb725..4e8f0dedee2 100644
Binary files a/java/com.google.gwt.user/lib/gwt-user.jar and b/java/com.google.gwt.user/lib/gwt-user.jar differ
diff --git a/java/com.google.gwt.user/pom.xml b/java/com.google.gwt.user/pom.xml
index 20d9c3a295d..1c2a3ce390d 100644
--- a/java/com.google.gwt.user/pom.xml
+++ b/java/com.google.gwt.user/pom.xml
@@ -8,6 +8,6 @@
1.0.0-SNAPSHOT
com.google.gwt.user
- 2.8.1
+ 2.8.2
eclipse-plugin
diff --git a/java/com.sap.sailing.dashboards.gwt/META-INF/MANIFEST.MF b/java/com.sap.sailing.dashboards.gwt/META-INF/MANIFEST.MF
index fef72b6dee0..afec7de52c2 100644
--- a/java/com.sap.sailing.dashboards.gwt/META-INF/MANIFEST.MF
+++ b/java/com.sap.sailing.dashboards.gwt/META-INF/MANIFEST.MF
@@ -8,9 +8,9 @@ Bundle-Vendor: SAP
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: com.sap.sailing.domain,
com.sap.sailing.server,
- com.google.gwt.dev;bundle-version="2.8.1";resolution:=optional,
- com.google.gwt.user;bundle-version="2.8.1";resolution:=optional,
- com.google.gwt.servlet;bundle-version="2.8.1",
+ com.google.gwt.dev;bundle-version="2.8.2";resolution:=optional,
+ com.google.gwt.user;bundle-version="2.8.2";resolution:=optional,
+ com.google.gwt.servlet;bundle-version="2.8.2",
com.sap.sse.common,
com.sap.sailing.domain.common,
com.sap.sailing.domain.shared.android,
diff --git a/java/com.sap.sailing.datamining/src/com/sap/sailing/datamining/impl/data/RaceResultOfCompetitorWithContext.java b/java/com.sap.sailing.datamining/src/com/sap/sailing/datamining/impl/data/RaceResultOfCompetitorWithContext.java
index 18b2a19f88a..96f465a8b9c 100644
--- a/java/com.sap.sailing.datamining/src/com/sap/sailing/datamining/impl/data/RaceResultOfCompetitorWithContext.java
+++ b/java/com.sap.sailing.datamining/src/com/sap/sailing/datamining/impl/data/RaceResultOfCompetitorWithContext.java
@@ -174,7 +174,14 @@ public class RaceResultOfCompetitorWithContext implements HasRaceResultOfCompeti
double competitorCount = Util.size(leaderboard.getCompetitors());
Double points = leaderboard.getTotalPoints(competitor, raceColumn, now);
if (points != null) {
- double relativeLowPoints = leaderboard.getScoringScheme().isHigherBetter() ? competitorCount - points
+ double relativeLowPoints = leaderboard.getScoringScheme().isHigherBetter() ?
+ // calculate the points for first rank (doesn't necessarily need to be the number
+ // of competitors!) and subtract the points
+ leaderboard.getScoringScheme().getScoreForRank(leaderboard, raceColumn, competitor,
+ /* rank */ 1, // which score does the winner get in this high-point scheme?
+ /* numberOfCompetitorsInRaceFetcher */ ()->Util.size(raceColumn.getAllCompetitors()),
+ /* numberOfCompetitorsInLeaderboardFetcher */ leaderboard.getNumberOfCompetitorsInLeaderboardFetcher(),
+ now) - points
: points;
final double result = relativeLowPoints / competitorCount;
return result;
diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/BravoExtendedSensorDataMetadata.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/BravoExtendedSensorDataMetadata.java
index e4182e242db..5c8f1d2db12 100644
--- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/BravoExtendedSensorDataMetadata.java
+++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/BravoExtendedSensorDataMetadata.java
@@ -6,12 +6,20 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
+import com.sap.sailing.domain.common.tracking.DoubleVectorFix;
+
/**
- * Metadata that defines the column structure of BravoExtended fixes when imported as {@link com.sap.sailing.domain.common.tracking.DoubleVectorFix}.
+ * Metadata that defines the column structure of BravoExtended fixes when imported as
+ * {@link com.sap.sailing.domain.common.tracking.DoubleVectorFix}.
+ *
*
* The current implementation only stores a subset of the information available during the import.
+ *
*
- * The first columns need to be consistent with {@link BravoSensorDataMetadata}.
+ * The first columns need to be consistent with {@link BravoSensorDataMetadata}. Furthermore,
+ * once data has been stored in a sensor store, the order of literals must remain constant,
+ * and no literals must be deleted anymore because the ordinal is used to determine the index
+ * into the {@link DoubleVectorFix}.
*/
public enum BravoExtendedSensorDataMetadata implements ColumnMetadata {
RIDE_HEIGHT_PORT_HULL("RideHeightPort"), //
@@ -24,7 +32,7 @@ public enum BravoExtendedSensorDataMetadata implements ColumnMetadata {
RUDDER_RAKE_STBD("RudderRakeAngleStbd"), //
MAST_ROTATION("MastRotation");
- private String columnName;
+ private final String columnName;
private BravoExtendedSensorDataMetadata(String columnName) {
this.columnName = columnName;
diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/BravoSensorDataMetadata.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/BravoSensorDataMetadata.java
index ff0bf3ab939..6e1a50c5bd5 100644
--- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/BravoSensorDataMetadata.java
+++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/BravoSensorDataMetadata.java
@@ -7,7 +7,9 @@ import java.util.Map;
import java.util.Objects;
/**
- * Metadata that defines the column structure of Bravo fixes when imported as {@link com.sap.sailing.domain.common.tracking.DoubleVectorFix}.
+ * Metadata that defines the column structure of Bravo fixes when imported as
+ * {@link com.sap.sailing.domain.common.tracking.DoubleVectorFix}.
+ *
*
* The current implementation only stores a subset of the information available during the import.
*/
diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ColumnMetadata.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ColumnMetadata.java
index 3c995a69384..5380fa447be 100644
--- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ColumnMetadata.java
+++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ColumnMetadata.java
@@ -5,7 +5,9 @@ import com.sap.sailing.domain.common.tracking.SensorFix;
/**
* Definition of column metadata used by {@link SensorFix} implementations to resolve columns in underlying
- * {@link DoubleVectorFix DoubleVectorFixes}.
+ * {@link DoubleVectorFix DoubleVectorFixes}. Once data has been stored in a sensor store according to such a
+ * specification, the order of literals in implementing {@code enum} types must remain constant, and no literals must be
+ * deleted anymore because the ordinal is used to determine the index into the {@link DoubleVectorFix}.
*/
public interface ColumnMetadata {
int getColumnIndex();
diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ExpeditionExtendedSensorDataMetadata.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ExpeditionExtendedSensorDataMetadata.java
new file mode 100755
index 00000000000..9588c721fea
--- /dev/null
+++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ExpeditionExtendedSensorDataMetadata.java
@@ -0,0 +1,76 @@
+package com.sap.sailing.domain.common.sensordata;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+import com.sap.sailing.domain.common.tracking.DoubleVectorFix;
+
+/**
+ * Metadata that defines the column structure of BravoExtended fixes when imported as {@link com.sap.sailing.domain.common.tracking.DoubleVectorFix}.
+ *
+ * The current implementation only stores a subset of the information available during the import.
+ *
+ * The first columns need to be consistent with {@link BravoSensorDataMetadata}.
+ */
+public enum ExpeditionExtendedSensorDataMetadata {
+ HEEL("Heel", BravoExtendedSensorDataMetadata.HEEL),
+ TRIM("TRIM", BravoExtendedSensorDataMetadata.PITCH);
+
+ private String columnName;
+
+ /**
+ * Expedition extended fixes are mapped to Bravo extended fixes whose metadata is described
+ * in {@link BravoExtendedSensorDataMetadata}. When parsing an Expedition file, the columns
+ * in the resulting {@link DoubleVectorFix} must be chosen such that they match up with the
+ * corresponding fields as described by {@link BravoExtendedSensorDataMetadata}. This turns
+ * the ordinals of this enum's literals insignificant; the position is taken solely from
+ * the Bravo metadata.
+ */
+ private BravoExtendedSensorDataMetadata mappedToBravoField;
+
+ private ExpeditionExtendedSensorDataMetadata(String columnName, BravoExtendedSensorDataMetadata mappedToBravoField) {
+ this.columnName = columnName;
+ this.mappedToBravoField = mappedToBravoField;
+ }
+
+ public String getColumnName() {
+ return columnName;
+ }
+
+ public int getColumnIndex() {
+ return mappedToBravoField.getColumnIndex();
+ }
+
+ public static ExpeditionExtendedSensorDataMetadata byColumnName(String valueName) {
+ ExpeditionExtendedSensorDataMetadata[] values = ExpeditionExtendedSensorDataMetadata.values();
+ for (ExpeditionExtendedSensorDataMetadata item : values) {
+ if (Objects.equals(item.getColumnName(), valueName)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ public static int getTrackColumnCount() {
+ return ExpeditionExtendedSensorDataMetadata.values().length;
+ }
+
+ public static List getTrackColumnNames() {
+ ArrayList colNames = new ArrayList<>(getTrackColumnCount());
+ for (ExpeditionExtendedSensorDataMetadata item : ExpeditionExtendedSensorDataMetadata.values()) {
+ colNames.add(item.getColumnName());
+ }
+ return colNames;
+ }
+
+ public static Map getColumnNamesToIndexInDoubleFix() {
+ final Map columnNamesToIndexInDoubleFix = new HashMap<>();
+ for (final ExpeditionExtendedSensorDataMetadata column : ExpeditionExtendedSensorDataMetadata.values()) {
+ columnNamesToIndexInDoubleFix.put(column.getColumnName(), column.getColumnIndex());
+ }
+ return columnNamesToIndexInDoubleFix;
+ }
+}
diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/BravoFix.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/BravoFix.java
index 78e938466e7..3cb3a5e7302 100644
--- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/BravoFix.java
+++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/BravoFix.java
@@ -46,7 +46,4 @@ public interface BravoFix extends SensorFix {
@Statistic(messageKey = "heel", resultDecimals = 1)
Bearing getHeel();
-
-
-
}
diff --git a/java/com.sap.sailing.domain.deckmanadapter/src/com/sap/sailing/domain/deckmanadapter/impl/Activator.java b/java/com.sap.sailing.domain.deckmanadapter/src/com/sap/sailing/domain/deckmanadapter/impl/Activator.java
index b32cb3c4670..5dde7b339ea 100755
--- a/java/com.sap.sailing.domain.deckmanadapter/src/com/sap/sailing/domain/deckmanadapter/impl/Activator.java
+++ b/java/com.sap.sailing.domain.deckmanadapter/src/com/sap/sailing/domain/deckmanadapter/impl/Activator.java
@@ -6,7 +6,6 @@ import org.osgi.framework.BundleContext;
import com.sap.sailing.server.trackfiles.common.GPSFixImporterRegistration;
public class Activator implements BundleActivator {
-
@Override
public void start(BundleContext context) throws Exception {
GPSFixImporterRegistration.register(new DeckmanGPSFixImporter(), context);
@@ -15,5 +14,4 @@ public class Activator implements BundleActivator {
@Override
public void stop(BundleContext context) throws Exception {
}
-
}
diff --git a/java/com.sap.sailing.domain.deckmanadapter/src/com/sap/sailing/domain/deckmanadapter/impl/DeckmanAdapterImpl.java b/java/com.sap.sailing.domain.deckmanadapter/src/com/sap/sailing/domain/deckmanadapter/impl/DeckmanAdapterImpl.java
index 6db2e1b6a55..d1c1b37be66 100755
--- a/java/com.sap.sailing.domain.deckmanadapter/src/com/sap/sailing/domain/deckmanadapter/impl/DeckmanAdapterImpl.java
+++ b/java/com.sap.sailing.domain.deckmanadapter/src/com/sap/sailing/domain/deckmanadapter/impl/DeckmanAdapterImpl.java
@@ -11,5 +11,4 @@ public class DeckmanAdapterImpl implements DeckmanAdapter {
public LogFile parseLogFile(Reader r) throws IOException {
return new LogFileImpl(r);
}
-
}
diff --git a/java/com.sap.sailing.domain.expeditionadapter/.classpath b/java/com.sap.sailing.domain.expeditionadapter/.classpath
new file mode 100755
index 00000000000..eca7bdba8f0
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/java/com.sap.sailing.domain.expeditionadapter/.project b/java/com.sap.sailing.domain.expeditionadapter/.project
new file mode 100755
index 00000000000..a413084a0cd
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/.project
@@ -0,0 +1,28 @@
+
+
+ com.sap.sailing.domain.expeditionadapter
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/java/com.sap.sailing.domain.expeditionadapter/.settings/org.eclipse.jdt.core.prefs b/java/com.sap.sailing.domain.expeditionadapter/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..0c68a61dca8
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/java/com.sap.sailing.domain.expeditionadapter/.settings/org.eclipse.pde.core.prefs b/java/com.sap.sailing.domain.expeditionadapter/.settings/org.eclipse.pde.core.prefs
new file mode 100755
index 00000000000..f29e940a005
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/java/com.sap.sailing.domain.expeditionadapter/META-INF/MANIFEST.MF b/java/com.sap.sailing.domain.expeditionadapter/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..43e36b46448
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Expeditionadapter
+Bundle-SymbolicName: com.sap.sailing.domain.expeditionadapter
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: SAP
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: org.osgi.framework
+Require-Bundle: com.sap.sailing.server.trackfiles,
+ com.sap.sailing.domain,
+ com.sap.sse.common,
+ com.sap.sailing.domain.common
+Bundle-Activator: com.sap.sailing.domain.expeditionadapter.impl.Activator
diff --git a/java/com.sap.sailing.domain.expeditionadapter/build.properties b/java/com.sap.sailing.domain.expeditionadapter/build.properties
new file mode 100755
index 00000000000..34d2e4d2dad
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/java/com.sap.sailing.domain.expeditionadapter/pom.xml b/java/com.sap.sailing.domain.expeditionadapter/pom.xml
new file mode 100755
index 00000000000..420cb8c34f6
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/pom.xml
@@ -0,0 +1,12 @@
+
+
+ 4.0.0
+
+ root
+ com.sap.sailing
+ 1.0.0-SNAPSHOT
+
+ com.sap.sailing.domain.expeditionadapter
+ eclipse-plugin
+
diff --git a/java/com.sap.sailing.domain.expeditionadapter/src/com/sap/sailing/domain/expeditionadapter/impl/Activator.java b/java/com.sap.sailing.domain.expeditionadapter/src/com/sap/sailing/domain/expeditionadapter/impl/Activator.java
new file mode 100755
index 00000000000..a73939a8ac8
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/src/com/sap/sailing/domain/expeditionadapter/impl/Activator.java
@@ -0,0 +1,17 @@
+package com.sap.sailing.domain.expeditionadapter.impl;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+import com.sap.sailing.server.trackfiles.common.GPSFixImporterRegistration;
+
+public class Activator implements BundleActivator {
+ @Override
+ public void start(BundleContext context) throws Exception {
+ GPSFixImporterRegistration.register(new ExpeditionGPSFixImporter(), context);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ }
+}
diff --git a/java/com.sap.sailing.domain.expeditionadapter/src/com/sap/sailing/domain/expeditionadapter/impl/ExpeditionGPSFixImporter.java b/java/com.sap.sailing.domain.expeditionadapter/src/com/sap/sailing/domain/expeditionadapter/impl/ExpeditionGPSFixImporter.java
new file mode 100755
index 00000000000..edae24e5e61
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/src/com/sap/sailing/domain/expeditionadapter/impl/ExpeditionGPSFixImporter.java
@@ -0,0 +1,61 @@
+package com.sap.sailing.domain.expeditionadapter.impl;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import com.sap.sailing.domain.common.impl.DegreeBearingImpl;
+import com.sap.sailing.domain.common.impl.DegreePosition;
+import com.sap.sailing.domain.common.impl.KnotSpeedWithBearingImpl;
+import com.sap.sailing.domain.common.tracking.GPSFixMoving;
+import com.sap.sailing.domain.common.tracking.impl.GPSFixMovingImpl;
+import com.sap.sailing.domain.trackfiles.TrackFileImportDeviceIdentifier;
+import com.sap.sailing.domain.trackfiles.TrackFileImportDeviceIdentifierImpl;
+import com.sap.sailing.domain.trackimport.FormatNotSupportedException;
+import com.sap.sailing.domain.trackimport.GPSFixImporter;
+import com.sap.sailing.server.trackfiles.impl.ExpeditionExtendedDataImporterImpl;
+
+public class ExpeditionGPSFixImporter implements GPSFixImporter {
+ private static final String LAT_COLUMN_HEADING = ExpeditionExtendedDataImporterImpl.COL_NAME_LAT;
+ private static final String LON_COLUMN_HEADING = ExpeditionExtendedDataImporterImpl.COL_NAME_LON;
+ private static final String COG_COLUMN_HEADING = "Ext_COG";
+ private static final String SOG_COLUMN_HEADING = "Ext_SOG";
+ @Override
+ public void importFixes(InputStream inputStream, Callback callback, boolean inferSpeedAndBearing, final String sourceName)
+ throws FormatNotSupportedException, IOException {
+ TrackFileImportDeviceIdentifier device = new TrackFileImportDeviceIdentifierImpl(sourceName, getType() + "@" + new Date());
+ final BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
+ final String headerLine = br.readLine();
+ final Map columnDefinitions = ExpeditionExtendedDataImporterImpl.parseHeader(headerLine);
+ final AtomicInteger lineNr = new AtomicInteger(0);
+ br.lines().forEach(line->{
+ if (!line.trim().isEmpty()) {
+ ExpeditionExtendedDataImporterImpl.parseLine(lineNr.incrementAndGet(), sourceName, line, columnDefinitions,
+ (timePoint, columnValues, columns)->{
+ final double latDeg = Double.parseDouble(columnValues[columns.get(LAT_COLUMN_HEADING)]);
+ final double lonDeg = Double.parseDouble(columnValues[columns.get(LON_COLUMN_HEADING)]);
+ final double cogDeg = Double.parseDouble(columnValues[columns.get(COG_COLUMN_HEADING)]);
+ final double sogKnots = Double.parseDouble(columnValues[columns.get(SOG_COLUMN_HEADING)]);
+ final GPSFixMoving fix = new GPSFixMovingImpl(new DegreePosition(latDeg, lonDeg), timePoint,
+ new KnotSpeedWithBearingImpl(sogKnots, new DegreeBearingImpl(cogDeg)));
+ callback.addFix(fix, device);
+ });
+ }
+ });
+ }
+
+ @Override
+ public Iterable getSupportedFileExtensions() {
+ return Arrays.asList(new String[] { "csv", "log", "txt" });
+ }
+
+ @Override
+ public String getType() {
+ return "Expedition";
+ }
+}
diff --git a/java/com.sap.sailing.domain.expeditionadapter/src/com/sap/sailing/domain/expeditionadapter/impl/FieldType.java b/java/com.sap.sailing.domain.expeditionadapter/src/com/sap/sailing/domain/expeditionadapter/impl/FieldType.java
new file mode 100755
index 00000000000..4eb2a0b87ef
--- /dev/null
+++ b/java/com.sap.sailing.domain.expeditionadapter/src/com/sap/sailing/domain/expeditionadapter/impl/FieldType.java
@@ -0,0 +1,7 @@
+package com.sap.sailing.domain.expeditionadapter.impl;
+
+public enum FieldType {
+ date, race_name, leg_name, leg_score, boat_speed, heel, leeway, rudder, heading, course, depth,
+ tws, twa, twd, aws, awa, latitude, longitude, sog, cog, abstwa, absawa, absheel, absleeway, absrudder,
+ foresail, staysail, mainsail, forestay, rake, vmg, status, starboard_port, rudder2, keelang, absrudder2, abskeelang;
+}
diff --git a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java
index 15879dfdb15..a2c738b79e6 100644
--- a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java
+++ b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java
@@ -112,6 +112,7 @@ import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogCloseOpe
import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogDefineMarkEventImpl;
import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogDeviceCompetitorBravoExtendedMappingEventImpl;
import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogDeviceCompetitorBravoMappingEventImpl;
+import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl;
import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogDeviceCompetitorMappingEventImpl;
import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogDeviceMarkMappingEventImpl;
import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogRegisterCompetitorEventImpl;
@@ -1713,6 +1714,9 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
} else if (eventClass.equals(RegattaLogDeviceCompetitorBravoExtendedMappingEventImpl.class.getSimpleName())) {
return loadRegattaLogDeviceCompetitorBravoExtendedMappingEvent(createdAt, author, logicalTimePoint, id, dbObject,
regattaLogIdentifier, o);
+ } else if (eventClass.equals(RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl.class.getSimpleName())) {
+ return loadRegattaLogDeviceCompetitorExpeditionExtendedMappingEvent(createdAt, author, logicalTimePoint, id, dbObject,
+ regattaLogIdentifier, o);
} else if (eventClass.equals(RegattaLogDeviceMarkMappingEvent.class.getSimpleName())) {
return loadRegattaLogDeviceMarkMappingEvent(createdAt, author, logicalTimePoint, id, dbObject, regattaLogIdentifier, o);
} else if (eventClass.equals(RegattaLogCloseOpenEndedDeviceMappingEvent.class.getSimpleName())) {
@@ -1911,6 +1915,13 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
regattaLogIdentifier, outerDBObject, RegattaLogDeviceCompetitorBravoExtendedMappingEventImpl::new);
}
+ private RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl loadRegattaLogDeviceCompetitorExpeditionExtendedMappingEvent(
+ TimePoint createdAt, AbstractLogEventAuthor author, TimePoint logicalTimePoint, Serializable id,
+ final DBObject dbObject, RegattaLikeIdentifier regattaLogIdentifier, DBObject outerDBObject) {
+ return loadRegattaLogDeviceCompetitorSensorDataMappingEvent(createdAt, author, logicalTimePoint, id, dbObject,
+ regattaLogIdentifier, outerDBObject, RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl::new);
+ }
+
private MappingT loadRegattaLogDeviceCompetitorSensorDataMappingEvent(
TimePoint createdAt, AbstractLogEventAuthor author, TimePoint logicalTimePoint, Serializable id,
final DBObject dbObject, RegattaLikeIdentifier regattaLogIdentifier, DBObject outerDBObject,
diff --git a/java/com.sap.sailing.domain.racelogtrackingadapter/resources/stringmessages/TrackingStringMessages_fr.properties b/java/com.sap.sailing.domain.racelogtrackingadapter/resources/stringmessages/TrackingStringMessages_fr.properties
index 70b07c43666..00a58568345 100644
--- a/java/com.sap.sailing.domain.racelogtrackingadapter/resources/stringmessages/TrackingStringMessages_fr.properties
+++ b/java/com.sap.sailing.domain.racelogtrackingadapter/resources/stringmessages/TrackingStringMessages_fr.properties
@@ -2,10 +2,10 @@ trackingInvitationFor=Invitation de suivi pour
scanQRCodeOrVisitUrlToRegisterAs=Si vous avez bien installé l''application {0}, scannez le code QR suivant ou cliquez sur le lien sur votre smartphone pour vous enregistrer comme
welcomeTo=Bienvenue dans
iOSUsers=Lancer l''application iOS
-androidUsers=Lancer l’application Android
+androidUsers=Lancer l''application Android
alternativelyVisitThisLink=Si vous consultez ce mail sur l''appareil sur lequel l''application est déjà installée, cliquez simplement sur le bouton ci-dessous pour commencer :
buoyTender=Navire baliseur
-appStoreInstallText=Si vous n''avez pas encore l''application, installez-la :
+appStoreInstallText=Si vous n''avez pas encore l''application, voici les liens pour l''installer :
appIos=Installer l''application iOS
appAndroid=Installer l''application Android
buoyPingerAppName=SAP Sailing Buoy Pinger
diff --git a/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/Activator.java b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/Activator.java
index fa8980c1f5f..8be4cc22076 100644
--- a/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/Activator.java
+++ b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/Activator.java
@@ -89,6 +89,7 @@ public class Activator implements BundleActivator {
new MasterDataImportClassLoaderServiceImpl(), null));
registrations.add(context.registerService(SensorFixMapper.class, new BravoDataFixMapper(), null));
registrations.add(context.registerService(SensorFixMapper.class, new BravoExtendedDataFixMapper(), null));
+ registrations.add(context.registerService(SensorFixMapper.class, new ExpeditionExtendedDataFixMapper(), null));
sensorFixMapperTracker = createSensorFixMapperServiceTracker(context);
racingEventServiceTracker = ServiceTrackerFactory.createAndOpen(context, RacingEventService.class);
diff --git a/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoDataFixMapper.java b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoDataFixMapper.java
index 7f822f11560..f8165a00079 100644
--- a/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoDataFixMapper.java
+++ b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoDataFixMapper.java
@@ -20,7 +20,7 @@ public class BravoDataFixMapper implements SensorFixMapper getTrack(DynamicTrackedRace race, Competitor key) {
return race.getOrCreateSensorTrack(key, BravoFixTrack.TRACK_NAME,
- () -> new BravoFixTrackImpl(key, BravoFixTrack.TRACK_NAME, false));
+ () -> new BravoFixTrackImpl(key, BravoFixTrack.TRACK_NAME, /* hasExtendedFixes */ false));
}
@Override
diff --git a/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoExtendedDataFixMapper.java b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoExtendedDataFixMapper.java
index 9aab573d347..cdb1c97f32d 100644
--- a/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoExtendedDataFixMapper.java
+++ b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoExtendedDataFixMapper.java
@@ -21,7 +21,7 @@ public class BravoExtendedDataFixMapper implements SensorFixMapper getTrack(DynamicTrackedRace race, Competitor key) {
return race.getOrCreateSensorTrack(key, BravoFixTrack.TRACK_NAME,
- () -> new BravoFixTrackImpl(key, BravoFixTrack.TRACK_NAME, true));
+ () -> new BravoFixTrackImpl(key, BravoFixTrack.TRACK_NAME, /* hasExtendedFixes */ true));
}
@Override
diff --git a/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/ExpeditionExtendedDataFixMapper.java b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/ExpeditionExtendedDataFixMapper.java
new file mode 100755
index 00000000000..a0ba6a432c3
--- /dev/null
+++ b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/ExpeditionExtendedDataFixMapper.java
@@ -0,0 +1,40 @@
+package com.sap.sailing.domain.racelogtracking.impl;
+
+import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceMappingEvent;
+import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl;
+import com.sap.sailing.domain.base.Competitor;
+import com.sap.sailing.domain.common.tracking.BravoExtendedFix;
+import com.sap.sailing.domain.common.tracking.BravoFix;
+import com.sap.sailing.domain.common.tracking.DoubleVectorFix;
+import com.sap.sailing.domain.common.tracking.impl.BravoExtendedFixImpl;
+import com.sap.sailing.domain.racelog.tracking.SensorFixMapper;
+import com.sap.sailing.domain.tracking.BravoFixTrack;
+import com.sap.sailing.domain.tracking.DynamicSensorFixTrack;
+import com.sap.sailing.domain.tracking.DynamicTrackedRace;
+import com.sap.sailing.domain.tracking.impl.BravoFixTrackImpl;
+
+/**
+ * {@link SensorFixMapper} implementation to product {@link BravoExtendedFix}es from {@link DoubleVectorFix}es
+ * interpreted as "Expedition" data. The data has significant overlap with what we typically receive from the
+ * "Bravo" devices. Ultimately, the naming may need to be adjusted, better reflecting that the "Bravo" extended
+ * tracks now assume general responsibility for a broader set of sensor values that may be assigned to a
+ * competitor, beyond just GPS tracking data.
+ */
+public class ExpeditionExtendedDataFixMapper implements SensorFixMapper, Competitor> {
+
+ @Override
+ public DynamicSensorFixTrack getTrack(DynamicTrackedRace race, Competitor key) {
+ return race.getOrCreateSensorTrack(key, BravoFixTrack.TRACK_NAME,
+ () -> new BravoFixTrackImpl(key, BravoFixTrack.TRACK_NAME, /* hasExtendedFixes */ true));
+ }
+
+ @Override
+ public BravoExtendedFix map(DoubleVectorFix fix) {
+ return new BravoExtendedFixImpl(fix);
+ }
+
+ @Override
+ public boolean isResponsibleFor(Class extends RegattaLogDeviceMappingEvent>> eventType) {
+ return RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl.class.isAssignableFrom(eventType);
+ }
+}
\ No newline at end of file
diff --git a/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/regatta/events/impl/RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl.java b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/regatta/events/impl/RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl.java
new file mode 100755
index 00000000000..b0049dbb1e3
--- /dev/null
+++ b/java/com.sap.sailing.domain.shared.android/src/com/sap/sailing/domain/abstractlog/regatta/events/impl/RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl.java
@@ -0,0 +1,28 @@
+package com.sap.sailing.domain.abstractlog.regatta.events.impl;
+
+import java.io.Serializable;
+
+import com.sap.sailing.domain.abstractlog.AbstractLogEventAuthor;
+import com.sap.sailing.domain.base.Competitor;
+import com.sap.sailing.domain.racelogtracking.DeviceIdentifier;
+import com.sap.sse.common.TimePoint;
+
+/**
+ * Mapping event for devices mapped for "Expedition" extended type fixes, coming from the
+ * "Expedition" software that was originally used in the context of this solution only for
+ * handling wind data but now is also used to forward sensor data into competitor tracks.
+ */
+public class RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl extends AbstractRegattaLogDeviceCompetitorSensorDataMappingEventImpl {
+ private static final long serialVersionUID = -7865925670153838864L;
+
+ public RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl(TimePoint createdAt, TimePoint logicalTimePoint,
+ AbstractLogEventAuthor author, Serializable pId, Competitor mappedTo, DeviceIdentifier device,
+ TimePoint from, TimePoint to) {
+ super(createdAt, logicalTimePoint, author, pId, mappedTo, device, from, to);
+ }
+
+ public RegattaLogDeviceCompetitorExpeditionExtendedMappingEventImpl(TimePoint logicalTimePoint, AbstractLogEventAuthor author,
+ Competitor mappedTo, DeviceIdentifier device, TimePoint from, TimePoint to) {
+ super(logicalTimePoint, author, mappedTo, device, from, to);
+ }
+}
diff --git a/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRace.java b/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRace.java
index baa80fa589a..38232850d99 100644
--- a/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRace.java
+++ b/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRace.java
@@ -1150,4 +1150,9 @@ public class MockedTrackedRace implements DynamicTrackedRace {
String trackName) {
return Collections.emptySet();
}
+
+ @Override
+ public Speed getAverageSpeedOverGround(Competitor competitor, TimePoint timePoint) {
+ return null;
+ }
}
diff --git a/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRaceWithStartTimeAndRanks.java b/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRaceWithStartTimeAndRanks.java
index 2a0d856e3d1..05132e8622e 100755
--- a/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRaceWithStartTimeAndRanks.java
+++ b/java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/mock/MockedTrackedRaceWithStartTimeAndRanks.java
@@ -702,4 +702,9 @@ public class MockedTrackedRaceWithStartTimeAndRanks implements TrackedRace {
String trackName) {
return Collections.emptySet();
}
+
+ @Override
+ public Speed getAverageSpeedOverGround(Competitor competitor, TimePoint timePoint) {
+ return null;
+ }
}
diff --git a/java/com.sap.sailing.domain.tractracadapter/src/com/sap/sailing/domain/tractracadapter/impl/TracTracCourseDesignUpdateHandler.java b/java/com.sap.sailing.domain.tractracadapter/src/com/sap/sailing/domain/tractracadapter/impl/TracTracCourseDesignUpdateHandler.java
index 7ee6f254b3c..c2167e8d888 100644
--- a/java/com.sap.sailing.domain.tractracadapter/src/com/sap/sailing/domain/tractracadapter/impl/TracTracCourseDesignUpdateHandler.java
+++ b/java/com.sap.sailing.domain.tractracadapter/src/com/sap/sailing/domain/tractracadapter/impl/TracTracCourseDesignUpdateHandler.java
@@ -27,7 +27,6 @@ import com.sap.sailing.server.gateway.serialization.coursedata.impl.GateJsonSeri
import com.sap.sailing.server.gateway.serialization.coursedata.impl.MarkJsonSerializer;
import com.sap.sailing.server.gateway.serialization.coursedata.impl.WaypointJsonSerializer;
import com.sap.sse.common.Util;
-import com.sap.sse.util.HttpUrlConnectionHelper;
import com.tractrac.model.lib.api.event.IRace;
import com.tractrac.model.lib.api.route.IControl;
@@ -64,7 +63,7 @@ public class TracTracCourseDesignUpdateHandler extends UpdateHandler implements
URL currentCourseDesignURL = buildUpdateURL();
logger.info("Using " + currentCourseDesignURL.toString() + " for the course update!");
logger.info("Payload is " + payload);
- HttpURLConnection connection = HttpUrlConnectionHelper.redirectConnection(currentCourseDesignURL);
+ HttpURLConnection connection = (HttpURLConnection) currentCourseDesignURL.openConnection();
try {
setConnectionPropertiesAndSendWithPayload(connection, payload);
try {
diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/Leaderboard.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/Leaderboard.java
index a0a4ae63366..b039debafb7 100644
--- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/Leaderboard.java
+++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/Leaderboard.java
@@ -448,13 +448,10 @@ public interface Leaderboard extends LeaderboardBase, HasRaceColumns {
Util.Pair getMaximumSpeedOverGround(Competitor competitor, TimePoint timePoint);
/**
- * @return null if no tracked race is available in this leaderboard, the competitor hasn't started
- * a single race at timePoint or if the competitor has not finished one of the races. This method
- * computes the average speed starting with the first mark passing until timePoint or if earlier then
- * the timePoint of the last mark passing.
- *
- * Note: this method is not well defined, its implementation seems broken. Using it is strongly discouraged, it
- * can be considered deprecated and should rather be removed or defined and implemented properly.
+ * @return the {@link #getTotalDistanceTraveled(Competitor, TimePoint) total distance} the competitor has traveled
+ * up to {@code timePoint}, divided by the {@link #getTotalTimeSailed(Competitor, TimePoint) total time
+ * sailed} up to this {@code timePoint}; {@code null} in case a zero or {@code null} time has been spent so
+ * far, or a {@code null} distance is returned by {@link #getTotalDistanceTraveled(Competitor, TimePoint)}.
*/
Speed getAverageSpeedOverGround(Competitor competitor, TimePoint timePoint);
diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java
index 1ff7b0f376b..037eb50f3be 100644
--- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java
+++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractSimpleLeaderboardImpl.java
@@ -40,6 +40,7 @@ import com.sap.sailing.domain.racelog.RaceLogIdentifier;
import com.sap.sailing.domain.tracking.MarkPassing;
import com.sap.sailing.domain.tracking.TrackedRace;
import com.sap.sailing.util.impl.RaceColumnListeners;
+import com.sap.sse.common.Duration;
import com.sap.sse.common.ObscuringIterable;
import com.sap.sse.common.TimePoint;
import com.sap.sse.common.Util;
@@ -790,30 +791,10 @@ public abstract class AbstractSimpleLeaderboardImpl extends AbstractLeaderboardW
@Override
public Speed getAverageSpeedOverGround(Competitor competitor, TimePoint timePoint) {
Speed result = null;
- for (TrackedRace trackedRace : getTrackedRaces()) {
- if (Util.contains(trackedRace.getRace().getCompetitors(), competitor)) {
- NavigableSet markPassings = trackedRace.getMarkPassings(competitor);
- if (!markPassings.isEmpty()) {
- TimePoint from = markPassings.first().getTimePoint();
- TimePoint to;
- if (timePoint.after(markPassings.last().getTimePoint()) &&
- markPassings.last().getWaypoint() == trackedRace.getRace().getCourse().getLastWaypoint()) {
- // stop counting when competitor finished the race
- to = markPassings.last().getTimePoint();
- } else {
- if (markPassings.last().getWaypoint() != trackedRace.getRace().getCourse().getLastWaypoint() &&
- timePoint.after(markPassings.last().getTimePoint())) {
- result = null;
- break;
- }
- to = timePoint;
- }
- Distance distanceTraveled = trackedRace.getDistanceTraveled(competitor, timePoint);
- if (distanceTraveled != null) {
- result = distanceTraveled.inTime(to.asMillis()-from.asMillis());
- }
- }
- }
+ final Duration totalTimeSailed = this.getTotalTimeSailed(competitor, timePoint);
+ final Distance totalDistanceSailed = this.getTotalDistanceTraveled(competitor, timePoint);
+ if (totalDistanceSailed != null && totalTimeSailed != null && !totalTimeSailed.equals(Distance.NULL)) {
+ result = totalDistanceSailed.inTime(totalTimeSailed);
}
return result;
}
diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/trackimport/BaseDoubleVectorFixImporter.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/trackimport/BaseDoubleVectorFixImporter.java
new file mode 100644
index 00000000000..d7f46670a47
--- /dev/null
+++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/trackimport/BaseDoubleVectorFixImporter.java
@@ -0,0 +1,46 @@
+package com.sap.sailing.domain.trackimport;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import com.sap.sailing.domain.common.tracking.DoubleVectorFix;
+import com.sap.sailing.domain.trackfiles.TrackFileImportDeviceIdentifier;
+
+/**
+ * Definition of importers used by SensorDataImportServlet to do the import of a specific file type.
+ */
+public interface BaseDoubleVectorFixImporter {
+ public interface Callback {
+ void addFixes(Iterable fixes, TrackFileImportDeviceIdentifier device);
+ }
+
+ /**
+ * Parses the uploaded file and calls the callback for every fix that's contained in the input.
+ *
+ * @param inputStream
+ * the uploaded file as {@link InputStream}
+ * @param callback
+ * the callback to call for every new fix
+ * @param sourceName
+ * the uploaded file's name. This can be used to identify the file type if the importer can import
+ * different formats.
+ * @param downsample
+ * whether or not the importer shall reduce the sampling frequency during import; if {@code false}, all
+ * fixes read from the {@code inputStream} will be forwarded to the {@code callback}; otherwise, multiple
+ * fixes may be averaged, smoothened and then forwarded as only one combined fix to the {@code callback}.
+ * @throws FormatNotSupportedException
+ * if the uploaded file can't be parsed by the importer
+ * @throws IOException
+ * if there is a problem while reading the file
+ */
+ void importFixes(InputStream inputStream, Callback callback, String filename, String sourceName, boolean downsample)
+ throws FormatNotSupportedException, IOException;
+
+ /**
+ * The type is a String that's presented to the user for selection of the type when doing an import.
+ * The type is used on import to identify the importer to use depending on the user's selection.
+ *
+ * @return name of the file type to be imported by the importer
+ */
+ String getType();
+}
diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/trackimport/DoubleVectorFixImporter.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/trackimport/DoubleVectorFixImporter.java
old mode 100644
new mode 100755
index 0bf8ba1fa45..6d58d2a02fd
--- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/trackimport/DoubleVectorFixImporter.java
+++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/trackimport/DoubleVectorFixImporter.java
@@ -1,59 +1,22 @@
package com.sap.sailing.domain.trackimport;
-import java.io.IOException;
-import java.io.InputStream;
import java.io.Serializable;
import com.sap.sailing.domain.abstractlog.AbstractLogEventAuthor;
import com.sap.sailing.domain.abstractlog.regatta.RegattaLogEvent;
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceCompetitorSensorDataMappingEvent;
import com.sap.sailing.domain.base.Competitor;
-import com.sap.sailing.domain.common.tracking.DoubleVectorFix;
import com.sap.sailing.domain.racelogtracking.DeviceIdentifier;
-import com.sap.sailing.domain.trackfiles.TrackFileImportDeviceIdentifier;
import com.sap.sse.common.TimePoint;
/**
* Definition of importers used by SensorDataImportServlet to do the import of a specific file type.
*/
-public interface DoubleVectorFixImporter {
-
- public interface Callback {
- void addFixes(Iterable fixes, TrackFileImportDeviceIdentifier device);
- }
-
- /**
- * Parses the uploaded file and calls the callback for every fix that's contained in the input.
- *
- * @param inputStream
- * the uploaded file as {@link InputStream}
- * @param callback
- * the callback to call for every new fix
- * @param sourceName
- * the uploaded file's name. This can be used to identify the file type if the importer can import
- * different formats.
- * @param downsample TODO
- * @throws FormatNotSupportedException
- * if the uploaded file can't be parsed by the importer
- * @throws IOException
- * if there is a problem while reading the file
- */
- void importFixes(InputStream inputStream, Callback callback, String filename, String sourceName, boolean downsample)
- throws FormatNotSupportedException, IOException;
-
- /**
- * The type is a String that's presented to the user for selection of the type when doing an import.
- * The type is used on import to identify the importer to use depending on the user's selection.
- *
- * @return name of the file type to be imported by the importer
- */
- String getType();
-
+public interface DoubleVectorFixImporter extends BaseDoubleVectorFixImporter {
/**
* Creates the {@link RegattaLogEvent} for the DeviceMapping.
*/
RegattaLogDeviceCompetitorSensorDataMappingEvent createEvent(TimePoint createdAt, TimePoint logicalTimePoint,
AbstractLogEventAuthor author, Serializable id, Competitor mappedTo, DeviceIdentifier device,
TimePoint from, TimePoint to);
-
}
diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/TrackedRace.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/TrackedRace.java
index 19cf1f6dc63..62ca768397f 100644
--- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/TrackedRace.java
+++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/TrackedRace.java
@@ -1012,4 +1012,13 @@ public interface TrackedRace extends Serializable, IsManagedByCache getAttachedRaceLogs();
+ /**
+ * Computes the average speed over ground for a {@link Competitor} based on times and distances for all
+ * {@link TrackedLegOfCompetitor legs} the competitor {@link TrackedLegOfCompetitor#hasStartedLeg(TimePoint) has
+ * started} already at {@code timePoint}.
+ *
+ * @param timePoint
+ * time point up and until to compute the speed
+ */
+ Speed getAverageSpeedOverGround(Competitor competitor, TimePoint timePoint);
}
diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedRaceImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedRaceImpl.java
index dcf53b30598..0bae7f6f6e9 100755
--- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedRaceImpl.java
+++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedRaceImpl.java
@@ -4189,4 +4189,22 @@ public abstract class TrackedRaceImpl extends TrackedRaceWithWindEssentials impl
public Iterable getAttachedRaceLogs() {
return new HashSet<>(attachedRaceLogs.values());
}
+
+ @Override
+ public Speed getAverageSpeedOverGround(Competitor competitor, TimePoint timePoint) {
+ Speed result = null;
+ Duration totalTimeSailedInRace = Duration.NULL;
+ Distance totalDistanceSailedInRace = Distance.NULL;
+ for (TrackedLeg legGeneral : getTrackedLegs()) {
+ TrackedLegOfCompetitor leg = legGeneral.getTrackedLeg(competitor);
+ if (leg != null && leg.hasStartedLeg(timePoint)) {
+ totalDistanceSailedInRace = totalDistanceSailedInRace.add(leg.getDistanceTraveled(timePoint));
+ totalTimeSailedInRace = totalTimeSailedInRace.plus(leg.getTime(timePoint));
+ }
+ }
+ if (!totalTimeSailedInRace.equals(Duration.NULL) && !totalDistanceSailedInRace.equals(Distance.NULL)) {
+ result = totalDistanceSailedInRace.inTime(totalTimeSailedInRace);
+ }
+ return result;
+ }
}
diff --git a/java/com.sap.sailing.expeditionconnector/src/com/sap/sailing/expeditionconnector/ExpeditionMessage.java b/java/com.sap.sailing.expeditionconnector/src/com/sap/sailing/expeditionconnector/ExpeditionMessage.java
index 4793bd5de57..448d8e7216b 100755
--- a/java/com.sap.sailing.expeditionconnector/src/com/sap/sailing/expeditionconnector/ExpeditionMessage.java
+++ b/java/com.sap.sailing.expeditionconnector/src/com/sap/sailing/expeditionconnector/ExpeditionMessage.java
@@ -67,7 +67,7 @@ public interface ExpeditionMessage extends UDPMessage {
/**
* variable ID for the GPS-measured speed over ground (SoG)
*/
- final int ID_GPS_SOG = 50;
+ final int ID_GPS_SOG = 51;
/**
* variable ID for the GPS-measured time as days since 31.12.1899 UTC, meaning 1.0 is 1.1.1900 0:00:00 UTC
diff --git a/java/com.sap.sailing.feature.p2build/raceanalysis.product b/java/com.sap.sailing.feature.p2build/raceanalysis.product
index 323a04edf26..3a90dec43c3 100755
--- a/java/com.sap.sailing.feature.p2build/raceanalysis.product
+++ b/java/com.sap.sailing.feature.p2build/raceanalysis.product
@@ -38,6 +38,7 @@
+
@@ -90,4 +91,11 @@
+
+
+
+
+
+
+
diff --git a/java/com.sap.sailing.feature/feature.xml b/java/com.sap.sailing.feature/feature.xml
index 728e3f5ab9a..b5be4ddd98f 100755
--- a/java/com.sap.sailing.feature/feature.xml
+++ b/java/com.sap.sailing.feature/feature.xml
@@ -395,4 +395,11 @@ Computes leaderboard information for sailing races and offers RESTful APIs to al
version="0.0.0"
unpack="false"/>
+
+
diff --git a/java/com.sap.sailing.gwt.ui.test/META-INF/MANIFEST.MF b/java/com.sap.sailing.gwt.ui.test/META-INF/MANIFEST.MF
index b6912d31c74..7fc34e485e1 100644
--- a/java/com.sap.sailing.gwt.ui.test/META-INF/MANIFEST.MF
+++ b/java/com.sap.sailing.gwt.ui.test/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@ Require-Bundle: com.sap.sailing.server,
com.sap.sailing.domain.racelogtrackingadapter.testsupport,
com.rabbitmq.client;bundle-version="2.8.4",
com.sap.sse.filestorage,
- com.google.gwt.user;bundle-version="2.8.1";resolution:=optional,
+ com.google.gwt.user;bundle-version="2.8.2";resolution:=optional,
org.moxieapps.gwt.highcharts;bundle-version="1.5.0"
Bundle-ClassPath: .
Import-Package: com.sap.sailing.domain.racelogtracking.impl,
diff --git a/java/com.sap.sailing.gwt.ui.test/src/com/sap/sailing/gwt/ui/test/MockedTrackedRace.java b/java/com.sap.sailing.gwt.ui.test/src/com/sap/sailing/gwt/ui/test/MockedTrackedRace.java
index 58af534d869..2e5b4dfd710 100644
--- a/java/com.sap.sailing.gwt.ui.test/src/com/sap/sailing/gwt/ui/test/MockedTrackedRace.java
+++ b/java/com.sap.sailing.gwt.ui.test/src/com/sap/sailing/gwt/ui/test/MockedTrackedRace.java
@@ -720,7 +720,6 @@ public class MockedTrackedRace implements DynamicTrackedRace {
@Override
public boolean isUsingMarkPassingCalculator() {
- // TODO Auto-generated method stub
return false;
}
@@ -881,4 +880,9 @@ public class MockedTrackedRace implements DynamicTrackedRace {
String trackName) {
return Collections.emptySet();
}
+
+ @Override
+ public Speed getAverageSpeedOverGround(Competitor competitor, TimePoint timePoint) {
+ return null;
+ }
}
diff --git a/java/com.sap.sailing.gwt.ui/DataMining.css b/java/com.sap.sailing.gwt.ui/DataMining.css
index 54a9607fc06..5f52d30e4ad 100644
--- a/java/com.sap.sailing.gwt.ui/DataMining.css
+++ b/java/com.sap.sailing.gwt.ui/DataMining.css
@@ -257,4 +257,4 @@ input.magnifier {
.queryDefinitionViewerContent {
background-color: white;
padding: 5px;
-}
\ No newline at end of file
+}
diff --git a/java/com.sap.sailing.gwt.ui/META-INF/MANIFEST.MF b/java/com.sap.sailing.gwt.ui/META-INF/MANIFEST.MF
index 2f95c07d959..7d1b5d432e9 100644
--- a/java/com.sap.sailing.gwt.ui/META-INF/MANIFEST.MF
+++ b/java/com.sap.sailing.gwt.ui/META-INF/MANIFEST.MF
@@ -24,8 +24,8 @@ Require-Bundle: com.sap.sailing.domain,
com.sap.sailing.freg.resultimport,
com.sap.sailing.domain.swisstimingreplayadapter,
com.sap.sailing.simulator,
- com.google.gwt.user;bundle-version="2.8.1";resolution:=optional,
- com.google.gwt.servlet;bundle-version="2.8.1",
+ com.google.gwt.user;bundle-version="2.8.2";resolution:=optional,
+ com.google.gwt.servlet;bundle-version="2.8.2",
com.sap.sailing.domain.igtimiadapter,
com.sap.sailing.xrr.resultimport,
com.sap.sailing.datamining.shared,
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.gss b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.gss
index bbb5545e440..88081595726 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.gss
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.gss
@@ -48,9 +48,3 @@
text-align: right;
}
}
-.sitefooter_language_link {
- color: #efaa00;
- display: inline-block;
- cursor: pointer;
- margin-left: 0.666666666666667em;
-}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.java
index 02fc522ec7e..d56dd87fbc3 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.java
@@ -1,28 +1,13 @@
package com.sap.sailing.gwt.home.desktop.partials.footer;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.AnchorElement;
-import com.google.gwt.dom.client.DivElement;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.logical.shared.ValueChangeEvent;
-import com.google.gwt.http.client.UrlBuilder;
-import com.google.gwt.i18n.client.LocaleInfo;
-import com.google.gwt.text.shared.Renderer;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.EventListener;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.Window.Location;
-import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.ValueListBox;
import com.google.gwt.user.client.ui.Widget;
import com.google.web.bindery.event.shared.EventBus;
import com.sap.sailing.gwt.home.desktop.app.DesktopPlacesNavigator;
@@ -30,9 +15,6 @@ import com.sap.sailing.gwt.home.desktop.places.whatsnew.WhatsNewPlace;
import com.sap.sailing.gwt.home.desktop.places.whatsnew.WhatsNewPlace.WhatsNewNavigationTabs;
import com.sap.sailing.gwt.home.shared.SwitchingEntryPoint;
import com.sap.sailing.gwt.home.shared.app.PlaceNavigation;
-import com.sap.sse.common.Util;
-import com.sap.sse.common.Util.Pair;
-import com.sap.sse.gwt.client.GWTLocaleUtil;
public class Footer extends Composite {
private static FooterPanelUiBinder uiBinder = GWT.create(FooterPanelUiBinder.class);
@@ -40,32 +22,8 @@ public class Footer extends Composite {
interface FooterPanelUiBinder extends UiBinder {
}
- @UiField Anchor changeLanguageLink;
@UiField AnchorElement imprintAnchorLink;
- @UiField DivElement languageSelectionDiv;
- @UiField(provided = true) ValueListBox> changeLanguageList = new ValueListBox>(new Renderer>() {
- @Override
- public String render(Pair object) {
- if(object == null) {
- return "";
- }
- if(object.getB() != null) {
- return object.getB();
- }
- return object.getA();
- }
-
- @Override
- public void render(Pair object, Appendable appendable) throws IOException {
- appendable.append(render(object));
- }
- });
-
@UiField AnchorElement mobileUi;
- private String otherLanguage;
- private final LocaleInfo currentLocale = LocaleInfo.getCurrentLocale();
-
-
@UiField(provided = true)
final PlaceNavigation releaseNotesNavigation;
@@ -76,7 +34,6 @@ public class Footer extends Composite {
initWidget(uiBinder.createAndBindUi(this));
navigator.getImprintNavigation().configureAnchorElement(imprintAnchorLink);
- updateUI();
DOM.sinkEvents(mobileUi, Event.ONCLICK);
DOM.setEventListener(mobileUi, new EventListener() {
@Override
@@ -89,58 +46,4 @@ public class Footer extends Composite {
});
}
-
- @UiHandler("changeLanguageLink")
- public void changeLanguage(ClickEvent e) {
- if(otherLanguage != null) {
- UrlBuilder builder = Location.createUrlBuilder().setParameter("locale", otherLanguage);
- Window.Location.replace(builder.buildString());
- }
- }
-
- @UiHandler("changeLanguageList")
- void onListSelection(ValueChangeEvent> event) {
- String selectedLocaleName = event.getValue().getA();
- if(!currentLocale.getLocaleName().equals(selectedLocaleName)) {
- UrlBuilder builder = Location.createUrlBuilder().setParameter("locale", selectedLocaleName);
- Window.Location.replace(builder.buildString());
- }
- }
-
- private void updateUI() {
- final Iterable availableLocales = GWTLocaleUtil.getAvailableLocales();
- final int localeCount = Util.size(availableLocales);
-
- if (localeCount <= 1) {
- // only current language (or removed default) available
- changeLanguageLink.removeFromParent();
- changeLanguageList.removeFromParent();
- languageSelectionDiv.removeFromParent();
- return;
- }
- if (Util.size(availableLocales) == 2) {
- changeLanguageList.removeFromParent();
- // current language + one we can switch to
- for (String localeName : availableLocales) {
- if (!currentLocale.getLocaleName().equals(localeName)) {
- otherLanguage = localeName;
- changeLanguageLink.setText(LocaleInfo.getLocaleNativeDisplayName(otherLanguage));
- return;
- }
- }
- return;
- }
- changeLanguageLink.removeFromParent();
- Collection> values = new ArrayList<>();
- Pair selectedValue = null;
- for (String localeName : availableLocales) {
- Pair value = new Pair(localeName, LocaleInfo.getLocaleNativeDisplayName(localeName));
- values.add(value);
- if (currentLocale.getLocaleName().equals(localeName)) {
- selectedValue = value;
- }
- }
- changeLanguageList.setValue(selectedValue);
- changeLanguageList.setAcceptableValues(values);
- }
}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.ui.xml b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.ui.xml
index a0bfd39be8e..e67cc4cc916 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.ui.xml
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/Footer.ui.xml
@@ -1,37 +1,11 @@
-
- .languageSelect::-ms-expand {
- display: none;
- }
- .languageSelect {
- -webkit-appearance: none;
- -moz-appearance: none;
- -ms-appearance: none;
- appearance: none;
-
- margin-top: 25px;
- color: #efaa00;
- line-height: 1.5em;
- height: 1.5em;
- display: inline-block;
- border: transparent;
- cursor: pointer;
- padding-right: 1.2em;
- background: #333;
- cursor: pointer;
-
- background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgaGVpZ2h0PScxOHB4JyB3aWR0aD0nMTZweCc+PHRleHQgeD0nMCcgeT0nMTUnIGZpbGw9JyNlZmFhMDAnIGZvbnQtc2l6ZT0nMTYnPiYjOTY2MDs8L3RleHQ+PC9zdmc+");
- background-position: right center;
- background-repeat: no-repeat;
-
- }
-
@@ -61,11 +35,8 @@
-
- :
-
-
-
+
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/FooterResources.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/FooterResources.java
index ce5aad9d4f1..7c73496fd50 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/FooterResources.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/footer/FooterResources.java
@@ -16,6 +16,5 @@ public interface FooterResources extends ClientBundle {
String sitefooter_links();
String sitefooter_links_link();
String sitefooter_language();
- String sitefooter_language_link();
}
}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/stage/Stage.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/stage/Stage.java
index 5afb6c77f0a..5065ba9aa54 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/stage/Stage.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/stage/Stage.java
@@ -7,6 +7,7 @@ import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.home.communication.start.EventStageDTO;
import com.sap.sailing.gwt.home.desktop.app.DesktopPlacesNavigator;
@@ -19,7 +20,8 @@ public class Stage extends Composite {
private static StageUiBinder uiBinder = GWT.create(StageUiBinder.class);
- @UiField WidgetCarousel widgetCarousel;
+ @UiField
+ SimplePanel widgetCarouselContainerUi;
private StageTeaser stageTeaser;
private List stageTeaserComposites;
@@ -33,6 +35,8 @@ public class Stage extends Composite {
}
public void setFeaturedEvents(List list) {
+ final WidgetCarousel widgetCarousel = new WidgetCarousel();
+ widgetCarousel.setShowDots(false);
for (EventStageDTO event : list) {
switch (event.getStageType()) {
case POPULAR:
@@ -48,5 +52,6 @@ public class Stage extends Composite {
widgetCarousel.addWidget(stageTeaser);
stageTeaserComposites.add(stageTeaser);
}
+ this.widgetCarouselContainerUi.setWidget(widgetCarousel);
}
}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/stage/Stage.ui.xml b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/stage/Stage.ui.xml
index d51e1a2a40b..e4645b285ec 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/stage/Stage.ui.xml
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/partials/stage/Stage.ui.xml
@@ -1,6 +1,5 @@
-
+
@@ -8,7 +7,7 @@
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/user/profile/settingstab/UserSettings.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/user/profile/settingstab/UserSettings.java
index 138718895cf..236ce9d5786 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/user/profile/settingstab/UserSettings.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/user/profile/settingstab/UserSettings.java
@@ -7,7 +7,6 @@ import com.google.gwt.cell.client.FieldUpdater;
import com.google.gwt.cell.client.TextCell;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.DivElement;
-import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.cellview.client.Column;
@@ -34,8 +33,6 @@ public class UserSettings extends Composite implements UserSettingsView {
interface MyUiBinder extends UiBinder {
}
- @UiField
- DivElement notificationsTextUi;
@UiField
UserSettingsByKeyTextBoxFilter userSettingsFilterUi;
@UiField
@@ -107,15 +104,8 @@ public class UserSettings extends Composite implements UserSettingsView {
@Override
public void setEntries(List entries) {
- if (entries.isEmpty()) {
- notificationsTextUi.setInnerText(StringMessages.INSTANCE.noDataFound());
- tableWrapper.getStyle().setDisplay(Display.NONE);
- } else {
- notificationsTextUi.setInnerText(StringMessages.INSTANCE.userProfileSettingsTabDescription());
- tableWrapper.getStyle().clearDisplay();
- userSettingsTable.setPageSize(entries.size());
- userSettingsTable.setList(entries);
- }
+ userSettingsTable.setPageSize(entries.size());
+ userSettingsTable.setList(entries);
}
private static final class StringComparator extends InvertibleComparatorAdapter {
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/user/profile/settingstab/UserSettings.ui.xml b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/user/profile/settingstab/UserSettings.ui.xml
index c45c113d045..c1440c990c1 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/user/profile/settingstab/UserSettings.ui.xml
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/desktop/places/user/profile/settingstab/UserSettings.ui.xml
@@ -10,16 +10,25 @@
.table {
width: 100%;
}
+ .table .empty {
+ margin: 1.033333333333333em;
+ font-style: italic;
+ line-height: 2em;
+ }
-
-
+
+
-
+
+
+
+
+
\ No newline at end of file
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.gss b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.gss
index 70cd072f687..32b7a0e8c59 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.gss
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.gss
@@ -14,11 +14,8 @@
.sitefooter_language {
display: block;
}
-a.sitefooter_language_link {
- color: #fff;
-}
-a.sitefooter_language_linkactive {
- color: #efaa00;
+.sitefooter_language select {
+ font-size: 110%;
}
.sitefooter_links {
font-weight: 600;
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.java
index a07f9cbce7d..a7f75d1530c 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.java
@@ -1,34 +1,19 @@
package com.sap.sailing.gwt.home.mobile.partials.footer;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.AnchorElement;
-import com.google.gwt.dom.client.DivElement;
import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.logical.shared.ValueChangeEvent;
-import com.google.gwt.http.client.UrlBuilder;
-import com.google.gwt.i18n.client.LocaleInfo;
-import com.google.gwt.text.shared.Renderer;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.EventListener;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.Window.Location;
-import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.ValueListBox;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.home.desktop.places.whatsnew.WhatsNewPlace;
import com.sap.sailing.gwt.home.mobile.app.MobilePlacesNavigator;
import com.sap.sailing.gwt.home.shared.SwitchingEntryPoint;
-import com.sap.sse.common.Util.Pair;
/**
* Mobile page footer with several links and the ability to switch the language.
@@ -39,32 +24,10 @@ public class Footer extends Composite {
interface FooterPanelUiBinder extends UiBinder
{
}
- private String otherLanguage;
- private final LocaleInfo currentLocale = LocaleInfo.getCurrentLocale();
- private MobilePlacesNavigator placeNavigator;
-
- @UiField Anchor changeLanguageLink;
@UiField AnchorElement imprintAnchorLink;
- @UiField DivElement languageSelectionDiv;
@UiField AnchorElement desktopUi;
- @UiField(provided = true) ValueListBox> changeLanguageList = new ValueListBox>(new Renderer>() {
- @Override
- public String render(Pair object) {
- if(object == null) {
- return "";
- }
- if(object.getB() != null) {
- return object.getB();
- }
- return object.getA();
- }
-
- @Override
- public void render(Pair object, Appendable appendable) throws IOException {
- appendable.append(render(object));
- }
- });
+ private final MobilePlacesNavigator placeNavigator;
public Footer(MobilePlacesNavigator placeNavigator) {
this.placeNavigator = placeNavigator;
@@ -73,7 +36,6 @@ public class Footer extends Composite {
initWidget(uiBinder.createAndBindUi(this));
placeNavigator.getImprintNavigation().configureAnchorElement(imprintAnchorLink);
- updateUI();
DOM.sinkEvents(desktopUi, Event.ONCLICK);
DOM.setEventListener(desktopUi, new EventListener() {
@Override
@@ -86,62 +48,9 @@ public class Footer extends Composite {
});
}
- @UiHandler("changeLanguageLink")
- public void changeLanguage(ClickEvent e) {
- if(otherLanguage != null) {
- UrlBuilder builder = Location.createUrlBuilder().setParameter("locale", otherLanguage);
- Window.Location.replace(builder.buildString());
- }
- }
-
- @UiHandler("changeLanguageList")
- void onListSelection(ValueChangeEvent> event) {
- String selectedLocaleName = event.getValue().getA();
- if(!currentLocale.getLocaleName().equals(selectedLocaleName)) {
- UrlBuilder builder = Location.createUrlBuilder().setParameter("locale", selectedLocaleName);
- Window.Location.replace(builder.buildString());
- }
- }
-
@UiHandler("whatsNewLinkUi")
void onWhatsNew(ClickEvent e) {
placeNavigator.getWhatsNewNavigation(WhatsNewPlace.WhatsNewNavigationTabs.SailingAnalytics).goToPlace();
}
- private void updateUI() {
- Set availableLocales = new HashSet(Arrays.asList(LocaleInfo.getAvailableLocaleNames()));
- availableLocales.remove("default");
-
- if(availableLocales.size() <= 1) {
- // only current language (or removed default) available
- changeLanguageLink.removeFromParent();
- changeLanguageList.removeFromParent();
- languageSelectionDiv.removeFromParent();
- return;
- }
- if(availableLocales.size() == 2) {
- changeLanguageList.removeFromParent();
- // current language + one we can switch to
- for(String localeName : availableLocales) {
- if(!currentLocale.getLocaleName().equals(localeName)) {
- otherLanguage = localeName;
- changeLanguageLink.setText(LocaleInfo.getLocaleNativeDisplayName(otherLanguage));
- return;
- }
- }
- return;
- }
- changeLanguageLink.removeFromParent();
- Set> values = new HashSet<>();
- Pair selectedValue = null;
- for(String localeName : availableLocales) {
- Pair value = new Pair(localeName, LocaleInfo.getLocaleNativeDisplayName(localeName));
- values.add(value);
- if(currentLocale.getLocaleName().equals(localeName)) {
- selectedValue = value;
- }
- }
- changeLanguageList.setValue(selectedValue);
- changeLanguageList.setAcceptableValues(values);
- }
}
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.ui.xml b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.ui.xml
index 14bf6904283..c48a3dd984e 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.ui.xml
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.ui.xml
@@ -1,60 +1,17 @@
-
-
-
-
-
-
- .languageSelect::-ms-expand {
- display: none;
- }
-
- .languageSelect {
- -webkit-appearance: none;
- -moz-appearance: none;
- -ms-appearance: none;
- appearance: none;
- margin-top: 25px;
- color: #efaa00;
- line-height: 1.5em;
- height: 1.5em;
- display: inline-block;
- border: transparent;
- cursor: pointer;
- padding-right: 1.2em;
- background: #333;
- cursor: pointer;
- background-image:
- url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZlcnNpb249JzEuMScgaGVpZ2h0PScxOHB4JyB3aWR0aD0nMTZweCc+PHRleHQgeD0nMCcgeT0nMTUnIGZpbGw9JyNlZmFhMDAnIGZvbnQtc2l6ZT0nMTYnPiYjOTY2MDs8L3RleHQ+PC9zdmc+");
- background-position: right center;
- background-repeat: no-repeat;
- font-size: 110%;
- }
-
+
+
+
+