mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-14 06:18:12 +00:00
Merge branch 'master' of ssh://sapsailing.com/home/trac/git into bug4104
# Conflicts: # java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java # java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties
This commit is contained in:
commit
68fe2ca6d1
586 files changed
+12035
-3241
No files matched your search
+34
-4
@@ -4,6 +4,18 @@
|
||||
#
|
||||
# chkconfig: 2345 95 10
|
||||
# description: Sailing contains all sailing services
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: sailing
|
||||
# Required-Start: $local_fs $network $named $remote_fs
|
||||
# Should-Start:
|
||||
# Required-Stop:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: The sailing service
|
||||
# Description: Start all sailing services required for this instance
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
@@ -14,8 +26,8 @@ JAVA_START_INSTANCES="server"
|
||||
SERVERS_DIR=/home/sailing/servers
|
||||
GIT_REPOSITORY=/home/sailing/code
|
||||
APACHE_CONFIG_DIR=/etc/httpd/conf.d
|
||||
rm /var/log/sailing.out
|
||||
rm /var/log/sailing.err
|
||||
|
||||
echo "Executing with $1" >>/var/log/sailing.out
|
||||
|
||||
start_tmux() {
|
||||
su - sailing -c "/home/sailing/bin/tmuxConsole.sh unattended"
|
||||
@@ -63,13 +75,21 @@ start_servers() {
|
||||
|
||||
stop_servers() {
|
||||
for conf in $JAVA_START_INSTANCES; do
|
||||
echo "Stopping Java server $conf"
|
||||
echo "Stopping Java server $conf" >> /var/log/sailing.out
|
||||
su - sailing -c "cd $SERVERS_DIR/$conf && ./stop"
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && success || failure
|
||||
stop_httpd
|
||||
sync_logs
|
||||
done
|
||||
}
|
||||
|
||||
sync_logs() {
|
||||
echo "Executing logrotate followed by a sync to ensure that logs are synchronized" >> /var/log/sailing.out
|
||||
logrotate -f /etc/logrotate.conf
|
||||
sync
|
||||
}
|
||||
|
||||
# launch_httpd(server_name, port, event_id)
|
||||
launch_httpd() {
|
||||
echo "Will try to launch httpd so this replica can work with an ELB easily." >>/var/log/sailing.out
|
||||
@@ -78,7 +98,7 @@ launch_httpd() {
|
||||
source $SERVERS_DIR/$FIRST_SERVER/env.sh
|
||||
# Append Apache macro invocation for /internal-server-status based on mod_status and INSTANCE_DNS to $APACHE_CONFIG_DIR/001-events.conf
|
||||
echo "Appending macro usage for $INSTANCE_DNS/internal-server-status URL for mod_status based Apache monitoring to $APACHE_CONFIG_DIR/001-events.conf" >>/var/log/sailing.out
|
||||
echo "## SERVER STATUS" >>$APACHE_CONFIG_DIR/001-events.conf
|
||||
echo "## SERVER STATUS" >>$APACHE_CONFIG_DIR/001-events.conf
|
||||
echo "Use Status $INSTANCE_DNS internal-server-status" >>$APACHE_CONFIG_DIR/001-events.conf
|
||||
echo "Launching httpd..." >>/var/log/sailing.out
|
||||
service httpd start
|
||||
@@ -87,13 +107,23 @@ launch_httpd() {
|
||||
fi
|
||||
}
|
||||
|
||||
stop_httpd() {
|
||||
if [ -x /etc/init.d/httpd ]; then
|
||||
service httpd stop
|
||||
echo "Stopped httpd..." >>/var/log/sailing.out
|
||||
fi
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
/usr/sbin/update-motd
|
||||
start_servers
|
||||
touch /var/lock/subsys/sailing
|
||||
;;
|
||||
stop)
|
||||
stop_servers
|
||||
rm -f /var/lock/subsys/sailing
|
||||
;;
|
||||
status)
|
||||
status java
|
||||
|
||||
@@ -20,16 +20,6 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
@@ -44,7 +34,6 @@
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -3,7 +3,10 @@
|
||||
<booleanAttribute key="com.gwtplugins.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.gwtplugins.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.DevMode"/>
|
||||
<booleanAttribute key="com.gwtplugins.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
|
||||
<stringAttribute key="com.gwtplugins.gwt.eclipse.core.CLASSIC_DEVMODE_CODE_SERVER_PORT" value="9876"/>
|
||||
<stringAttribute key="com.gwtplugins.gwt.eclipse.core.CLASSIC_DEVMODE_CODE_SERVER_PORT" value="9875"/>
|
||||
<listAttribute key="com.gwtplugins.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="com.gwtplugins.gwt.eclipse.core.URL" value="/security/ui/Login.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.dashboards.gwt"/>
|
||||
@@ -19,84 +22,25 @@
|
||||
<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="false"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" javaProject="com.sap.sailing.gwt.ui" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.googlecode.java-diff-utils/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.shared.android/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.annotations/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.common/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.shared.android/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.json.simple/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.geocoding/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.udpconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server.gateway.serialization.shared.android/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.filestorage/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.filestorage/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.mongodb/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.replication/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.operationaltransformation/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server.gateway.serialization/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.simulator/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.simulator/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.tractrac.clientmodule/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.mail/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.xrr.resultimport/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.resultimport/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.competitorimport/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.xrr.schema/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.freg.resultimport/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingreplayadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.igtimiadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.igtimiadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining.provider/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.racelogtrackingadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.racelogtrackingadapter/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.manage2sail/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.manage2sail/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.xrr.structureimport/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.ui/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.news/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.polars.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.polars.datamining/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.polars.datamining/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.gwt.ui"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry path="3" projectName="com.sap.sse.common" type="1"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" javaProject="com.sap.sailing.gwt.ui" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.dashboards.gwt/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.dashboards.gwt"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector.common/src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.gwtplugins.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -startupUrl /security/ui/Login.html -logLevel INFO -noserver -incremental -workDir "${project_loc:com.sap.sse.security.ui}/.tmp/gwt-work" -war "${project_loc:com.sap.sse.security.ui}" -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -codeServerPort 9876 com.sap.sailing.dashboards.gwt.RibDashboard -startupUrl /dashboards/RibDashboard.html com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -startupUrl /security/ui/Login.html -logLevel INFO -noserver -incremental -war "${project_loc:com.sap.sailing.dashboards.gwt}" -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -codeServerPort 9875 -startupUrl /dashboards/RibDashboard.html com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.dashboards.gwt"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+UseG1GC -XX:+UseStringDeduplication -Dgwt.watchFileChanges=false -Xmx2048m -Dgwt-usearchives=false -Dgwt.persistentunitcache=false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.sap.sailing.gwt.ui}/.tmp/gwt-work"/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<booleanAttribute key="com.gwtplugins.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.gwtplugins.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.DevMode"/>
|
||||
<booleanAttribute key="com.gwtplugins.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
|
||||
<stringAttribute key="com.gwtplugins.gwt.eclipse.core.CLASSIC_DEVMODE_CODE_SERVER_PORT" value="9876"/>
|
||||
<stringAttribute key="com.gwtplugins.gwt.eclipse.core.CLASSIC_DEVMODE_CODE_SERVER_PORT" value="9875"/>
|
||||
<listAttribute key="com.gwtplugins.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
</listAttribute>
|
||||
@@ -24,22 +24,24 @@
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="false"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" javaProject="com.sap.sailing.gwt.ui" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.dashboards.gwt/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.dashboards.gwt"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.dashboards.gwt/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.dashboards.gwt"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector.common/src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.gwtplugins.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-startupUrl /security/ui/Login.html -logLevel INFO -noserver -incremental -war "${project_loc:com.sap.sailing.dashboards.gwt}" -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -codeServerPort 9876 com.sap.sailing.dashboards.gwt.RibDashboard -startupUrl /dashboards/RibDashboard.html com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-startupUrl /security/ui/Login.html -logLevel INFO -noserver -incremental -war "${project_loc:com.sap.sailing.dashboards.gwt}" -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -codeServerPort 9875 -startupUrl /dashboards/RibDashboard.html com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.dashboards.gwt"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+UseG1GC -XX:+UseStringDeduplication -Dgwt.watchFileChanges=false -Xmx2048m -Dgwt-usearchives=false -Dgwt.persistentunitcache=false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.sap.sailing.gwt.ui}/.tmp/gwt-work"/>
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
|
||||
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="false"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.CLASSIC_DEVMODE_CODE_SERVER_PORT" value="9874"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT" value="9874"/>
|
||||
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.SUPERDEVMODE_ENABLED" value="true"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/dashboards/RibDashboard.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.dashboards.gwt"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.dashboards.gwt/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.dashboards.gwt"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector.common/src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-incremental -war "${project_loc:com.sap.sailing.dashboards.gwt}" -startupUrl /dashboards/RibDashboard.html -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9874 com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.dashboards.gwt"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -Dgwt.watchFileChanges=false"/>
|
||||
</launchConfiguration>
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
|
||||
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="false"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.CLASSIC_DEVMODE_CODE_SERVER_PORT" value="9874"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT_AUTO" value="true"/>
|
||||
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/dashboards/RibDashboard.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.dashboards.gwt"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.dashboards.gwt/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.dashboards.gwt"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector.common/src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -incremental -war "${project_loc:com.sap.sailing.dashboards.gwt}" -startupUrl /dashboards/RibDashboard.html -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9874 com.sap.sailing.dashboards.gwt.RibDashboard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.dashboards.gwt"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -Dgwt.watchFileChanges=false"/>
|
||||
</launchConfiguration>
|
||||
@@ -21,12 +21,12 @@
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<name>com.gwtplugins.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
@@ -34,6 +34,6 @@
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+5
-5
@@ -15,7 +15,7 @@ import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.sap.sailing.datamining.impl.data.LeaderboardGroupWithContext;
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardGroupContext;
|
||||
import com.sap.sailing.datamining.test.util.ConcurrencyTestsUtil;
|
||||
import com.sap.sailing.datamining.test.util.NullProcessor;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
@@ -27,7 +27,7 @@ import com.sap.sse.datamining.components.Processor;
|
||||
public class TestLeaderboardGroupRetrievalProcessor {
|
||||
|
||||
private RacingEventService service;
|
||||
private Processor<RacingEventService, LeaderboardGroupWithContext> retriever;
|
||||
private Processor<RacingEventService, HasLeaderboardGroupContext> retriever;
|
||||
|
||||
private Collection<LeaderboardGroup> retrievedGroups;
|
||||
|
||||
@@ -37,14 +37,14 @@ public class TestLeaderboardGroupRetrievalProcessor {
|
||||
stub(service.getLeaderboardGroups()).toReturn(getGroupsInService());
|
||||
|
||||
retrievedGroups = new HashSet<>();
|
||||
Processor<LeaderboardGroupWithContext, Void> receiver = new NullProcessor<LeaderboardGroupWithContext, Void>(LeaderboardGroupWithContext.class, Void.class) {
|
||||
Processor<HasLeaderboardGroupContext, Void> receiver = new NullProcessor<HasLeaderboardGroupContext, Void>(HasLeaderboardGroupContext.class, Void.class) {
|
||||
@Override
|
||||
public void processElement(LeaderboardGroupWithContext element) {
|
||||
public void processElement(HasLeaderboardGroupContext element) {
|
||||
retrievedGroups.add(element.getLeaderboardGroup());
|
||||
}
|
||||
};
|
||||
|
||||
Collection<Processor<LeaderboardGroupWithContext, ?>> resultReceivers = new ArrayList<>();
|
||||
Collection<Processor<HasLeaderboardGroupContext, ?>> resultReceivers = new ArrayList<>();
|
||||
resultReceivers.add(receiver);
|
||||
retriever = new LeaderboardGroupRetrievalProcessor(ConcurrencyTestsUtil.getExecutor(), resultReceivers, 0);
|
||||
}
|
||||
|
||||
@@ -21,18 +21,19 @@
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<name>com.gwtplugins.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand> </buildSpec>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+3
-2
@@ -188,7 +188,7 @@ AbsRelativeBearingToNextMarkAfterManeuver=Abs. relative bearing to the next mark
|
||||
RatioBetweenDistanceSailedWithAndWithoutManeuver=Ratio between distance sailed with and without maneuver
|
||||
RatioBetweenDistanceSailedTowardMiddleAngleProjectionWithAndWithoutManeuver=Ratio between distance sailed toward middle angle projection with and without maneuver
|
||||
DurationLostByManeuver=Duration lost by maneuver
|
||||
DurationLostByManeuverTowardMiddleAngleProjection=duration lost by maneuver toward middle angle projection
|
||||
DurationLostByManeuverTowardMiddleAngleProjection=Duration lost by maneuver toward middle angle projection
|
||||
JibingCount=Jibing count
|
||||
TackingCount=Tacking count
|
||||
AbsTwaAtMaxTurningRate=Abs. TWA at max. turning rate
|
||||
@@ -198,4 +198,5 @@ PercentageOfMainCurveProgressUntilLowestSpeed=Percentage of main curve progress
|
||||
PercentageOfMainCurveProgressUntilHighestSpeed=Percentage of main curve progress until highest speed
|
||||
PercentageOfMainCurveProgressUntilMaxTurningRate=Percentage of main curve progress until max. turning rate speed
|
||||
AbsTwaAtManeuverMiddle=Abs. TWA at maneuver middle
|
||||
GpsSamplingRate=GPS sampling rate
|
||||
GpsSamplingRate=GPS sampling rate
|
||||
RaceDuration=Race duration
|
||||
+2
-1
@@ -201,4 +201,5 @@ PercentageOfMainCurveProgressUntilHighestSpeed=Prozentualer Fortschritt der Haup
|
||||
PercentageOfMainCurveProgressUntilMaxTurningRate=Prozentualer Fortschritt der Hauptkurve bis zum Erreichen von max. Drehrate
|
||||
ManeuverTypeForCompleteManeuverCurve=Manövertyp für komplette Manöverkurve
|
||||
AbsTwaAtManeuverMiddle=Abs. TWA während Manövermitte
|
||||
GpsSamplingRate=GPS-Samplingrate
|
||||
GpsSamplingRate=GPS-Samplingrate
|
||||
RaceDuration=Renndauer
|
||||
+4
-4
@@ -5,12 +5,13 @@ import java.util.Collection;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasBravoFixContext;
|
||||
import com.sap.sailing.datamining.data.HasBravoFixTrackContext;
|
||||
import com.sap.sailing.datamining.data.HasCompleteManeuverCurveWithEstimationDataContext;
|
||||
import com.sap.sailing.datamining.data.HasFoilingSegmentContext;
|
||||
import com.sap.sailing.datamining.data.HasGPSFixContext;
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardContext;
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardGroupContext;
|
||||
import com.sap.sailing.datamining.data.HasManeuverContext;
|
||||
import com.sap.sailing.datamining.data.HasManeuverSpeedDetailsContext;
|
||||
import com.sap.sailing.datamining.data.HasCompleteManeuverCurveWithEstimationDataContext;
|
||||
import com.sap.sailing.datamining.data.HasMarkPassingContext;
|
||||
import com.sap.sailing.datamining.data.HasRaceOfCompetitorContext;
|
||||
import com.sap.sailing.datamining.data.HasRaceResultOfCompetitorContext;
|
||||
@@ -22,13 +23,13 @@ import com.sap.sailing.datamining.data.HasWindTrackContext;
|
||||
import com.sap.sailing.datamining.impl.components.BravoFixRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.BravoFixTrackRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.CompetitorOfRaceInLeaderboardRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.CompleteManeuverCurveWithEstimationDataRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.FoilingSegmentRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.GPSFixRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.LeaderboardGroupRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.LeaderboardRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.ManeuverRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.ManeuverSpeedDetailsRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.CompleteManeuverCurveWithEstimationDataRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.MarkPassingRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.RaceOfCompetitorRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.TrackedLegOfCompetitorRetrievalProcessor;
|
||||
@@ -36,7 +37,6 @@ import com.sap.sailing.datamining.impl.components.TrackedLegRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.TrackedRaceRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.WindFixRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.components.WindTrackRetrievalProcessor;
|
||||
import com.sap.sailing.datamining.impl.data.LeaderboardGroupWithContext;
|
||||
import com.sap.sailing.datamining.shared.FoilingSegmentsDataMiningSettings;
|
||||
import com.sap.sailing.datamining.shared.ManeuverSettings;
|
||||
import com.sap.sailing.datamining.shared.ManeuverSettingsImpl;
|
||||
@@ -55,7 +55,7 @@ public class SailingDataRetrievalChainDefinitions {
|
||||
|
||||
final DataRetrieverChainDefinition<RacingEventService, HasLeaderboardContext> leaderboardRetrieverChainDefinition = new SimpleDataRetrieverChainDefinition<>(
|
||||
RacingEventService.class, HasLeaderboardContext.class, "LeaderboardSailingDomainRetrieverChain");
|
||||
leaderboardRetrieverChainDefinition.startWith(LeaderboardGroupRetrievalProcessor.class, LeaderboardGroupWithContext.class, "LeaderboardGroup");
|
||||
leaderboardRetrieverChainDefinition.startWith(LeaderboardGroupRetrievalProcessor.class, HasLeaderboardGroupContext.class, "LeaderboardGroup");
|
||||
leaderboardRetrieverChainDefinition.endWith(LeaderboardGroupRetrievalProcessor.class, LeaderboardRetrievalProcessor.class,
|
||||
HasLeaderboardContext.class, "Leaderboard");
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ public interface HasBravoFixContext {
|
||||
@Connector(ordinal=1)
|
||||
BravoFix getBravoFix();
|
||||
|
||||
@Connector(messageKey="Speed")
|
||||
@Connector(messageKey="")
|
||||
SpeedWithBearing getSpeed();
|
||||
|
||||
@Connector(messageKey="Wind")
|
||||
|
||||
-3
@@ -2,7 +2,6 @@ package com.sap.sailing.datamining.data;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.domain.polars.PolarDataService;
|
||||
import com.sap.sse.datamining.annotations.Connector;
|
||||
import com.sap.sse.datamining.annotations.Dimension;
|
||||
|
||||
@@ -12,8 +11,6 @@ public interface HasLeaderboardContext {
|
||||
|
||||
Leaderboard getLeaderboard();
|
||||
|
||||
PolarDataService getPolarDataService();
|
||||
|
||||
@Dimension(messageKey="Leaderboard", ordinal=1)
|
||||
String getName();
|
||||
|
||||
|
||||
+29
-24
@@ -4,6 +4,7 @@ import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.NoWindException;
|
||||
import com.sap.sailing.domain.common.Tack;
|
||||
import com.sap.sse.common.Distance;
|
||||
import com.sap.sse.common.Duration;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
import com.sap.sse.common.Speed;
|
||||
import com.sap.sse.datamining.annotations.Connector;
|
||||
@@ -14,74 +15,74 @@ import com.sap.sse.datamining.shared.impl.dto.ClusterDTO;
|
||||
public interface HasRaceOfCompetitorContext {
|
||||
|
||||
@Connector(scanForStatistics=false)
|
||||
public HasTrackedRaceContext getTrackedRaceContext();
|
||||
HasTrackedRaceContext getTrackedRaceContext();
|
||||
|
||||
@Connector(messageKey="Competitor")
|
||||
@Statistic(messageKey="")
|
||||
public Competitor getCompetitor();
|
||||
@Statistic(messageKey="Competitor")
|
||||
Competitor getCompetitor();
|
||||
|
||||
@Dimension(messageKey="TackAtStart", ordinal=12)
|
||||
public Tack getTackAtStart() throws NoWindException;
|
||||
Tack getTackAtStart() throws NoWindException;
|
||||
|
||||
@Dimension(messageKey="DistanceToStarboardSideAtStartOfCompetitor", ordinal=13)
|
||||
public ClusterDTO getPercentageClusterForDistanceToStarboardSideAtStart();
|
||||
ClusterDTO getPercentageClusterForDistanceToStarboardSideAtStart();
|
||||
|
||||
@Dimension(messageKey="RelativeScoreInPercent", ordinal=14)
|
||||
public ClusterDTO getPercentageClusterForRelativeScore();
|
||||
ClusterDTO getPercentageClusterForRelativeScore();
|
||||
|
||||
@Statistic(messageKey="DistanceAtStart", resultDecimals=2, ordinal=0)
|
||||
public Distance getDistanceToStartLineAtStart();
|
||||
Distance getDistanceToStartLineAtStart();
|
||||
|
||||
@Statistic(messageKey="DistanceToStarboardSideAtStartOfCompetitor", resultDecimals=2, ordinal=1)
|
||||
public Double getNormalizedDistanceToStarboardSideAtStartOfCompetitor();
|
||||
Double getNormalizedDistanceToStarboardSideAtStartOfCompetitor();
|
||||
|
||||
@Statistic(messageKey="DistanceToStarboardSideAtStartOfCompetitorVsRankAtFirstMark", resultDecimals=2, ordinal=1)
|
||||
public Pair<Double, Double> getNormalizedDistanceToStarboardSideAtStartOfCompetitorVsRankAtFirstMark();
|
||||
Pair<Double, Double> getNormalizedDistanceToStarboardSideAtStartOfCompetitorVsRankAtFirstMark();
|
||||
|
||||
@Statistic(messageKey="WindwardDistanceToAdvantageousEndOfLineAtStartOfRace", resultDecimals=2, ordinal=2)
|
||||
public Distance getWindwardDistanceToAdvantageousLineEndAtStartofRace();
|
||||
Distance getWindwardDistanceToAdvantageousLineEndAtStartofRace();
|
||||
|
||||
@Statistic(messageKey="WindwardDistanceToAdvantageousEndOfLineAtStartOfCompetitor", resultDecimals=2, ordinal=2)
|
||||
public Distance getWindwardDistanceToAdvantageousLineEndAtStartofCompetitor();
|
||||
Distance getWindwardDistanceToAdvantageousLineEndAtStartofCompetitor();
|
||||
|
||||
@Connector(messageKey="SpeedWhenStarting", ordinal=3)
|
||||
public Speed getSpeedWhenStarting();
|
||||
Speed getSpeedWhenStarting();
|
||||
|
||||
@Connector(messageKey="SpeedTenSecondsBeforeStart", ordinal=4)
|
||||
public Speed getSpeedTenSecondsBeforeStart();
|
||||
Speed getSpeedTenSecondsBeforeStart();
|
||||
|
||||
@Connector(messageKey="SpeedTenSecondsAfterStart", ordinal=5)
|
||||
public Speed getSpeedTenSecondsAfterStartOfRace();
|
||||
Speed getSpeedTenSecondsAfterStartOfRace();
|
||||
|
||||
@Statistic(messageKey="RankThirtySecondsAfterStart", resultDecimals=2, ordinal=6)
|
||||
public Double getRankThirtySecondsAfterStartOfRace();
|
||||
Double getRankThirtySecondsAfterStartOfRace();
|
||||
|
||||
@Statistic(messageKey="RankAfterHalfOfTheFirstLeg", resultDecimals=2, ordinal=7)
|
||||
public Double getRankAfterHalfOfTheFirstLeg();
|
||||
Double getRankAfterHalfOfTheFirstLeg();
|
||||
|
||||
@Statistic(messageKey="RankAtFirstMark", resultDecimals=2, ordinal=8)
|
||||
public Double getRankAtFirstMark();
|
||||
Double getRankAtFirstMark();
|
||||
|
||||
@Statistic(messageKey="RankGainsOrLossesBetweenFirstMarkAndFinish", resultDecimals=2, ordinal=9)
|
||||
public Double getRankGainsOrLossesBetweenFirstMarkAndFinish();
|
||||
Double getRankGainsOrLossesBetweenFirstMarkAndFinish();
|
||||
|
||||
@Statistic(messageKey="NumberOfManeuvers", resultDecimals=0, ordinal=10)
|
||||
public int getNumberOfManeuvers();
|
||||
int getNumberOfManeuvers();
|
||||
|
||||
@Statistic(messageKey="NumberOfTacks", resultDecimals=0, ordinal=11)
|
||||
public int getNumberOfTacks();
|
||||
int getNumberOfTacks();
|
||||
|
||||
@Statistic(messageKey="NumberOfJibes", resultDecimals=0, ordinal=12)
|
||||
public int getNumberOfJibes();
|
||||
int getNumberOfJibes();
|
||||
|
||||
@Statistic(messageKey="NumberOfPenaltyCircles", resultDecimals=0, ordinal=13)
|
||||
public int getNumberOfPenaltyCircles();
|
||||
int getNumberOfPenaltyCircles();
|
||||
|
||||
@Statistic(messageKey="DistanceTraveled", resultDecimals=1)
|
||||
public Distance getDistanceTraveled();
|
||||
Distance getDistanceTraveled();
|
||||
|
||||
@Statistic(messageKey="LineLengthAtStart", resultDecimals=1)
|
||||
public Distance getLineLengthAtStart();
|
||||
Distance getLineLengthAtStart();
|
||||
|
||||
@Statistic(messageKey="AbsoluteWindwardDistanceToStarboardSideAtStartOfCompetitor", resultDecimals=2)
|
||||
Distance getAbsoluteWindwardDistanceToStarboardSideAtStartOfCompetitor();
|
||||
@@ -94,4 +95,8 @@ public interface HasRaceOfCompetitorContext {
|
||||
|
||||
@Statistic(messageKey="RelativeDistanceToAdvantageousEndOfLineAtStartOfRace", resultDecimals=2)
|
||||
Double getRelativeDistanceToAdvantageousEndOfLineAtStartOfRace();
|
||||
|
||||
@Statistic(messageKey="RaceDuration")
|
||||
Duration getDuration();
|
||||
|
||||
}
|
||||
+6
-2
@@ -8,6 +8,7 @@ import com.sap.sailing.domain.base.RaceDefinition;
|
||||
import com.sap.sailing.domain.base.Regatta;
|
||||
import com.sap.sailing.domain.common.NauticalSide;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sse.common.Duration;
|
||||
import com.sap.sse.datamining.annotations.Connector;
|
||||
import com.sap.sse.datamining.annotations.Dimension;
|
||||
import com.sap.sse.datamining.annotations.Statistic;
|
||||
@@ -46,10 +47,13 @@ public interface HasTrackedRaceContext {
|
||||
@Dimension(messageKey="IsTracked", ordinal=9)
|
||||
public Boolean isTracked();
|
||||
|
||||
@Statistic(messageKey="NumberOfCompetitorFixes", resultDecimals=0, ordinal=0)
|
||||
@Statistic(messageKey="RaceDuration", ordinal=0)
|
||||
public Duration getDuration();
|
||||
|
||||
@Statistic(messageKey="NumberOfCompetitorFixes", resultDecimals=0, ordinal=1)
|
||||
public int getNumberOfCompetitorFixes();
|
||||
|
||||
@Statistic(messageKey="NumberOfMarkFixes", resultDecimals=0, ordinal=1)
|
||||
@Statistic(messageKey="NumberOfMarkFixes", resultDecimals=0, ordinal=2)
|
||||
public int getNumberOfMarkFixes();
|
||||
|
||||
// Convenience methods for race dependent calculation to avoid code duplication
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ public interface HasWindFixContext extends HasWind {
|
||||
@Connector(scanForStatistics=false)
|
||||
public HasTrackedRaceContext getTrackedRaceContext();
|
||||
|
||||
@Statistic(messageKey="", ordinal=0)
|
||||
@Statistic(messageKey="WindFix", ordinal=0)
|
||||
public Wind getWind();
|
||||
|
||||
@Statistic(messageKey="windFrom", resultDecimals=1, ordinal=1)
|
||||
|
||||
+11
-8
@@ -24,21 +24,24 @@ public class BravoFixRetrievalProcessor extends AbstractRetrievalProcessor<HasTr
|
||||
@Override
|
||||
protected Iterable<HasBravoFixContext> retrieveData(HasTrackedLegOfCompetitorContext element) {
|
||||
Collection<HasBravoFixContext> bravoFixesWithContext = new ArrayList<>();
|
||||
BravoFixTrack<Competitor> bravoFixTrack = element.getTrackedLegContext().getTrackedRaceContext().getTrackedRace().getSensorTrack(element.getCompetitor(), BravoFixTrack.TRACK_NAME);
|
||||
if (bravoFixTrack != null) {
|
||||
bravoFixTrack.lockForRead();
|
||||
try {
|
||||
TrackedLegOfCompetitor trackedLegOfCompetitor = element.getTrackedLegOfCompetitor();
|
||||
if (trackedLegOfCompetitor.getStartTime() != null && trackedLegOfCompetitor.getFinishTime() != null) {
|
||||
TrackedLegOfCompetitor trackedLegOfCompetitor = element.getTrackedLegOfCompetitor();
|
||||
if (trackedLegOfCompetitor.getStartTime() != null && trackedLegOfCompetitor.getFinishTime() != null) {
|
||||
BravoFixTrack<Competitor> bravoFixTrack = element.getTrackedLegContext().getTrackedRaceContext().getTrackedRace().getSensorTrack(element.getCompetitor(), BravoFixTrack.TRACK_NAME);
|
||||
if (bravoFixTrack != null) {
|
||||
bravoFixTrack.lockForRead();
|
||||
try {
|
||||
for (BravoFix bravoFix : bravoFixTrack.getFixes(trackedLegOfCompetitor.getStartTime(), true, trackedLegOfCompetitor.getFinishTime(), true)) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
BravoFixWithContext gpsFixWithContext = new BravoFixWithContext(
|
||||
new TrackedLegOfCompetitorWithSpecificTimePointWithContext(
|
||||
element.getTrackedLegContext(), element.getTrackedLegOfCompetitor(), bravoFix.getTimePoint()), bravoFix);
|
||||
bravoFixesWithContext.add(gpsFixWithContext);
|
||||
}
|
||||
} finally {
|
||||
bravoFixTrack.unlockAfterRead();
|
||||
}
|
||||
} finally {
|
||||
bravoFixTrack.unlockAfterRead();
|
||||
}
|
||||
}
|
||||
return bravoFixesWithContext;
|
||||
|
||||
+2
-6
@@ -1,7 +1,7 @@
|
||||
package com.sap.sailing.datamining.impl.components;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasBravoFixTrackContext;
|
||||
@@ -28,13 +28,9 @@ public class BravoFixTrackRetrievalProcessor extends AbstractRetrievalProcessor<
|
||||
|
||||
@Override
|
||||
protected Iterable<HasBravoFixTrackContext> retrieveData(HasRaceOfCompetitorContext element) {
|
||||
Collection<HasBravoFixTrackContext> bravoTracksWithContext = new ArrayList<>();
|
||||
final TrackedRace trackedRace = element.getTrackedRaceContext().getTrackedRace();
|
||||
final BravoFixTrack<Competitor> bravoFixTrack = trackedRace.getSensorTrack(element.getCompetitor(), BravoFixTrack.TRACK_NAME);
|
||||
if (bravoFixTrack != null) {
|
||||
bravoTracksWithContext.add(new BravoFixTrackWithContext(element, bravoFixTrack));
|
||||
}
|
||||
return bravoTracksWithContext;
|
||||
return bravoFixTrack == null ? Collections.emptySet() : Collections.singleton(new BravoFixTrackWithContext(element, bravoFixTrack));
|
||||
}
|
||||
|
||||
}
|
||||
+7
-1
@@ -24,9 +24,15 @@ public class CompetitorOfRaceInLeaderboardRetrievalProcessor extends
|
||||
protected Iterable<HasRaceResultOfCompetitorContext> retrieveData(HasLeaderboardContext element) {
|
||||
Collection<HasRaceResultOfCompetitorContext> raceResultsOfCompetitor = new ArrayList<>();
|
||||
for (RaceColumn raceColumn : element.getLeaderboard().getRaceColumns()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
for (Competitor competitor : element.getLeaderboard().getCompetitors()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
HasRaceResultOfCompetitorContext raceResultOfCompetitorContext = new RaceResultOfCompetitorWithContext(element, raceColumn, competitor,
|
||||
element.getPolarDataService());
|
||||
element.getLeaderboardGroupContext().getPolarDataService());
|
||||
raceResultsOfCompetitor.add(raceResultOfCompetitorContext);
|
||||
}
|
||||
}
|
||||
|
||||
+14
-2
@@ -48,15 +48,27 @@ public class CompleteManeuverCurveWithEstimationDataRetrievalProcessor extends
|
||||
Competitor competitor = element.getCompetitor();
|
||||
ManeuverDetectorWithEstimationDataSupport maneuverDetector = new ManeuverDetectorWithEstimationDataSupportDecoratorImpl(
|
||||
new ManeuverDetectorImpl(trackedRace, competitor),
|
||||
element.getTrackedRaceContext().getLeaderboardContext().getPolarDataService());
|
||||
element.getTrackedRaceContext().getLeaderboardContext().getLeaderboardGroupContext().getPolarDataService());
|
||||
|
||||
Iterable<Maneuver> maneuvers = trackedRace.getManeuvers(competitor, false);
|
||||
if (isAborted()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Iterable<CompleteManeuverCurve> maneuverCurves = maneuverDetector.getCompleteManeuverCurves(maneuvers);
|
||||
if (isAborted()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Iterable<CompleteManeuverCurveWithEstimationData> maneuversWithEstimationData = maneuverDetector
|
||||
.getCompleteManeuverCurvesWithEstimationData(maneuverCurves);
|
||||
|
||||
CompleteManeuverCurveWithEstimationData previousManeuver = null;
|
||||
CompleteManeuverCurveWithEstimationData currentManeuver = null;
|
||||
for (CompleteManeuverCurveWithEstimationData nextManeuver : maneuversWithEstimationData) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (currentManeuver != null) {
|
||||
CompleteManeuverCurveWithEstimationDataWithContext maneuverWithContext = new CompleteManeuverCurveWithEstimationDataWithContext(
|
||||
element, currentManeuver, settings, previousManeuver, nextManeuver);
|
||||
|
||||
+3
@@ -50,6 +50,9 @@ public class FoilingSegmentRetrievalProcessor extends AbstractRetrievalProcessor
|
||||
bravoFixTrack.lockForRead();
|
||||
try {
|
||||
for (final BravoFix bravoFix : bravoFixTrack.getFixes(startOfRace, /* fromInclusive */ true, end, /* toInclusive */ false)) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
final boolean currentFixIsFoiling =
|
||||
(bravoFix.isFoiling(settings.getMinimumRideHeight()) &&
|
||||
(settings.getMinimumSpeedForFoiling() == null || settings.getMinimumSpeedForFoiling().compareTo(
|
||||
|
||||
+3
@@ -30,6 +30,9 @@ public class GPSFixRetrievalProcessor extends AbstractRetrievalProcessor<HasTrac
|
||||
TrackedLegOfCompetitor trackedLegOfCompetitor = element.getTrackedLegOfCompetitor();
|
||||
if (trackedLegOfCompetitor.getStartTime() != null && trackedLegOfCompetitor.getFinishTime() != null) {
|
||||
for (GPSFixMoving gpsFix : competitorTrack.getFixes(trackedLegOfCompetitor.getStartTime(), true, trackedLegOfCompetitor.getFinishTime(), true)) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
HasGPSFixContext gpsFixWithContext = new GPSFixWithContext(new TrackedLegOfCompetitorWithSpecificTimePointWithContext(
|
||||
element.getTrackedLegContext(), element.getTrackedLegOfCompetitor(), gpsFix.getTimePoint()), gpsFix);
|
||||
gpsFixesWithContext.add(gpsFixWithContext);
|
||||
|
||||
+17
-11
@@ -1,30 +1,36 @@
|
||||
package com.sap.sailing.datamining.impl.components;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardGroupContext;
|
||||
import com.sap.sailing.datamining.impl.data.LeaderboardGroupWithContext;
|
||||
import com.sap.sailing.domain.leaderboard.LeaderboardGroup;
|
||||
import com.sap.sailing.domain.polars.PolarDataService;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sse.datamining.components.Processor;
|
||||
import com.sap.sse.datamining.impl.components.AbstractRetrievalProcessor;
|
||||
|
||||
public class LeaderboardGroupRetrievalProcessor extends AbstractRetrievalProcessor<RacingEventService, LeaderboardGroupWithContext> {
|
||||
public class LeaderboardGroupRetrievalProcessor extends AbstractRetrievalProcessor<RacingEventService, HasLeaderboardGroupContext> {
|
||||
|
||||
public LeaderboardGroupRetrievalProcessor(ExecutorService executor,
|
||||
Collection<Processor<LeaderboardGroupWithContext, ?>> resultReceivers, int retrievalLevel) {
|
||||
super(RacingEventService.class, LeaderboardGroupWithContext.class, executor, resultReceivers, retrievalLevel);
|
||||
Collection<Processor<HasLeaderboardGroupContext, ?>> resultReceivers, int retrievalLevel) {
|
||||
super(RacingEventService.class, HasLeaderboardGroupContext.class, executor, resultReceivers, retrievalLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterable<LeaderboardGroupWithContext> retrieveData(RacingEventService element) {
|
||||
final PolarDataService polarDataService = element.getPolarDataService();
|
||||
return element.getLeaderboardGroups()
|
||||
.values()
|
||||
.stream()
|
||||
.map(lg -> new LeaderboardGroupWithContext(lg, polarDataService))
|
||||
.collect(Collectors.toSet());
|
||||
protected Iterable<HasLeaderboardGroupContext> retrieveData(RacingEventService element) {
|
||||
Set<HasLeaderboardGroupContext> data = new HashSet<>();
|
||||
PolarDataService polarDataService = element.getPolarDataService();
|
||||
for (LeaderboardGroup leaderboardGroup : element.getLeaderboardGroups().values()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
data.add(new LeaderboardGroupWithContext(leaderboardGroup, polarDataService));
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
+8
-5
@@ -5,24 +5,27 @@ import java.util.Collection;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardContext;
|
||||
import com.sap.sailing.datamining.impl.data.LeaderboardGroupWithContext;
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardGroupContext;
|
||||
import com.sap.sailing.datamining.impl.data.LeaderboardWithContext;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sse.datamining.components.Processor;
|
||||
import com.sap.sse.datamining.impl.components.AbstractRetrievalProcessor;
|
||||
|
||||
public class LeaderboardRetrievalProcessor extends AbstractRetrievalProcessor<LeaderboardGroupWithContext, HasLeaderboardContext> {
|
||||
public class LeaderboardRetrievalProcessor extends AbstractRetrievalProcessor<HasLeaderboardGroupContext, HasLeaderboardContext> {
|
||||
|
||||
public LeaderboardRetrievalProcessor(ExecutorService executor,
|
||||
Collection<Processor<HasLeaderboardContext, ?>> resultReceivers, int retrievalLevel) {
|
||||
super(LeaderboardGroupWithContext.class, HasLeaderboardContext.class, executor, resultReceivers, retrievalLevel);
|
||||
super(HasLeaderboardGroupContext.class, HasLeaderboardContext.class, executor, resultReceivers, retrievalLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterable<HasLeaderboardContext> retrieveData(LeaderboardGroupWithContext element) {
|
||||
protected Iterable<HasLeaderboardContext> retrieveData(HasLeaderboardGroupContext element) {
|
||||
Collection<HasLeaderboardContext> leaderboardsWithContext = new ArrayList<>();
|
||||
for (Leaderboard leaderboard : element.getLeaderboardGroup().getLeaderboards()) {
|
||||
leaderboardsWithContext.add(new LeaderboardWithContext(leaderboard, element, element.getPolarDataService()));
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
leaderboardsWithContext.add(new LeaderboardWithContext(leaderboard, element));
|
||||
}
|
||||
return leaderboardsWithContext;
|
||||
}
|
||||
|
||||
+14
@@ -9,6 +9,7 @@ import com.sap.sailing.datamining.data.HasTrackedLegOfCompetitorContext;
|
||||
import com.sap.sailing.datamining.impl.data.ManeuverWithContext;
|
||||
import com.sap.sailing.datamining.impl.data.TrackedLegOfCompetitorWithSpecificTimePointWithContext;
|
||||
import com.sap.sailing.datamining.shared.ManeuverSettings;
|
||||
import com.sap.sailing.domain.base.Waypoint;
|
||||
import com.sap.sailing.domain.common.NoWindException;
|
||||
import com.sap.sailing.domain.tracking.Maneuver;
|
||||
import com.sap.sailing.domain.tracking.ManeuverCurveBoundaries;
|
||||
@@ -36,6 +37,9 @@ public class ManeuverRetrievalProcessor
|
||||
TimePoint finishTime = element.getTrackedLegOfCompetitor().getFinishTime();
|
||||
if (finishTime != null) {
|
||||
Iterable<Maneuver> maneuvers = null;
|
||||
if (!isLastLeg(element)) {
|
||||
finishTime = finishTime.minus(1);
|
||||
}
|
||||
try {
|
||||
maneuvers = element.getTrackedLegOfCompetitor().getManeuvers(finishTime, false);
|
||||
} catch (NoWindException e) {
|
||||
@@ -44,6 +48,10 @@ public class ManeuverRetrievalProcessor
|
||||
Maneuver previousManeuver = null;
|
||||
Maneuver currentManeuver = null;
|
||||
for (Maneuver nextManeuver : maneuvers) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (currentManeuver != null) {
|
||||
ManeuverWithContext maneuverWithContext = new ManeuverWithContext(new TrackedLegOfCompetitorWithSpecificTimePointWithContext(
|
||||
element.getTrackedLegContext(), element.getTrackedLegOfCompetitor(), currentManeuver.getTimePoint()), currentManeuver,
|
||||
@@ -66,6 +74,12 @@ public class ManeuverRetrievalProcessor
|
||||
return maneuversWithContext;
|
||||
}
|
||||
|
||||
private boolean isLastLeg(HasTrackedLegOfCompetitorContext element) {
|
||||
Waypoint finishWaypoint = element.getTrackedLegContext().getTrackedRaceContext().getRace().getCourse().getLastWaypoint();
|
||||
Waypoint toWaypoint = element.getTrackedLegOfCompetitor().getLeg().getTo();
|
||||
return finishWaypoint.equals(toWaypoint);
|
||||
}
|
||||
|
||||
private boolean isManeuverCompliantWithSettings(Maneuver previousManeuver,
|
||||
ManeuverWithContext currentManeuverWithContext, Maneuver nextManeuver) {
|
||||
boolean mainCurveAnalysis = settings.isMainCurveAnalysis();
|
||||
|
||||
+7
@@ -87,6 +87,10 @@ public class ManeuverSpeedDetailsRetrievalProcessor
|
||||
|
||||
double directionChangeForAnalysisSignum = Math.signum(directionChangeInDegreesForAnalysis);
|
||||
for (SpeedWithBearingStep bearingStep : maneuverBearingSteps) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
|
||||
currentDirectionChangeSumInDegrees += bearingStep.getCourseChangeInDegrees();
|
||||
if (previousRoundedTWA != -1
|
||||
&& Math.signum(currentDirectionChangeSumInDegrees) != directionChangeForAnalysisSignum
|
||||
@@ -123,6 +127,9 @@ public class ManeuverSpeedDetailsRetrievalProcessor
|
||||
for (int step = 1, fillingTWA = twaIterationFunction
|
||||
.apply(previousRoundedTWA); fillingTWA != roundedTWA; fillingTWA = twaIterationFunction
|
||||
.apply(fillingTWA), ++step) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
if (speedPerTWA[fillingTWA] == 0) {
|
||||
speedPerTWA[fillingTWA] = previousSpeed
|
||||
+ diffWithPreviousSpeed * step / diffWithPreviousTWA;
|
||||
|
||||
+3
@@ -29,6 +29,9 @@ public class MarkPassingRetrievalProcessor extends AbstractRetrievalProcessor<Ha
|
||||
try {
|
||||
Iterable<Maneuver> maneuvers = element.getTrackedLegOfCompetitor().getManeuvers(finishTime, false);
|
||||
for (Maneuver maneuver : maneuvers) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
if (maneuver.isMarkPassing()) {
|
||||
maneuversWithContext.add(new MarkPassingWithContext(new TrackedLegOfCompetitorWithSpecificTimePointWithContext(
|
||||
element.getTrackedLegContext(), element.getTrackedLegOfCompetitor(), maneuver.getTimePoint()), maneuver));
|
||||
|
||||
+3
@@ -22,6 +22,9 @@ public class RaceOfCompetitorRetrievalProcessor extends AbstractRetrievalProcess
|
||||
protected Iterable<HasRaceOfCompetitorContext> retrieveData(HasTrackedRaceContext element) {
|
||||
Collection<HasRaceOfCompetitorContext> raceOfCompetitorsWithContext = new ArrayList<>();
|
||||
for (Competitor competitor : element.getTrackedRace().getRace().getCompetitors()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
HasRaceOfCompetitorContext raceOfCompetitorWithContext = new RaceOfCompetitorWithContext(element, competitor);
|
||||
raceOfCompetitorsWithContext.add(raceOfCompetitorWithContext);
|
||||
}
|
||||
|
||||
+3
@@ -22,6 +22,9 @@ public class TrackedLegOfCompetitorRetrievalProcessor extends AbstractRetrievalP
|
||||
protected Iterable<HasTrackedLegOfCompetitorContext> retrieveData(HasTrackedLegContext element) {
|
||||
Collection<HasTrackedLegOfCompetitorContext> trackedLegOfCompetitorsWithContext = new ArrayList<>();
|
||||
for (Competitor competitor : element.getTrackedRaceContext().getTrackedRace().getRace().getCompetitors()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
HasTrackedLegOfCompetitorContext trackedLegOfCompetitorWithContext = new TrackedLegOfCompetitorWithContext(element, element.getTrackedLeg().getTrackedLeg(competitor));
|
||||
trackedLegOfCompetitorsWithContext.add(trackedLegOfCompetitorWithContext);
|
||||
}
|
||||
|
||||
+3
@@ -23,6 +23,9 @@ public class TrackedLegRetrievalProcessor extends AbstractRetrievalProcessor<Has
|
||||
Collection<HasTrackedLegContext> trackedLegsWithContext = new ArrayList<>();
|
||||
int legNumber = 1;
|
||||
for (TrackedLeg trackedLeg : element.getTrackedRace().getTrackedLegs()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
HasTrackedLegContext trackedLegWithContext = new TrackedLegWithContext(element, trackedLeg, legNumber);
|
||||
trackedLegsWithContext.add(trackedLegWithContext);
|
||||
legNumber++;
|
||||
|
||||
+6
@@ -25,7 +25,13 @@ public class TrackedRaceRetrievalProcessor extends AbstractRetrievalProcessor<Ha
|
||||
protected Iterable<HasTrackedRaceContext> retrieveData(HasLeaderboardContext element) {
|
||||
Collection<HasTrackedRaceContext> trackedRacesWithContext = new ArrayList<>();
|
||||
for (RaceColumn raceColumn : element.getLeaderboard().getRaceColumns()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
for (Fleet fleet : raceColumn.getFleets()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
TrackedRace trackedRace = raceColumn.getTrackedRace(fleet);
|
||||
if (trackedRace != null) {
|
||||
Regatta regatta = trackedRace.getTrackedRegatta().getRegatta();
|
||||
|
||||
+3
@@ -33,6 +33,9 @@ public class WindFixRetrievalProcessor extends AbstractRetrievalProcessor<HasWin
|
||||
windTrack.lockForRead();
|
||||
try {
|
||||
for (final Wind wind : windTrack.getFixes()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
windFixesWithContext.add(new WindFixWithContext(element.getTrackedRaceContext(), wind, element.getWindSourceType()));
|
||||
}
|
||||
} finally {
|
||||
|
||||
+3
@@ -31,6 +31,9 @@ public class WindTrackRetrievalProcessor extends AbstractRetrievalProcessor<HasT
|
||||
Collection<HasWindTrackContext> windTracksWithContext = new ArrayList<>();
|
||||
final TrackedRace trackedRace = element.getTrackedRace();
|
||||
for (final WindSource windSource : trackedRace.getWindSources()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
if (!trackedRace.getWindSourcesToExclude().contains(windSource)) {
|
||||
final WindTrack windTrack = trackedRace.getOrCreateWindTrack(windSource);
|
||||
windTracksWithContext.add(new WindTrackWithContext(element, windTrack, windSource));
|
||||
|
||||
+3
@@ -64,6 +64,9 @@ public abstract class AbstractParallelAverageAggregationProcessor<T extends Comp
|
||||
Map<GroupKey, T> minAggregation = minAggregationProcessor.getResult();
|
||||
Map<GroupKey, T> maxAggregation = maxAggregationProcessor.getResult();
|
||||
for (Entry<GroupKey, T> sumAggregationEntry : sumAggregation.entrySet()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
GroupKey key = sumAggregationEntry.getKey();
|
||||
result.put(key, new AverageWithStatsImpl<>(
|
||||
/* average */ divide(sumAggregationEntry.getValue(), elementAmountPerKey.get(key).longValue()),
|
||||
|
||||
+2
-2
@@ -19,8 +19,6 @@ public abstract class AbstractParallelSumAggregationProcessor<T> extends
|
||||
super(executor, resultReceivers, "Sum");
|
||||
results = new HashMap<>();
|
||||
}
|
||||
|
||||
protected abstract T add(T t1, T t2);
|
||||
|
||||
@Override
|
||||
protected void handleElement(GroupedDataEntry<T> element) {
|
||||
@@ -31,6 +29,8 @@ public abstract class AbstractParallelSumAggregationProcessor<T> extends
|
||||
results.put(key, add(results.get(key), element.getDataEntry()));
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract T add(T t1, T t2);
|
||||
|
||||
@Override
|
||||
protected Map<GroupKey, T> getResult() {
|
||||
|
||||
+3
@@ -47,6 +47,9 @@ public class ParallelBearingAverageDegreesAggregationProcessor
|
||||
protected Map<GroupKey, Double> aggregateResult() {
|
||||
Map<GroupKey, Double> result = new HashMap<>();
|
||||
for (Entry<GroupKey, BearingCluster> clusterEntry : results.entrySet()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
GroupKey key = clusterEntry.getKey();
|
||||
result.put(key, clusterEntry.getValue().getAverage().getDegrees());
|
||||
}
|
||||
|
||||
+3
@@ -50,6 +50,9 @@ public class ParallelDistanceMedianAggregationProcessor
|
||||
protected Map<GroupKey, Distance> aggregateResult() {
|
||||
Map<GroupKey, Distance> result = new HashMap<>();
|
||||
for (Entry<GroupKey, List<Distance>> groupedValuesEntry : groupedValues.entrySet()) {
|
||||
if (isAborted()) {
|
||||
break;
|
||||
}
|
||||
result.put(groupedValuesEntry.getKey(), getMedianOf(groupedValuesEntry.getValue()));
|
||||
}
|
||||
return result;
|
||||
|
||||
+1
-9
@@ -4,17 +4,14 @@ import com.sap.sailing.datamining.data.HasLeaderboardContext;
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardGroupContext;
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.domain.polars.PolarDataService;
|
||||
|
||||
public class LeaderboardWithContext implements HasLeaderboardContext {
|
||||
private final Leaderboard leaderboard;
|
||||
private final HasLeaderboardGroupContext leaderboardGroupContext;
|
||||
private final PolarDataService polarDataService;
|
||||
|
||||
public LeaderboardWithContext(Leaderboard leaderboard, HasLeaderboardGroupContext leaderboardGroupContext, PolarDataService polarDataService) {
|
||||
public LeaderboardWithContext(Leaderboard leaderboard, HasLeaderboardGroupContext leaderboardGroupContext) {
|
||||
this.leaderboard = leaderboard;
|
||||
this.leaderboardGroupContext = leaderboardGroupContext;
|
||||
this.polarDataService = polarDataService;
|
||||
}
|
||||
|
||||
public HasLeaderboardGroupContext getLeaderboardGroupContext() {
|
||||
@@ -31,11 +28,6 @@ public class LeaderboardWithContext implements HasLeaderboardContext {
|
||||
return getLeaderboard().getBoatClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PolarDataService getPolarDataService() {
|
||||
return polarDataService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return getLeaderboard().getName();
|
||||
|
||||
+49
-22
@@ -1,5 +1,9 @@
|
||||
package com.sap.sailing.datamining.impl.data;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.sap.sailing.datamining.Activator;
|
||||
@@ -25,9 +29,12 @@ import com.sap.sailing.domain.tracking.TrackedLegOfCompetitor;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.WindPositionMode;
|
||||
import com.sap.sse.common.Distance;
|
||||
import com.sap.sse.common.Duration;
|
||||
import com.sap.sse.common.Speed;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
import com.sap.sse.common.impl.MillisecondsDurationImpl;
|
||||
import com.sap.sse.common.impl.MillisecondsTimePoint;
|
||||
import com.sap.sse.datamining.data.Cluster;
|
||||
import com.sap.sse.datamining.shared.impl.dto.ClusterDTO;
|
||||
@@ -240,50 +247,56 @@ public class RaceOfCompetitorWithContext implements HasRaceOfCompetitorContext {
|
||||
|
||||
@Override
|
||||
public int getNumberOfManeuvers() {
|
||||
return getNumberOfTacks() + getNumberOfJibes();
|
||||
Set<ManeuverType> maneuverTypes = new HashSet<>();
|
||||
maneuverTypes.add(ManeuverType.TACK);
|
||||
maneuverTypes.add(ManeuverType.JIBE);
|
||||
return getNumberOf(maneuverTypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfTacks() {
|
||||
return getNumberOf(ManeuverType.TACK);
|
||||
return getNumberOf(Collections.singleton(ManeuverType.TACK));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfJibes() {
|
||||
return getNumberOf(ManeuverType.JIBE);
|
||||
return getNumberOf(Collections.singleton(ManeuverType.JIBE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfPenaltyCircles() {
|
||||
return getNumberOf(ManeuverType.PENALTY_CIRCLE);
|
||||
return getNumberOf(Collections.singleton(ManeuverType.PENALTY_CIRCLE));
|
||||
}
|
||||
|
||||
private int getNumberOf(ManeuverType maneuverType) {
|
||||
private int getNumberOf(Set<ManeuverType> maneuverTypes) {
|
||||
int number = 0;
|
||||
TrackedRace trackedRace = getTrackedRace();
|
||||
if (trackedRace != null) {
|
||||
TimePoint from = null;
|
||||
TimePoint to = null;
|
||||
Competitor competitor = getCompetitor();
|
||||
Course course = trackedRace.getRace().getCourse();
|
||||
Waypoint startWaypoint = course.getFirstWaypoint();
|
||||
MarkPassing startPassing = trackedRace.getMarkPassing(getCompetitor(), startWaypoint);
|
||||
TimePoint start = startPassing != null ? startPassing.getTimePoint() : trackedRace.getStartOfRace();
|
||||
List<Waypoint> waypoints = Util.createList(course.getWaypoints());
|
||||
|
||||
Waypoint finishWaypoint = course.getLastWaypoint();
|
||||
MarkPassing finishPassing = trackedRace.getMarkPassing(getCompetitor(), finishWaypoint);
|
||||
TimePoint end;
|
||||
if (finishPassing != null) {
|
||||
end = finishPassing.getTimePoint();
|
||||
} else {
|
||||
end = trackedRace.getEndOfRace();
|
||||
if (end == null) {
|
||||
TimePoint endOfTracking = trackedRace.getEndOfTracking();
|
||||
TimePoint now = MillisecondsTimePoint.now();
|
||||
end = endOfTracking != null && endOfTracking.before(now) ? endOfTracking : now;
|
||||
int fromIndex = 0;
|
||||
while (fromIndex < waypoints.size()) {
|
||||
MarkPassing markPassing = trackedRace.getMarkPassing(competitor, waypoints.get(fromIndex));
|
||||
TimePoint passingTime = markPassing != null ? markPassing.getTimePoint() : null;
|
||||
if (passingTime != null) {
|
||||
if (from == null) {
|
||||
from = passingTime;
|
||||
} else {
|
||||
to = passingTime;
|
||||
}
|
||||
}
|
||||
fromIndex++;
|
||||
}
|
||||
|
||||
for (Maneuver maneuver : trackedRace.getManeuvers(getCompetitor(), start, end, false)) {
|
||||
if (maneuver.getType() == maneuverType) {
|
||||
number++;
|
||||
if (from != null && to != null) {
|
||||
for (Maneuver maneuver : trackedRace.getManeuvers(getCompetitor(), from, to, false)) {
|
||||
if (maneuverTypes.contains(maneuver.getType())) {
|
||||
number++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -346,4 +359,18 @@ public class RaceOfCompetitorWithContext implements HasRaceOfCompetitorContext {
|
||||
return distance / length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Duration getDuration() {
|
||||
Duration duration = null;
|
||||
TrackedRace race = getTrackedRace();
|
||||
Course course = race.getRace().getCourse();
|
||||
MarkPassing startPassing = race.getMarkPassing(competitor, course.getFirstWaypoint());
|
||||
MarkPassing finishPassing = race.getMarkPassing(competitor, course.getLastWaypoint());
|
||||
if (startPassing != null && finishPassing != null) {
|
||||
long durationMillis = finishPassing.getTimePoint().asMillis() - startPassing.getTimePoint().asMillis();
|
||||
duration = new MillisecondsDurationImpl(durationMillis);
|
||||
}
|
||||
return duration;
|
||||
}
|
||||
|
||||
}
|
||||
+22
@@ -17,8 +17,10 @@ import com.sap.sailing.domain.common.tracking.GPSFixMoving;
|
||||
import com.sap.sailing.domain.tracking.GPSFixTrack;
|
||||
import com.sap.sailing.domain.tracking.LineDetails;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sse.common.Duration;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.impl.MillisecondsDurationImpl;
|
||||
import com.sap.sse.common.impl.MillisecondsTimePoint;
|
||||
|
||||
public class TrackedRaceWithContext implements HasTrackedRaceContext {
|
||||
@@ -113,6 +115,26 @@ public class TrackedRaceWithContext implements HasTrackedRaceContext {
|
||||
public Boolean isTracked() {
|
||||
return getTrackedRace().hasStarted(MillisecondsTimePoint.now());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Duration getDuration() {
|
||||
Duration duration = null;
|
||||
TrackedRace race = getTrackedRace();
|
||||
TimePoint start = race.getStartOfRace();
|
||||
if (start == null) {
|
||||
start = race.getStartOfTracking();
|
||||
}
|
||||
if (start != null) {
|
||||
TimePoint end = race.getEndOfRace();
|
||||
if (end == null) {
|
||||
end = race.getEndOfTracking();
|
||||
}
|
||||
if (end != null) {
|
||||
duration = new MillisecondsDurationImpl(end.asMillis() - start.asMillis());
|
||||
}
|
||||
}
|
||||
return duration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfCompetitorFixes() {
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<name>com.gwtplugins.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
@@ -34,6 +34,6 @@
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+1
@@ -18,6 +18,7 @@ public class BasicRaceDTO extends NamedDTO {
|
||||
|
||||
public Date startOfRace;
|
||||
public Date endOfRace;
|
||||
public Date raceFinishedTime;
|
||||
public TrackedRaceDTO trackedRace;
|
||||
|
||||
public BasicRaceDTO() {} // for GWT serialization only
|
||||
|
||||
-4
@@ -55,10 +55,6 @@ public class RaceStateImpl extends ReadonlyRaceStateImpl implements RaceState {
|
||||
|
||||
private final AbstractLogEventAuthor author;
|
||||
|
||||
public static ReadonlyRaceState create(RaceLogResolver raceLogResolver, RaceLog raceLog) {
|
||||
return create(raceLogResolver, raceLog, /* forRaceLogIdentifier */ null, Collections.<SimpleRaceLogIdentifier, ReadonlyRaceState>emptyMap());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link RaceState} with the initial racing procedure type set to a fallback value and an empty configuration.
|
||||
*/
|
||||
|
||||
+32
-2
@@ -44,6 +44,7 @@ import com.sap.sailing.domain.common.racelog.RacingProcedureType;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.TimeRange;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.util.WeakIdentityHashMap;
|
||||
|
||||
/**
|
||||
* Implementation of {@link ReadonlyRaceState}. Use the static factory methods to instantiate your race state.
|
||||
@@ -55,8 +56,37 @@ import com.sap.sse.common.Util;
|
||||
* See {@link ReadonlyRaceStateImpl#update()} for the core of the algorithm.
|
||||
*/
|
||||
public class ReadonlyRaceStateImpl implements ReadonlyRaceState, RaceLogChangedListener {
|
||||
|
||||
public static ReadonlyRaceState create(RaceLogResolver raceLogResolver, RaceLog raceLog) {
|
||||
private static final WeakIdentityHashMap<RaceLog, WeakIdentityHashMap<RaceLogResolver, ReadonlyRaceState>> raceStateCache =
|
||||
new WeakIdentityHashMap<>();
|
||||
|
||||
/**
|
||||
* Obtains a race state for the combination of {@code raceLog} and {@code raceLogResolver}. The result is
|
||||
* cache using weak references to the race log and the race log resolver for quick retrieval upon equal
|
||||
* requests, saving memory, saving listeners and thereby avoiding more synchronization issues.
|
||||
*
|
||||
* See also bug4704.
|
||||
*/
|
||||
public static ReadonlyRaceState getOrCreate(RaceLogResolver raceLogResolver, RaceLog raceLog) {
|
||||
WeakIdentityHashMap<RaceLogResolver, ReadonlyRaceState> raceStatesForRaceLog;
|
||||
ReadonlyRaceState result = null;
|
||||
synchronized (raceStateCache) {
|
||||
raceStatesForRaceLog = raceStateCache.get(raceLog);
|
||||
if (raceStatesForRaceLog == null) {
|
||||
raceStatesForRaceLog = new WeakIdentityHashMap<>();
|
||||
raceStateCache.put(raceLog, raceStatesForRaceLog);
|
||||
} else {
|
||||
result = raceStatesForRaceLog.get(raceLogResolver);
|
||||
}
|
||||
if (result == null) {
|
||||
result = createInternal(raceLogResolver, raceLog);
|
||||
raceStatesForRaceLog.put(raceLogResolver, result);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static final ReadonlyRaceState createInternal(RaceLogResolver raceLogResolver, RaceLog raceLog) {
|
||||
return create(raceLogResolver, raceLog, /* forRaceLogIdentifier */null,
|
||||
Collections.<SimpleRaceLogIdentifier, ReadonlyRaceState> emptyMap());
|
||||
}
|
||||
|
||||
+2
-1
@@ -2,7 +2,8 @@ package com.sap.sailing.domain.swisstimingadapter.persistence.impl;
|
||||
|
||||
public enum FieldNames {
|
||||
// SwissTiming configuration parameters:
|
||||
ST_CONFIG_NAME, ST_CONFIG_HOSTNAME, ST_CONFIG_PORT, ST_CONFIG_JSON_URL, ST_ARCHIVE_JSON_URL,
|
||||
ST_CONFIG_NAME, ST_CONFIG_HOSTNAME, ST_CONFIG_PORT, ST_CONFIG_JSON_URL, ST_CONFIG_UPDATE_URL,
|
||||
ST_CONFIG_UPDATE_USERNAME, ST_CONFIG_UPDATE_PASSWORD, ST_ARCHIVE_JSON_URL,
|
||||
|
||||
// last message count field:
|
||||
LAST_MESSAGE_COUNT,
|
||||
|
||||
+9
-4
@@ -37,8 +37,8 @@ public class SwissTimingAdapterPersistenceImpl implements SwissTimingAdapterPers
|
||||
DBCollection stConfigs = database.getCollection(CollectionNames.SWISSTIMING_CONFIGURATIONS.name());
|
||||
for (DBObject o : stConfigs.find()) {
|
||||
SwissTimingConfiguration stConfig = loadSwissTimingConfiguration(o);
|
||||
// the old swisstiming config was not based on a json URL -> ignore such configs
|
||||
if(stConfig.getJsonURL() != null) {
|
||||
// the old SwissTiming configuration was not based on a JSON URL -> ignore such configurations
|
||||
if (stConfig.getJsonURL() != null) {
|
||||
result.add(stConfig);
|
||||
}
|
||||
}
|
||||
@@ -57,8 +57,10 @@ public class SwissTimingAdapterPersistenceImpl implements SwissTimingAdapterPers
|
||||
String jsonURL = (String) object.get(FieldNames.ST_CONFIG_JSON_URL.name());
|
||||
String hostname = (String) object.get(FieldNames.ST_CONFIG_HOSTNAME.name());
|
||||
Integer port = (Integer) object.get(FieldNames.ST_CONFIG_PORT.name());
|
||||
|
||||
return swissTimingFactory.createSwissTimingConfiguration(name, jsonURL, hostname, port);
|
||||
String updateURL = (String) object.get(FieldNames.ST_CONFIG_UPDATE_URL.name());
|
||||
String updateUsername = (String) object.get(FieldNames.ST_CONFIG_UPDATE_USERNAME.name());
|
||||
String updatePassword = (String) object.get(FieldNames.ST_CONFIG_UPDATE_PASSWORD.name());
|
||||
return swissTimingFactory.createSwissTimingConfiguration(name, jsonURL, hostname, port, updateURL, updateUsername, updatePassword);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,6 +98,9 @@ public class SwissTimingAdapterPersistenceImpl implements SwissTimingAdapterPers
|
||||
result.put(FieldNames.ST_CONFIG_JSON_URL.name(), swissTimingConfiguration.getJsonURL());
|
||||
result.put(FieldNames.ST_CONFIG_HOSTNAME.name(), swissTimingConfiguration.getHostname());
|
||||
result.put(FieldNames.ST_CONFIG_PORT.name(), swissTimingConfiguration.getPort());
|
||||
result.put(FieldNames.ST_CONFIG_UPDATE_URL.name(), swissTimingConfiguration.getUpdateURL());
|
||||
result.put(FieldNames.ST_CONFIG_UPDATE_USERNAME.name(), swissTimingConfiguration.getUpdateUsername());
|
||||
result.put(FieldNames.ST_CONFIG_UPDATE_PASSWORD.name(), swissTimingConfiguration.getUpdatePassword());
|
||||
|
||||
stConfigCollection.insert(result);
|
||||
}
|
||||
|
||||
+10
-1
@@ -54,6 +54,9 @@ public class SwissTimingConnectivityParamsHandler extends AbstractRaceTrackingCo
|
||||
private static final String PORT = "port";
|
||||
private static final String BOAT_CLASS_NAME = "boatClassName";
|
||||
private static final String HOSTNAME = "hostname";
|
||||
private static final String UPDATE_URL = "updateURL";
|
||||
private static final String UPDATE_USERNAME = "updateUsername";
|
||||
private static final String UPDATE_PASSWORD = "updatePassword";
|
||||
private final RaceLogStore raceLogStore;
|
||||
private final RegattaLogStore regattaLogStore;
|
||||
private final DomainFactory domainFactory;
|
||||
@@ -78,6 +81,9 @@ public class SwissTimingConnectivityParamsHandler extends AbstractRaceTrackingCo
|
||||
result.put(START_LIST, createStartListDBObject(stParams));
|
||||
result.put(DELAY_TO_LIVE_IN_MILLIS, stParams.getDelayToLiveInMillis());
|
||||
result.put(USE_INTERNAL_MARK_PASSING_ALGORITHM, stParams.isUseInternalMarkPassingAlgorithm());
|
||||
result.put(UPDATE_URL, stParams.getUpdateURL());
|
||||
result.put(UPDATE_USERNAME, stParams.getUpdateUsername());
|
||||
result.put(UPDATE_PASSWORD, stParams.getUpdatePassword());
|
||||
addWindTrackingParameters(stParams, result);
|
||||
return result;
|
||||
}
|
||||
@@ -175,7 +181,10 @@ public class SwissTimingConnectivityParamsHandler extends AbstractRaceTrackingCo
|
||||
map.get(START_LIST) == null ? null : createStartListFromDBObject((String) map.get(RACE_ID), (BasicDBList) map.get(START_LIST)),
|
||||
((Number) map.get(DELAY_TO_LIVE_IN_MILLIS)).longValue(),
|
||||
swissTimingFactory, domainFactory, raceLogStore, regattaLogStore,
|
||||
(boolean) map.get(USE_INTERNAL_MARK_PASSING_ALGORITHM), isTrackWind(map), isCorrectWindDirectionByMagneticDeclination(map));
|
||||
(boolean) map.get(USE_INTERNAL_MARK_PASSING_ALGORITHM), isTrackWind(map), isCorrectWindDirectionByMagneticDeclination(map),
|
||||
(String) map.get(UPDATE_URL),
|
||||
(String) map.get(UPDATE_USERNAME),
|
||||
(String) map.get(UPDATE_PASSWORD));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+10
-1
@@ -1,6 +1,7 @@
|
||||
package com.sap.sailing.domain.swisstimingadapter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -18,6 +19,7 @@ import com.sap.sailing.domain.common.tracking.GPSFixMoving;
|
||||
import com.sap.sailing.domain.racelog.RaceLogStore;
|
||||
import com.sap.sailing.domain.regattalog.RegattaLogStore;
|
||||
import com.sap.sailing.domain.swisstimingadapter.impl.DomainFactoryImpl;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.RaceTrackingConnectivityParameters;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
@@ -70,10 +72,17 @@ public interface DomainFactory {
|
||||
RaceTrackingConnectivityParameters createTrackingConnectivityParameters(String hostname, int port, String raceID,
|
||||
String raceName, String raceDescription, BoatClass boatClass, StartList startList,
|
||||
long delayToLiveInMillis, SwissTimingFactory swissTimingFactory, DomainFactory domainFactory,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination);
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination, String updateURL, String updateUsername, String updatePassword);
|
||||
|
||||
ControlPoint getOrCreateControlPoint(String description, Iterable<Serializable> deviceIds, MarkType markType);
|
||||
|
||||
RaceDefinition createRaceDefinition(Regatta regatta, String swissTimingRaceID, Map<Competitor, Boat> competitorsAndBoats,
|
||||
List<ControlPoint> courseDefinition, String raceName, String raceIdForRaceDefinition);
|
||||
|
||||
/**
|
||||
* Adds update handlers that forward events about a race, such as start time changes, course changes
|
||||
* or postponents, to an update URL using specific REST requests.
|
||||
*/
|
||||
void addUpdateHandlers(String updateURL, String username, String password, Serializable eventId,
|
||||
RaceDefinition raceDefinition, DynamicTrackedRace trackedRace) throws URISyntaxException;
|
||||
}
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
package com.sap.sailing.domain.swisstimingadapter;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,9 +17,9 @@ public interface SailMasterListener {
|
||||
|
||||
void receivedClockAtMark(String raceID, List<Util.Triple<Integer, TimePoint, String>> markIndicesTimePointsAndBoatIDs);
|
||||
|
||||
void receivedStartList(String raceID, StartList startList);
|
||||
void receivedStartList(String raceID, StartList startList) throws URISyntaxException;
|
||||
|
||||
void receivedCourseConfiguration(String raceID, Course course);
|
||||
void receivedCourseConfiguration(String raceID, Course course) throws URISyntaxException;
|
||||
|
||||
void receivedAvailableRaces(Iterable<Race> races);
|
||||
|
||||
|
||||
+1
-3
@@ -26,12 +26,10 @@ public interface SwissTimingAdapter {
|
||||
* is specified, a regatta lookup is performed with that identifier; if the regatta is found, it is used
|
||||
* to add the races to. Otherwise, a default regatta as described above will be created and used.
|
||||
* @param useInternalMarkPassingAlgorithm use our own instead of the SwissTiming-provided mark passing / split times
|
||||
* @param trackWind TODO
|
||||
* @param correctWindDirectionByMagneticDeclination TODO
|
||||
*/
|
||||
RaceHandle addSwissTimingRace(TrackerManager trackerManager, RegattaIdentifier regattaToAddTo, String raceID,
|
||||
String raceName, String raceDescription, BoatClass boatClass, String hostname, int port,
|
||||
StartList startList, RaceLogStore logStore, RegattaLogStore regattaLogStore, long timeoutInMilliseconds, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination)
|
||||
StartList startList, RaceLogStore logStore, RegattaLogStore regattaLogStore, long timeoutInMilliseconds, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination, String updateURL, String updateUsername, String updatePassword)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException, Exception;
|
||||
|
||||
StartList readStartListForRace(String raceId, RegattaResults regattaResults);
|
||||
|
||||
+6
@@ -14,4 +14,10 @@ public interface SwissTimingConfiguration {
|
||||
String getHostname();
|
||||
|
||||
Integer getPort();
|
||||
|
||||
String getUpdateURL();
|
||||
|
||||
String getUpdateUsername();
|
||||
|
||||
String getUpdatePassword();
|
||||
}
|
||||
+6
-12
@@ -49,20 +49,14 @@ public interface SwissTimingFactory {
|
||||
|
||||
SailMasterTransceiver createSailMasterTransceiver();
|
||||
|
||||
SwissTimingConfiguration createSwissTimingConfiguration(String name, String jsonURL, String hostname, Integer port);
|
||||
SwissTimingConfiguration createSwissTimingConfiguration(String name, String jsonURL, String hostname, Integer port, String updateURL, String updateUsername, String updatePassword);
|
||||
|
||||
SwissTimingRaceTracker createRaceTracker(String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, WindStore windStore,
|
||||
boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, SwissTimingTrackingConnectivityParameters connectivityParams) throws InterruptedException, UnknownHostException,
|
||||
IOException, ParseException;
|
||||
SwissTimingRaceTracker createRaceTracker(RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, WindStore windStore,
|
||||
DomainFactory domainFactory, TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException;
|
||||
|
||||
RaceTracker createRaceTracker(Regatta regatta, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
WindStore windStore, boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
RaceTracker createRaceTracker(Regatta regatta, WindStore windStore, DomainFactory domainFactory, TrackedRegattaRegistry trackedRegattaRegistry,
|
||||
RaceLogResolver raceLogResolver, RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws UnknownHostException, InterruptedException, IOException, ParseException;
|
||||
|
||||
Race createRace(String raceId, String raceName, String description, BoatClass boatClass);
|
||||
|
||||
+29
-2
@@ -1,6 +1,8 @@
|
||||
package com.sap.sailing.domain.swisstimingadapter.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
@@ -50,9 +52,14 @@ import com.sap.sailing.domain.swisstimingadapter.RaceType;
|
||||
import com.sap.sailing.domain.swisstimingadapter.RaceType.OlympicRaceCode;
|
||||
import com.sap.sailing.domain.swisstimingadapter.StartList;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SwissTimingFactory;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.RaceTrackingConnectivityParameters;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.domain.tracking.impl.CourseDesignUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.FinishTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.RaceAbortedHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.StartTimeUpdateHandler;
|
||||
import com.sap.sse.common.Named;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util;
|
||||
@@ -402,9 +409,29 @@ public class DomainFactoryImpl implements DomainFactory {
|
||||
String raceID, String raceName, String raceDescription, BoatClass boatClass, StartList startList,
|
||||
long delayToLiveInMillis, SwissTimingFactory swissTimingFactory, DomainFactory domainFactory,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm,
|
||||
boolean trackWind, boolean correctWindDirectionByMagneticDeclination) {
|
||||
boolean trackWind, boolean correctWindDirectionByMagneticDeclination, String updateURL,
|
||||
String updateUsername, String updatePassword) {
|
||||
return new SwissTimingTrackingConnectivityParameters(hostname, port, raceID, raceName, raceDescription,
|
||||
boatClass, startList, delayToLiveInMillis, swissTimingFactory, domainFactory, raceLogStore,
|
||||
regattaLogStore, useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination);
|
||||
regattaLogStore, useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination,
|
||||
updateURL, updateUsername, updatePassword);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addUpdateHandlers(String updateURL, String username, String password, Serializable eventId,
|
||||
RaceDefinition raceDefinition, DynamicTrackedRace trackedRace) throws URISyntaxException {
|
||||
final URI updateURI = new URI(updateURL);
|
||||
CourseDesignUpdateHandler courseDesignHandler = new CourseDesignUpdateHandler(
|
||||
updateURI, username, password, eventId, raceDefinition.getId());
|
||||
StartTimeUpdateHandler startTimeHandler = new StartTimeUpdateHandler(
|
||||
updateURI, username, password, eventId,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta());
|
||||
RaceAbortedHandler raceAbortedHandler = new RaceAbortedHandler(
|
||||
updateURI, username, password, eventId,
|
||||
raceDefinition.getId());
|
||||
final FinishTimeUpdateHandler finishTimeUpdateHandler = new FinishTimeUpdateHandler(updateURI, username, password, eventId,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta());
|
||||
baseDomainFactory.addUpdateHandlers(trackedRace, courseDesignHandler, startTimeHandler, raceAbortedHandler,
|
||||
finishTimeUpdateHandler);
|
||||
}
|
||||
}
|
||||
+5
-4
@@ -69,12 +69,13 @@ public class SwissTimingAdapterImpl implements SwissTimingAdapter {
|
||||
public RaceHandle addSwissTimingRace(TrackerManager trackerManager, RegattaIdentifier regattaToAddTo, String raceID,
|
||||
String raceName, String raceDescription, BoatClass boatClass, String hostname, int port,
|
||||
StartList startList, RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, long timeoutInMilliseconds,
|
||||
boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination) throws Exception {
|
||||
boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination,
|
||||
String updateURL, String updateUsername, String updatePassword) throws Exception {
|
||||
return trackerManager.addRace(regattaToAddTo,
|
||||
swissTimingDomainFactory.createTrackingConnectivityParameters(hostname, port, raceID, raceName,
|
||||
raceDescription, boatClass, startList, DEFAULT_SWISSTIMING_LIVE_DELAY_IN_MILLISECONDS,
|
||||
swissTimingFactory, swissTimingDomainFactory, raceLogStore, regattaLogStore,
|
||||
useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination),
|
||||
useInternalMarkPassingAlgorithm, trackWind, correctWindDirectionByMagneticDeclination, updateURL, updateUsername, updatePassword),
|
||||
timeoutInMilliseconds);
|
||||
}
|
||||
|
||||
@@ -118,9 +119,9 @@ public class SwissTimingAdapterImpl implements SwissTimingAdapter {
|
||||
Person person = persons.get(crewMember.getPersonID());
|
||||
crew.add(new CrewMemberImpl(
|
||||
person.getGivenName() + " " + person.getFamilyName(),
|
||||
person.getNOC().name(), crewMember.getPosition().name()));
|
||||
(person.getNOC()==null)?null:(person.getNOC().name()), crewMember.getPosition().name()));
|
||||
}
|
||||
String nationality = team.getNOC().name();
|
||||
String nationality = team.getNOC()==null?null:team.getNOC().name();
|
||||
CompetitorWithID competitor = new CompetitorWithID(team.getTeamID(),
|
||||
boat.getSailNumber(), nationality, team.getTeamName(), crew);
|
||||
competitors.add(competitor);
|
||||
|
||||
+18
-1
@@ -7,13 +7,19 @@ public class SwissTimingConfigurationImpl implements SwissTimingConfiguration {
|
||||
private final String jsonURL;
|
||||
private final String hostname;
|
||||
private final Integer port;
|
||||
private final String updateURL;
|
||||
private final String updateUsername;
|
||||
private final String updatePassword;
|
||||
|
||||
public SwissTimingConfigurationImpl(String name, String jsonURL, String hostname, Integer port) {
|
||||
public SwissTimingConfigurationImpl(String name, String jsonURL, String hostname, Integer port, String updateURL, String updateUsername, String updatePassword) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.jsonURL = jsonURL;
|
||||
this.hostname = hostname;
|
||||
this.port = port;
|
||||
this.updateURL = updateURL;
|
||||
this.updateUsername = updateUsername;
|
||||
this.updatePassword = updatePassword;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,4 +42,15 @@ public class SwissTimingConfigurationImpl implements SwissTimingConfiguration {
|
||||
return port;
|
||||
}
|
||||
|
||||
public String getUpdateURL() {
|
||||
return updateURL;
|
||||
}
|
||||
|
||||
public String getUpdateUsername() {
|
||||
return updateUsername;
|
||||
}
|
||||
|
||||
public String getUpdatePassword() {
|
||||
return updatePassword;
|
||||
}
|
||||
}
|
||||
+11
-17
@@ -17,7 +17,6 @@ import com.sap.sailing.domain.swisstimingadapter.Race;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SailMasterConnector;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SailMasterMessage;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SailMasterTransceiver;
|
||||
import com.sap.sailing.domain.swisstimingadapter.StartList;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SwissTimingArchiveConfiguration;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SwissTimingConfiguration;
|
||||
import com.sap.sailing.domain.swisstimingadapter.SwissTimingFactory;
|
||||
@@ -83,32 +82,27 @@ public class SwissTimingFactoryImpl implements SwissTimingFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwissTimingConfiguration createSwissTimingConfiguration(String name, String jsonURL, String hostname, Integer port) {
|
||||
return new SwissTimingConfigurationImpl(name, jsonURL, hostname, port);
|
||||
public SwissTimingConfiguration createSwissTimingConfiguration(String name, String jsonURL, String hostname,
|
||||
Integer port, String updateURL, String updateUsername, String updatePassword) {
|
||||
return new SwissTimingConfigurationImpl(name, jsonURL, hostname, port, updateURL, updateUsername, updatePassword);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwissTimingRaceTracker createRaceTracker(String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, WindStore windStore,
|
||||
boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
public SwissTimingRaceTracker createRaceTracker(RaceLogStore raceLogStore, RegattaLogStore regattaLogStore,
|
||||
WindStore windStore, DomainFactory domainFactory, TrackedRegattaRegistry trackedRegattaRegistry,
|
||||
RaceLogResolver raceLogResolver, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException {
|
||||
return new SwissTimingRaceTrackerImpl(raceID, raceName, raceDescription, boatClass, hostname, port, startList,
|
||||
raceLogStore, regattaLogStore, windStore, domainFactory, this,
|
||||
trackedRegattaRegistry, raceLogResolver, delayToLiveInMillis, useInternalMarkPassingAlgorithm, connectivityParams);
|
||||
return new SwissTimingRaceTrackerImpl(raceLogStore, regattaLogStore, windStore, domainFactory, this,
|
||||
trackedRegattaRegistry, raceLogResolver, connectivityParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceTracker createRaceTracker(Regatta regatta, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
WindStore windStore, boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
public RaceTracker createRaceTracker(Regatta regatta, WindStore windStore, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws UnknownHostException, InterruptedException, IOException, ParseException {
|
||||
return new SwissTimingRaceTrackerImpl(regatta, raceID, raceName, raceDescription, boatClass, hostname, port,
|
||||
startList, windStore, domainFactory, this, trackedRegattaRegistry, raceLogStore, regattaLogStore,
|
||||
raceLogResolver, delayToLiveInMillis, useInternalMarkPassingAlgorithm, connectivityParams);
|
||||
return new SwissTimingRaceTrackerImpl(regatta, windStore, domainFactory, this, trackedRegattaRegistry,
|
||||
raceLogStore, regattaLogStore, raceLogResolver, connectivityParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+52
-28
@@ -3,6 +3,7 @@ package com.sap.sailing.domain.swisstimingadapter.impl;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.text.ParseException;
|
||||
import java.util.Collection;
|
||||
@@ -63,6 +64,7 @@ import com.sap.sailing.domain.tracking.TrackingDataLoader;
|
||||
import com.sap.sailing.domain.tracking.WindStore;
|
||||
import com.sap.sailing.domain.tracking.WindTrack;
|
||||
import com.sap.sailing.domain.tracking.impl.TrackedRaceStatusImpl;
|
||||
import com.sap.sailing.domain.tracking.impl.UpdateHandler;
|
||||
import com.sap.sse.common.Distance;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util;
|
||||
@@ -110,23 +112,30 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
private final TMDMessageQueue tmdMessageQueue;
|
||||
|
||||
private final RaceLogResolver raceLogResolver;
|
||||
|
||||
/**
|
||||
* If set to a non-{@code null}, non-{@link String#isEmpty() empty} value, updates about start time changes, course
|
||||
* changes, etc. will be sent as REST requests to this URL, using the {@link #updateUsername} /
|
||||
* {@link #updatePassword} as credentials.
|
||||
*/
|
||||
private final String updateURL;
|
||||
|
||||
private final String updateUsername;
|
||||
|
||||
private final String updatePassword;
|
||||
|
||||
protected SwissTimingRaceTrackerImpl(String raceID, String raceName, String raceDescription, BoatClass boatClass,
|
||||
String hostname, int port, StartList startList, RaceLogStore raceLogStore, RegattaLogStore regattaLogStore,
|
||||
protected SwissTimingRaceTrackerImpl(RaceLogStore raceLogStore, RegattaLogStore regattaLogStore,
|
||||
WindStore windStore, DomainFactory domainFactory, SwissTimingFactory factory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, long delayToLiveInMillis,
|
||||
boolean useInternalMarkPassingAlgorithm, SwissTimingTrackingConnectivityParameters connectivityParams) throws InterruptedException,
|
||||
UnknownHostException, IOException, ParseException {
|
||||
this(/* regatta */ null, raceID, raceName, raceDescription, boatClass, hostname, port, startList, windStore,
|
||||
domainFactory, factory, trackedRegattaRegistry, raceLogStore, regattaLogStore, raceLogResolver,
|
||||
delayToLiveInMillis, useInternalMarkPassingAlgorithm, connectivityParams);
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver,
|
||||
SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException {
|
||||
this(/* regatta */ null, windStore, domainFactory, factory, trackedRegattaRegistry, raceLogStore, regattaLogStore, raceLogResolver, connectivityParams);
|
||||
}
|
||||
|
||||
protected SwissTimingRaceTrackerImpl(Regatta regatta, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, WindStore windStore,
|
||||
DomainFactory domainFactory, SwissTimingFactory factory, TrackedRegattaRegistry trackedRegattaRegistry,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, RaceLogResolver raceLogResolver,
|
||||
long delayToLiveInMillis, boolean useInternalMarkPassingAlgorithm, SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
protected SwissTimingRaceTrackerImpl(Regatta regatta, WindStore windStore, DomainFactory domainFactory,
|
||||
SwissTimingFactory factory, TrackedRegattaRegistry trackedRegattaRegistry, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore, RaceLogResolver raceLogResolver,
|
||||
SwissTimingTrackingConnectivityParameters connectivityParams)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException {
|
||||
super(connectivityParams);
|
||||
this.raceLogResolver = raceLogResolver;
|
||||
@@ -134,29 +143,33 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
final Regatta effectiveRegatta;
|
||||
// Try to find a pre-associated event based on the Race ID
|
||||
if (regatta == null) {
|
||||
effectiveRegatta = trackedRegattaRegistry.getRememberedRegattaForRace(raceID);
|
||||
effectiveRegatta = trackedRegattaRegistry.getRememberedRegattaForRace(connectivityParams.getRaceID());
|
||||
} else {
|
||||
effectiveRegatta = regatta;
|
||||
}
|
||||
// if regatta is still null, no previous assignment of any of the races in this TracTrac event to a Regatta was
|
||||
// found; in this case, create a default regatta based on the TracTrac event data
|
||||
this.regatta = effectiveRegatta == null ? domainFactory.getOrCreateDefaultRegatta(raceLogStore, regattaLogStore,
|
||||
raceID, boatClass, trackedRegattaRegistry) : effectiveRegatta;
|
||||
this.connector = factory.getOrCreateSailMasterConnector(hostname, port, raceID, raceName, raceDescription, boatClass);
|
||||
connectivityParams.getRaceID(), connectivityParams.getBoatClass(), trackedRegattaRegistry) : effectiveRegatta;
|
||||
this.connector = factory.getOrCreateSailMasterConnector(connectivityParams.getHostname(), connectivityParams.getPort(),
|
||||
connectivityParams.getRaceID(), connectivityParams.getRaceName(), connectivityParams.getRaceDescription(), connectivityParams.getBoatClass());
|
||||
this.domainFactory = domainFactory;
|
||||
this.raceID = raceID;
|
||||
this.raceName = raceName;
|
||||
this.startList = startList;
|
||||
this.startListFromManage2Sail = startList != null;
|
||||
this.raceDescription = raceDescription;
|
||||
this.boatClass = boatClass;
|
||||
this.raceID = connectivityParams.getRaceID();
|
||||
this.raceName = connectivityParams.getRaceName();
|
||||
this.startList = connectivityParams.getStartList();
|
||||
this.startListFromManage2Sail = connectivityParams.getStartList() != null;
|
||||
this.raceDescription = connectivityParams.getRaceDescription();
|
||||
this.boatClass = connectivityParams.getBoatClass();
|
||||
this.windStore = windStore;
|
||||
this.id = createID(raceID, hostname, port);
|
||||
this.id = createID(connectivityParams.getRaceID(), connectivityParams.getHostname(), connectivityParams.getPort());
|
||||
connector.addSailMasterListener(this);
|
||||
trackedRegatta = trackedRegattaRegistry.getOrCreateTrackedRegatta(this.regatta);
|
||||
this.delayToLiveInMillis = delayToLiveInMillis;
|
||||
this.delayToLiveInMillis = connectivityParams.getDelayToLiveInMillis();
|
||||
this.competitorsByBoatId = new HashMap<String, Competitor>();
|
||||
this.useInternalMarkPassingAlgorithm = useInternalMarkPassingAlgorithm;
|
||||
this.useInternalMarkPassingAlgorithm = connectivityParams.isUseInternalMarkPassingAlgorithm();
|
||||
this.updateURL = connectivityParams.getUpdateURL();
|
||||
this.updateUsername = connectivityParams.getUpdateUsername();
|
||||
this.updatePassword = connectivityParams.getUpdatePassword();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -406,7 +419,7 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receivedStartList(String raceID, StartList startList) {
|
||||
public void receivedStartList(String raceID, StartList startList) throws URISyntaxException {
|
||||
// ignore STL messages if the startlist has been already provided by Manage2Sail
|
||||
if (!startListFromManage2Sail && this.raceID.equals(raceID)) {
|
||||
StartList oldStartList = this.startList;
|
||||
@@ -435,7 +448,7 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
}
|
||||
}
|
||||
|
||||
private void createRaceDefinition(Course course) {
|
||||
private void createRaceDefinition(Course course) throws URISyntaxException {
|
||||
assert this.raceID.equals(raceID);
|
||||
assert startList != null;
|
||||
assert course != null;
|
||||
@@ -465,9 +478,20 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
}
|
||||
}, useInternalMarkPassingAlgorithm, raceLogResolver,
|
||||
/* Not needed because the RaceTracker is not active on a replica */ Optional.empty());
|
||||
addUpdateHandlers();
|
||||
notifyRaceCreationListeners();
|
||||
logger.info("Created SwissTiming RaceDefinition and TrackedRace for "+race.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* If a non-{@code null}, non-{@link String#isEmpty() empty} {@link #updateURL} is set, adds {@link UpdateHandler}s
|
||||
* to the race that will forward changes to the race such as start time changes or course changes to the URL as REST
|
||||
* requests.
|
||||
*/
|
||||
private void addUpdateHandlers() throws URISyntaxException {
|
||||
getDomainFactory().addUpdateHandlers(updateURL, updateUsername, updatePassword,
|
||||
/* TODO using the regatta ID as the "eventId" for now... */ regatta.getId(), trackedRace.getRace(), trackedRace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if {@link #getRegatta()} still contains the {@link RaceDefinition} obtained when calling
|
||||
@@ -481,7 +505,7 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receivedCourseConfiguration(String raceID, Course course) {
|
||||
public void receivedCourseConfiguration(String raceID, Course course) throws URISyntaxException {
|
||||
Course oldCourse = this.course;
|
||||
if (trackedRace == null) {
|
||||
if (oldCourse == null && startList != null) {
|
||||
|
||||
+24
-8
@@ -31,11 +31,15 @@ public class SwissTimingTrackingConnectivityParameters extends AbstractRaceTrack
|
||||
private final long delayToLiveInMillis;
|
||||
private final StartList startList;
|
||||
private final boolean useInternalMarkPassingAlgorithm;
|
||||
private final String updateURL;
|
||||
private final String updateUsername;
|
||||
private final String updatePassword;
|
||||
|
||||
public SwissTimingTrackingConnectivityParameters(String hostname, int port, String raceID, String raceName,
|
||||
String raceDescription, BoatClass boatClass, StartList startList, long delayToLiveInMillis,
|
||||
SwissTimingFactory swissTimingFactory, DomainFactory domainFactory, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination) {
|
||||
RegattaLogStore regattaLogStore, boolean useInternalMarkPassingAlgorithm, boolean trackWind,
|
||||
boolean correctWindDirectionByMagneticDeclination, String updateURL, String updateUsername, String updatePassword) {
|
||||
super(trackWind, correctWindDirectionByMagneticDeclination);
|
||||
this.hostname = hostname;
|
||||
this.port = port;
|
||||
@@ -50,6 +54,9 @@ public class SwissTimingTrackingConnectivityParameters extends AbstractRaceTrack
|
||||
this.raceLogStore = raceLogStore;
|
||||
this.regattaLogStore = regattaLogStore;
|
||||
this.useInternalMarkPassingAlgorithm = useInternalMarkPassingAlgorithm;
|
||||
this.updateURL = updateURL;
|
||||
this.updateUsername = updateUsername;
|
||||
this.updatePassword = updatePassword;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,18 +67,15 @@ public class SwissTimingTrackingConnectivityParameters extends AbstractRaceTrack
|
||||
@Override
|
||||
public RaceTracker createRaceTracker(TrackedRegattaRegistry trackedRegattaRegistry, WindStore windStore,
|
||||
RaceLogResolver raceLogResolver, LeaderboardGroupResolver leaderboardGroupResolver, long timeoutInMilliseconds) throws Exception {
|
||||
return swissTimingFactory.createRaceTracker(raceID, raceName, raceDescription, boatClass, hostname, port,
|
||||
startList, delayToLiveInMillis, raceLogStore, regattaLogStore, windStore,
|
||||
useInternalMarkPassingAlgorithm,
|
||||
domainFactory, trackedRegattaRegistry, raceLogResolver, this);
|
||||
return swissTimingFactory.createRaceTracker(raceLogStore, regattaLogStore, windStore, domainFactory, trackedRegattaRegistry, raceLogResolver,
|
||||
this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceTracker createRaceTracker(Regatta regatta, TrackedRegattaRegistry trackedRegattaRegistry,
|
||||
WindStore windStore, RaceLogResolver raceLogResolver, LeaderboardGroupResolver leaderboardGroupResolver, long timeoutInMilliseconds) throws Exception {
|
||||
return swissTimingFactory.createRaceTracker(regatta, raceID, raceName, raceDescription, boatClass, hostname,
|
||||
port, startList, delayToLiveInMillis, windStore, useInternalMarkPassingAlgorithm,
|
||||
domainFactory, trackedRegattaRegistry, raceLogResolver, raceLogStore, regattaLogStore, this);
|
||||
return swissTimingFactory.createRaceTracker(regatta, windStore, domainFactory, trackedRegattaRegistry, raceLogResolver, raceLogStore,
|
||||
regattaLogStore, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,6 +96,18 @@ public class SwissTimingTrackingConnectivityParameters extends AbstractRaceTrack
|
||||
return port;
|
||||
}
|
||||
|
||||
public String getUpdateURL() {
|
||||
return updateURL;
|
||||
}
|
||||
|
||||
public String getUpdateUsername() {
|
||||
return updateUsername;
|
||||
}
|
||||
|
||||
public String getUpdatePassword() {
|
||||
return updatePassword;
|
||||
}
|
||||
|
||||
public String getRaceID() {
|
||||
return raceID;
|
||||
}
|
||||
|
||||
+5
-2
@@ -130,11 +130,14 @@ public class IncrementalManeuverComputationTest extends AbstractManeuverDetectio
|
||||
performanceMeasurementStartedAt = System.currentTimeMillis();
|
||||
List<Maneuver> normallyDetectedManeuvers = normalManeuverDetector.detectManeuvers();
|
||||
long millisForNormalManeuverDetection = System.currentTimeMillis() - performanceMeasurementStartedAt;
|
||||
int performanceBenefitOfIncrementalManeuverDetectionInPercent = (int) ((1.0 * (millisForNormalManeuverDetection - millisForIncrementalManeuverDetection)
|
||||
/ millisForNormalManeuverDetection) * 100);
|
||||
assertEquals("Incrementally calculated maneuvers differ from normally calculated maneuvers",
|
||||
normallyDetectedManeuvers, incrementallyDetectedManeuvers);
|
||||
assertTrue(
|
||||
"Incremental maneuver detection was not 30% faster in detecting maneuvers incrementally, than the full maneuver detection",
|
||||
millisForIncrementalManeuverDetection * 1.3 < millisForNormalManeuverDetection);
|
||||
"Incremental maneuver detection was not 20% faster in detecting maneuvers incrementally, than the full maneuver detection. The actual performance benefit was: "
|
||||
+ performanceBenefitOfIncrementalManeuverDetectionInPercent + "%",
|
||||
performanceBenefitOfIncrementalManeuverDetectionInPercent >= 20);
|
||||
}
|
||||
|
||||
}
|
||||
+6
@@ -15,6 +15,7 @@ import com.sap.sailing.domain.tractracadapter.LoadingQueueDoneCallBack;
|
||||
import com.sap.sailing.domain.tractracadapter.Receiver;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.tractrac.model.lib.api.route.IControlRoute;
|
||||
import com.tractrac.model.lib.api.route.IPathRoute;
|
||||
import com.tractrac.subscription.lib.api.control.IControlRouteChangeListener;
|
||||
|
||||
public class RouteAssemblyTest extends AbstractTracTracLiveTest {
|
||||
@@ -66,6 +67,11 @@ public class RouteAssemblyTest extends AbstractTracTracLiveTest {
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gotRouteChange(IPathRoute pathRoute, long timeStamp) {
|
||||
// will never be invoked for sailing events
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+10
-8
@@ -14,8 +14,8 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -73,6 +73,9 @@ import com.sap.sailing.domain.tracking.TrackedRegatta;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.domain.tracking.WindStore;
|
||||
import com.sap.sailing.domain.tracking.WindTrack;
|
||||
import com.sap.sailing.domain.tracking.impl.FinishTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.RaceAbortedHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.StartTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tractracadapter.DomainFactory;
|
||||
import com.sap.sailing.domain.tractracadapter.JSONService;
|
||||
import com.sap.sailing.domain.tractracadapter.MetadataParser;
|
||||
@@ -677,17 +680,16 @@ public class DomainFactoryImpl implements DomainFactory {
|
||||
TracTracCourseDesignUpdateHandler courseDesignHandler = new TracTracCourseDesignUpdateHandler(
|
||||
tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId(), tractracRace, this);
|
||||
trackedRace.addCourseDesignChangedListener(courseDesignHandler);
|
||||
TracTracStartTimeUpdateHandler startTimeHandler = new TracTracStartTimeUpdateHandler(
|
||||
StartTimeUpdateHandler startTimeHandler = new StartTimeUpdateHandler(
|
||||
tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta());
|
||||
trackedRace.addStartTimeChangedListener(startTimeHandler);
|
||||
TracTracRaceAbortedHandler raceAbortedHandler = new TracTracRaceAbortedHandler(
|
||||
RaceAbortedHandler raceAbortedHandler = new RaceAbortedHandler(
|
||||
tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId());
|
||||
trackedRace.addRaceAbortedListener(raceAbortedHandler);
|
||||
trackedRace.addListener(new TracTracFinishTimeUpdateHandler(tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta()).getListener());
|
||||
final FinishTimeUpdateHandler finishTimeUpdateHandler = new FinishTimeUpdateHandler(tracTracUpdateURI, tracTracUsername, tracTracPassword, tracTracEventUuid,
|
||||
raceDefinition.getId(), trackedRace.getTrackedRegatta().getRegatta());
|
||||
baseDomainFactory.addUpdateHandlers(trackedRace, courseDesignHandler, startTimeHandler, raceAbortedHandler,
|
||||
finishTimeUpdateHandler);
|
||||
}
|
||||
|
||||
private DynamicTrackedRace createTrackedRace(TrackedRegatta trackedRegatta, RaceDefinition race,
|
||||
|
||||
+17
-7
@@ -37,6 +37,7 @@ import com.tractrac.model.lib.api.event.IEvent;
|
||||
import com.tractrac.model.lib.api.event.IRace;
|
||||
import com.tractrac.model.lib.api.route.IControl;
|
||||
import com.tractrac.model.lib.api.route.IControlRoute;
|
||||
import com.tractrac.model.lib.api.route.IPathRoute;
|
||||
import com.tractrac.model.lib.api.route.IRoute;
|
||||
import com.tractrac.subscription.lib.api.IEventSubscriber;
|
||||
import com.tractrac.subscription.lib.api.IRaceSubscriber;
|
||||
@@ -97,6 +98,13 @@ public class RaceCourseReceiver extends AbstractReceiverWithQueue<IControlRoute,
|
||||
public void gotRouteChange(IControlRoute controlRoute, long timeStamp) {
|
||||
enqueue(new Triple<IControlRoute, Long, Void>(controlRoute, timeStamp, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gotRouteChange(IPathRoute pathRoute, long timeStamp) {
|
||||
// will never be invoked for sailing events; Jorge Llodra (2018-07-30):
|
||||
// "The IControlRouteChangeListener has been extended adding a new method to get updates of a
|
||||
// IPathRoute. If you are managing "sailing events" this method will never be invoked."
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -243,17 +251,19 @@ public class RaceCourseReceiver extends AbstractReceiverWithQueue<IControlRoute,
|
||||
}
|
||||
}
|
||||
|
||||
private DynamicTrackedRace createTrackedRace(RaceDefinition race, Iterable<Sideline> sidelines, Consumer<DynamicTrackedRace> runAfterCreatingTrackedRace) {
|
||||
DynamicTrackedRace trackedRace = getTrackedRegatta().createTrackedRace(race, sidelines,
|
||||
windStore, delayToLiveInMillis, millisecondsOverWhichToAverageWind,
|
||||
/* time over which to average speed: */ race.getBoatClass().getApproximateManeuverDurationInMilliseconds(),
|
||||
private DynamicTrackedRace createTrackedRace(RaceDefinition race, Iterable<Sideline> sidelines,
|
||||
Consumer<DynamicTrackedRace> runAfterCreatingTrackedRace) {
|
||||
DynamicTrackedRace trackedRace = getTrackedRegatta().createTrackedRace(race, sidelines, windStore,
|
||||
delayToLiveInMillis, millisecondsOverWhichToAverageWind,
|
||||
/* time over which to average speed: */ race.getBoatClass()
|
||||
.getApproximateManeuverDurationInMilliseconds(),
|
||||
raceDefinitionSetToUpdate, useInternalMarkPassingAlgorithm, raceLogResolver,
|
||||
/* Not needed because the RaceTracker is not active on a replica */ Optional.empty());
|
||||
if (runAfterCreatingTrackedRace != null) {
|
||||
runAfterCreatingTrackedRace.accept(trackedRace);
|
||||
runAfterCreatingTrackedRace.accept(trackedRace);
|
||||
}
|
||||
getDomainFactory().addTracTracUpdateHandlers(tracTracUpdateURI, getTracTracEvent().getId(), tracTracUsername, tracTracPassword, race, trackedRace,
|
||||
tractracRace);
|
||||
getDomainFactory().addTracTracUpdateHandlers(tracTracUpdateURI, getTracTracEvent().getId(), tracTracUsername,
|
||||
tracTracPassword, race, trackedRace, tractracRace);
|
||||
return trackedRace;
|
||||
}
|
||||
|
||||
|
||||
+4
-58
@@ -1,86 +1,32 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.Iterator;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.ParseException;
|
||||
|
||||
import com.sap.sailing.domain.base.ControlPoint;
|
||||
import com.sap.sailing.domain.base.CourseBase;
|
||||
import com.sap.sailing.domain.base.Mark;
|
||||
import com.sap.sailing.domain.base.Waypoint;
|
||||
import com.sap.sailing.domain.base.impl.CourseDataImpl;
|
||||
import com.sap.sailing.domain.tracking.CourseDesignChangedListener;
|
||||
import com.sap.sailing.domain.tracking.impl.CourseDesignUpdateHandler;
|
||||
import com.sap.sailing.domain.tractracadapter.DomainFactory;
|
||||
import com.sap.sailing.server.gateway.serialization.JsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.ControlPointJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.CourseBaseJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.CourseJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.GateJsonSerializer;
|
||||
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.tractrac.model.lib.api.event.IRace;
|
||||
import com.tractrac.model.lib.api.route.IControl;
|
||||
|
||||
public class TracTracCourseDesignUpdateHandler extends UpdateHandler implements CourseDesignChangedListener {
|
||||
|
||||
private final static String ACTION = "update_course";
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TracTracCourseDesignUpdateHandler.class.getName());
|
||||
private final JsonSerializer<CourseBase> courseSerializer;
|
||||
public class TracTracCourseDesignUpdateHandler extends CourseDesignUpdateHandler {
|
||||
private final IRace tractracRace;
|
||||
private final DomainFactory domainFactory;
|
||||
|
||||
public TracTracCourseDesignUpdateHandler(URI updateURI, String tracTracUsername, String tracTracPassword, Serializable tracTracEventId, Serializable raceId, IRace tractracRace, DomainFactory domainFactory) {
|
||||
super(updateURI, ACTION, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
super(updateURI, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
this.domainFactory = domainFactory;
|
||||
this.tractracRace = tractracRace;
|
||||
this.courseSerializer = new CourseJsonSerializer(
|
||||
new CourseBaseJsonSerializer(
|
||||
new WaypointJsonSerializer(
|
||||
new ControlPointJsonSerializer(
|
||||
new MarkJsonSerializer(),
|
||||
new GateJsonSerializer(new MarkJsonSerializer())))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void courseDesignChanged(final CourseBase newCourseDesign) throws MalformedURLException, IOException {
|
||||
if (!isActive()) {
|
||||
logger.info("Not sending course update to TracTrac because no URL has been provided.");
|
||||
return;
|
||||
}
|
||||
final CourseBase newCourseDesignWithExistingControlPoints = replaceControlPointsByMatchingExistingControlPoints(newCourseDesign);
|
||||
JSONObject serializedCourseDesign = courseSerializer.serialize(newCourseDesignWithExistingControlPoints);
|
||||
String payload = serializedCourseDesign.toJSONString();
|
||||
URL currentCourseDesignURL = buildUpdateURL();
|
||||
logger.info("Using " + currentCourseDesignURL.toString() + " for the course update!");
|
||||
logger.info("Payload is " + payload);
|
||||
HttpURLConnection connection = (HttpURLConnection) currentCourseDesignURL.openConnection();
|
||||
try {
|
||||
setConnectionPropertiesAndSendWithPayload(connection, payload);
|
||||
try {
|
||||
checkAndLogUpdateResponse(connection);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
} else {
|
||||
logger.severe("Connection to TracTrac Course Update URL " + currentCourseDesignURL.toString() + " could not be established");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CourseBase replaceControlPointsByMatchingExistingControlPoints(CourseBase courseDesign) {
|
||||
protected CourseBase replaceControlPointsByMatchingExistingControlPoints(CourseBase courseDesign) {
|
||||
final Iterable<IControl> candidates = domainFactory.getControlsForCourseArea(tractracRace.getEvent(), tractracRace.getCourseArea());
|
||||
final CourseBase result = new CourseDataImpl(courseDesign.getName());
|
||||
int zeroBasedPosition = 0;
|
||||
|
||||
@@ -47,5 +47,12 @@ Require-Bundle: com.googlecode.java-diff-utils;bundle-version="1.3.0",
|
||||
com.sap.sse.shared.android,
|
||||
org.apache.commons.math,
|
||||
com.sap.sailing.declination,
|
||||
com.sap.sailing.server.gateway.serialization.shared.android,
|
||||
com.sap.sse.datamining.annotations
|
||||
Import-Package: org.apache.http,
|
||||
org.apache.http.client;version="[4.2.5,4.3.0)",
|
||||
org.apache.http.client.entity;version="[4.2.5,4.3.0)",
|
||||
org.apache.http.client.methods;version="[4.2.5,4.3.0)",
|
||||
org.apache.http.impl.client;version="[4.2.5,4.3.0)",
|
||||
org.apache.http.message;version="[4.2.5,4.3.0)"
|
||||
Automatic-Module-Name: com.sap.sailing.domain
|
||||
@@ -21,9 +21,14 @@ import com.sap.sailing.domain.common.dto.TrackedRaceStatisticsDTO;
|
||||
import com.sap.sailing.domain.common.media.MediaTrack;
|
||||
import com.sap.sailing.domain.leaderboard.Leaderboard;
|
||||
import com.sap.sailing.domain.leaderboard.ScoringScheme;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.domain.tracking.impl.CourseDesignUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.FinishTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.RaceAbortedHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.StartTimeUpdateHandler;
|
||||
import com.sap.sse.common.IsManagedByCache;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
@@ -101,4 +106,11 @@ public interface DomainFactory extends SharedDomainFactory {
|
||||
*/
|
||||
void updateRaceDTOWithTrackedRaceData(TrackedRace trackedRace, RaceDTO raceDTO);
|
||||
|
||||
/**
|
||||
* Adds update handlers to a {@link TrackedRace} which can send updates to a REST service about race status
|
||||
* changes such as a start time change, a course change, or a postponement.
|
||||
*/
|
||||
void addUpdateHandlers(DynamicTrackedRace trackedRace, CourseDesignUpdateHandler courseDesignHandler,
|
||||
StartTimeUpdateHandler startTimeHandler, RaceAbortedHandler raceAbortedHandler,
|
||||
final FinishTimeUpdateHandler finishTimeUpdateHandler);
|
||||
}
|
||||
+22
-24
@@ -11,6 +11,8 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -60,15 +62,15 @@ public abstract class AbstractRaceColumn extends SimpleAbstractRaceColumn implem
|
||||
private TrackedRaces trackedRaces;
|
||||
private Map<Fleet, RaceIdentifier> raceIdentifiers;
|
||||
|
||||
private Map<Fleet, RaceLog> raceLogs;
|
||||
|
||||
private ConcurrentMap<Fleet, RaceLog> raceLogs;
|
||||
|
||||
private transient RaceLogStore raceLogStore;
|
||||
private RegattaLikeIdentifier regattaLikeParent;
|
||||
|
||||
public AbstractRaceColumn() {
|
||||
this.trackedRaces = new TrackedRaces();
|
||||
this.raceIdentifiers = new HashMap<Fleet, RaceIdentifier>();
|
||||
this.raceLogs = new HashMap<Fleet, RaceLog>();
|
||||
this.raceLogs = new ConcurrentHashMap<Fleet, RaceLog>();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -82,9 +84,7 @@ public abstract class AbstractRaceColumn extends SimpleAbstractRaceColumn implem
|
||||
|
||||
@Override
|
||||
public RaceLog getRaceLog(Fleet fleet) {
|
||||
synchronized (raceLogs) {
|
||||
return raceLogs.get(fleet);
|
||||
}
|
||||
return raceLogs.get(fleet);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -197,25 +197,23 @@ public abstract class AbstractRaceColumn extends SimpleAbstractRaceColumn implem
|
||||
|
||||
@Override
|
||||
public void reloadRaceLog(Fleet fleet) {
|
||||
synchronized (raceLogs) {
|
||||
RaceLogIdentifier identifier = getRaceLogIdentifier(fleet);
|
||||
RaceLog newOrLoadedRaceLog = raceLogStore.getRaceLog(identifier, /* ignoreCache */true);
|
||||
RaceLog raceLogAvailable = raceLogs.get(fleet);
|
||||
if (raceLogAvailable == null) {
|
||||
RaceColumnRaceLogReplicator listener = new RaceColumnRaceLogReplicator(this, identifier);
|
||||
// FIXME Wouldn't this skip any listener notifications that a merge below would trigger if the race log already existed?
|
||||
// FIXME For example, how about the race log-provided score corrections that need application to the leaderboard and replication?
|
||||
newOrLoadedRaceLog.addListener(listener);
|
||||
raceLogs.put(fleet, newOrLoadedRaceLog);
|
||||
final TrackedRace trackedRace = getTrackedRace(fleet);
|
||||
if (trackedRace != null) {
|
||||
// need to attach race log
|
||||
trackedRace.attachRaceLog(newOrLoadedRaceLog);
|
||||
}
|
||||
} else {
|
||||
// now add all race log events from newOrLoadedRaceLog that are not already in raceLogAvailable
|
||||
raceLogAvailable.merge(newOrLoadedRaceLog);
|
||||
RaceLogIdentifier identifier = getRaceLogIdentifier(fleet);
|
||||
RaceLog newOrLoadedRaceLog = raceLogStore.getRaceLog(identifier, /* ignoreCache */true);
|
||||
RaceLog raceLogAvailable = raceLogs.get(fleet);
|
||||
if (raceLogAvailable == null) {
|
||||
RaceColumnRaceLogReplicator listener = new RaceColumnRaceLogReplicator(this, identifier);
|
||||
// FIXME Wouldn't this skip any listener notifications that a merge below would trigger if the race log already existed?
|
||||
// FIXME For example, how about the race log-provided score corrections that need application to the leaderboard and replication?
|
||||
newOrLoadedRaceLog.addListener(listener);
|
||||
raceLogs.put(fleet, newOrLoadedRaceLog);
|
||||
final TrackedRace trackedRace = getTrackedRace(fleet);
|
||||
if (trackedRace != null) {
|
||||
// need to attach race log
|
||||
trackedRace.attachRaceLog(newOrLoadedRaceLog);
|
||||
}
|
||||
} else {
|
||||
// now add all race log events from newOrLoadedRaceLog that are not already in raceLogAvailable
|
||||
raceLogAvailable.merge(newOrLoadedRaceLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
-1
@@ -64,11 +64,16 @@ import com.sap.sailing.domain.leaderboard.impl.LowPointTieBreakBasedOnLastSeries
|
||||
import com.sap.sailing.domain.leaderboard.impl.LowPointWinnerGetsZero;
|
||||
import com.sap.sailing.domain.leaderboard.impl.LowPointWithAutomaticRDG;
|
||||
import com.sap.sailing.domain.leaderboard.impl.LowPointWithEliminationsAndRoundsWinnerGets07;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.GPSFixTrack;
|
||||
import com.sap.sailing.domain.tracking.MarkPassing;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.TrackedRegattaRegistry;
|
||||
import com.sap.sailing.domain.tracking.impl.CourseDesignUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.FinishTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.MarkPassingImpl;
|
||||
import com.sap.sailing.domain.tracking.impl.RaceAbortedHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.StartTimeUpdateHandler;
|
||||
import com.sap.sailing.domain.tracking.impl.TrackedRaceImpl;
|
||||
import com.sap.sailing.geocoding.ReverseGeocoder;
|
||||
import com.sap.sse.common.Distance;
|
||||
@@ -201,11 +206,12 @@ public class DomainFactoryImpl extends SharedDomainFactoryImpl implements Domain
|
||||
assert trackedRace != null;
|
||||
raceDTO.startOfRace = trackedRace.getStartOfRace() == null ? null : trackedRace.getStartOfRace().asDate();
|
||||
raceDTO.endOfRace = trackedRace.getEndOfRace() == null ? null : trackedRace.getEndOfRace().asDate();
|
||||
raceDTO.raceFinishedTime = trackedRace.getFinishedTime() == null ? null : trackedRace.getFinishedTime().asDate();
|
||||
raceDTO.status = new RaceStatusDTO();
|
||||
raceDTO.status.status = trackedRace.getStatus() == null ? null : trackedRace.getStatus().getStatus();
|
||||
raceDTO.status.loadingProgress = trackedRace.getStatus() == null ? 0.0 : trackedRace.getStatus().getLoadingProgress();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TrackedRaceDTO createTrackedRaceDTO(TrackedRace trackedRace) {
|
||||
TrackedRaceDTO trackedRaceDTO = new TrackedRaceDTO();
|
||||
@@ -394,6 +400,7 @@ public class DomainFactoryImpl extends SharedDomainFactoryImpl implements Domain
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CompetitorAndBoatDTO> getCompetitorDTOList(List<Pair<Competitor, Boat>> competitors) {
|
||||
List<CompetitorAndBoatDTO> result = new ArrayList<>();
|
||||
for (Pair<Competitor, Boat> competitorAndBoat : competitors) {
|
||||
@@ -401,4 +408,14 @@ public class DomainFactoryImpl extends SharedDomainFactoryImpl implements Domain
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addUpdateHandlers(DynamicTrackedRace trackedRace, CourseDesignUpdateHandler courseDesignHandler,
|
||||
StartTimeUpdateHandler startTimeHandler, RaceAbortedHandler raceAbortedHandler,
|
||||
final FinishTimeUpdateHandler finishTimeUpdateHandler) {
|
||||
trackedRace.addCourseDesignChangedListener(courseDesignHandler);
|
||||
trackedRace.addStartTimeChangedListener(startTimeHandler);
|
||||
trackedRace.addRaceAbortedListener(raceAbortedHandler);
|
||||
trackedRace.addListener(finishTimeUpdateHandler.getListener());
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -100,9 +100,9 @@ public interface CompleteManeuverCurveWithEstimationData extends Timed, Position
|
||||
|
||||
Distance getDistanceToClosestMark();
|
||||
|
||||
Double getDeviationOfManeuverAngleFromTargetTackAngleInDegrees();
|
||||
Double getTargetTackAngleInDegrees();
|
||||
|
||||
Double getDeviationOfManeuverAngleFromTargetJibeAngleInDegrees();
|
||||
Double getTargetJibeAngleInDegrees();
|
||||
|
||||
/**
|
||||
* Gets whether a mark was crossed within the maneuver curve.
|
||||
|
||||
+13
-12
@@ -27,14 +27,15 @@ public class CompleteManeuverCurveWithEstimationDataImpl implements CompleteMane
|
||||
private final boolean markPassing;
|
||||
private final Position position;
|
||||
private final Distance distanceToClosestMark;
|
||||
private final Double deviationOfManeuverAngleFromTargetTackAngleInDegrees;
|
||||
private final Double deviationOfManeuverAngleFromTargetJibeAngleInDegrees;
|
||||
private final Double targetTackAngleInDegrees;
|
||||
private final Double targetJibeAngleInDegrees;
|
||||
|
||||
public CompleteManeuverCurveWithEstimationDataImpl(Position position, ManeuverMainCurveWithEstimationData mainCurve,
|
||||
ManeuverCurveWithUnstableCourseAndSpeedWithEstimationData curveWithUnstableCourseAndSpeed, Wind wind,
|
||||
int tackingCount, int jibingCount, boolean maneuverStartsByRunningAwayFromWind,
|
||||
Bearing relativeBearingToNextMarkBeforeManeuver, Bearing relativeBearingToNextMarkAfterManeuver,
|
||||
boolean markPassing, Distance distanceToClosestMark, Double deviationOfManeuverAngleFromTargetTackAngleInDegrees, Double deviationOfManeuverAngleFromTargetJibeAngleInDegrees) {
|
||||
boolean markPassing, Distance distanceToClosestMark, Double targetTackAngleInDegrees,
|
||||
Double targetJibeAngleInDegrees) {
|
||||
this.position = position;
|
||||
this.mainCurve = mainCurve;
|
||||
this.curveWithUnstableCourseAndSpeed = curveWithUnstableCourseAndSpeed;
|
||||
@@ -46,8 +47,8 @@ public class CompleteManeuverCurveWithEstimationDataImpl implements CompleteMane
|
||||
this.relativeBearingToNextMarkAfterManeuver = relativeBearingToNextMarkAfterManeuver;
|
||||
this.markPassing = markPassing;
|
||||
this.distanceToClosestMark = distanceToClosestMark;
|
||||
this.deviationOfManeuverAngleFromTargetTackAngleInDegrees = deviationOfManeuverAngleFromTargetTackAngleInDegrees;
|
||||
this.deviationOfManeuverAngleFromTargetJibeAngleInDegrees = deviationOfManeuverAngleFromTargetJibeAngleInDegrees;
|
||||
this.targetTackAngleInDegrees = targetTackAngleInDegrees;
|
||||
this.targetJibeAngleInDegrees = targetJibeAngleInDegrees;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -99,20 +100,20 @@ public class CompleteManeuverCurveWithEstimationDataImpl implements CompleteMane
|
||||
public Position getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Distance getDistanceToClosestMark() {
|
||||
return distanceToClosestMark;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Double getDeviationOfManeuverAngleFromTargetTackAngleInDegrees() {
|
||||
return deviationOfManeuverAngleFromTargetTackAngleInDegrees;
|
||||
public Double getTargetTackAngleInDegrees() {
|
||||
return targetTackAngleInDegrees;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Double getDeviationOfManeuverAngleFromTargetJibeAngleInDegrees() {
|
||||
return deviationOfManeuverAngleFromTargetJibeAngleInDegrees;
|
||||
public Double getTargetJibeAngleInDegrees() {
|
||||
return targetJibeAngleInDegrees;
|
||||
}
|
||||
|
||||
}
|
||||
+10
-9
@@ -278,7 +278,8 @@ public class ManeuverDetectorWithEstimationDataSupportDecoratorImpl
|
||||
stepWithHighestSpeed.getSpeedWithBearing(), stepWithHighestSpeed.getTimePoint(),
|
||||
maneuverCurve.getMainCurveBoundaries().getTimePoint(),
|
||||
maneuverCurve.getMainCurveBoundaries().getMaxTurningRateInDegreesPerSecond(), courseAtMaxTurningRate,
|
||||
distanceSailedWithinManeuver, projectedManeuverLoss.getDistanceSailedProjectedOnMiddleManeuverAngle(), distanceSailedIfNotManeuvering,
|
||||
distanceSailedWithinManeuver, projectedManeuverLoss.getDistanceSailedProjectedOnMiddleManeuverAngle(),
|
||||
distanceSailedIfNotManeuvering,
|
||||
projectedManeuverLoss.getDistanceSailedIfNotManeuveringProjectedOnMiddleManeuverAngle(),
|
||||
Math.abs(maneuverCurve.getMainCurveBoundaries().getDirectionChangeInDegrees())
|
||||
/ maneuverCurve.getMainCurveBoundaries().getDuration().asSeconds(),
|
||||
@@ -338,9 +339,9 @@ public class ManeuverDetectorWithEstimationDataSupportDecoratorImpl
|
||||
gpsFixesCountFromPreviousManeuver, durationAndAvgSpeedWithBearingAfter.getB(),
|
||||
durationAndAvgSpeedWithBearingAfter.getA(), gpsFixesCountToNextManeuver, distanceSailedWithinManeuver,
|
||||
projectedManeuverLoss.getDistanceSailedProjectedOnMiddleManeuverAngle(), distanceSailedIfNotManeuvering,
|
||||
projectedManeuverLoss.getDistanceSailedIfNotManeuveringProjectedOnMiddleManeuverAngle(), gpsFixCountWithinWholeCurve,
|
||||
longestGpsFixIntervalBetweenTwoFixes, intervalBetweenLastFixOfCurveAndNextFix,
|
||||
intervalBetweenFirstFixOfCurveAndPreviousFix);
|
||||
projectedManeuverLoss.getDistanceSailedIfNotManeuveringProjectedOnMiddleManeuverAngle(),
|
||||
gpsFixCountWithinWholeCurve, longestGpsFixIntervalBetweenTwoFixes,
|
||||
intervalBetweenLastFixOfCurveAndNextFix, intervalBetweenFirstFixOfCurveAndPreviousFix);
|
||||
TimePoint maneuverTimePoint = maneuverCurve.getMainCurveBoundaries().getTimePoint();
|
||||
Position maneuverPosition = maneuverDetector.track.getEstimatedPosition(maneuverTimePoint,
|
||||
/* extrapolate */false);
|
||||
@@ -357,8 +358,8 @@ public class ManeuverDetectorWithEstimationDataSupportDecoratorImpl
|
||||
.getManeuverCurveWithStableSpeedAndCourseBoundaries().getSpeedWithBearingAfter().getBearing());
|
||||
BoatClass boatClass = maneuverDetector.trackedRace.getRace().getBoatOfCompetitor(maneuverDetector.competitor)
|
||||
.getBoatClass();
|
||||
Double deviationFromTackAngle = null;
|
||||
Double deviationFromJibeAngle = null;
|
||||
Double targetTackAngle = null;
|
||||
Double targetJibeAngle = null;
|
||||
Speed boatSpeed = curveWithUnstableCourseAndSpeed.getSpeedWithBearingBefore()
|
||||
.compareTo(curveWithUnstableCourseAndSpeed.getSpeedWithBearingAfter()) < 0
|
||||
? curveWithUnstableCourseAndSpeed.getSpeedWithBearingBefore()
|
||||
@@ -369,11 +370,11 @@ public class ManeuverDetectorWithEstimationDataSupportDecoratorImpl
|
||||
SpeedWithBearingWithConfidence<Void> closestJibeTwa = polarDataService.getClosestTwaTws(ManeuverType.JIBE,
|
||||
boatSpeed, curveWithUnstableCourseAndSpeed.getDirectionChangeInDegrees(), boatClass);
|
||||
if (closestTackTwa != null) {
|
||||
deviationFromTackAngle = polarDataService.getManeuverAngleInDegreesFromTwa(
|
||||
targetTackAngle = polarDataService.getManeuverAngleInDegreesFromTwa(
|
||||
closestTackTwa.getObject().getBearing().getDegrees(), ManeuverType.TACK);
|
||||
}
|
||||
if (closestJibeTwa != null) {
|
||||
deviationFromJibeAngle = polarDataService.getManeuverAngleInDegreesFromTwa(
|
||||
targetJibeAngle = polarDataService.getManeuverAngleInDegreesFromTwa(
|
||||
closestJibeTwa.getObject().getBearing().getDegrees(), ManeuverType.JIBE);
|
||||
}
|
||||
}
|
||||
@@ -383,7 +384,7 @@ public class ManeuverDetectorWithEstimationDataSupportDecoratorImpl
|
||||
curveWithUnstableCourseAndSpeed, wind, numberOfTacks, numberOfJibes,
|
||||
maneuverStartsByRunningAwayFromWind, relativeBearingToNextMarkPassingBeforeManeuver,
|
||||
relativeBearingToNextMarkPassingAfterManeuver, maneuverCurve.isMarkPassing(), closestDistanceToMark,
|
||||
deviationFromTackAngle, deviationFromJibeAngle);
|
||||
targetTackAngle, targetJibeAngle);
|
||||
}
|
||||
|
||||
public Distance getClosestDistanceToMark(TimePoint timePoint) {
|
||||
|
||||
+7
@@ -53,6 +53,13 @@ public interface CandidateFinder {
|
||||
*/
|
||||
Map<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> getCandidateDeltasAfterRaceStartTimeChange();
|
||||
|
||||
/**
|
||||
* Notifies this finder about the race's start of tracking time having changed. In case of a race that infers
|
||||
* the race start time from the start mark passings, a change in start of tracking needs to adjust the time range
|
||||
* in which candidates are considered valid.
|
||||
*/
|
||||
Map<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> getCandidateDeltasAfterStartOfTrackingChange();
|
||||
|
||||
/**
|
||||
* Notifies this finder about the race's finished time having changed. The candidates collections are adjusted
|
||||
* accordingly: new candidates may be added if the finished time was moved to a later point in time and therefore
|
||||
|
||||
+19
@@ -195,6 +195,25 @@ public class MarkPassingUpdateListener extends AbstractRaceChangeListener {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startOfTrackingChanged(TimePoint oldStartOfTracking, TimePoint newStartOfTracking) {
|
||||
markPassingCalculator.enqueueUpdate(new StorePositionUpdateStrategy() {
|
||||
@Override
|
||||
public void storePositionUpdate(Map<Competitor, List<GPSFix>> competitorFixes,
|
||||
Map<Mark, List<GPSFix>> markFixes, List<Waypoint> addedWaypoints, List<Waypoint> removedWaypoints,
|
||||
IntHolder smallestChangedWaypointIndex,
|
||||
List<Triple<Competitor, Integer, TimePoint>> fixedMarkPassings,
|
||||
List<Pair<Competitor, Integer>> removedMarkPassings,
|
||||
List<Pair<Competitor, Integer>> suppressedMarkPassings, List<Competitor> unSuppressedMarkPassings, CandidateFinder candidateFinder, CandidateChooser candidateChooser) {
|
||||
final Map<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> newAndRemovedCandidatesPerCompetitor =
|
||||
candidateFinder.getCandidateDeltasAfterStartOfTrackingChange();
|
||||
for (final Entry<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> i : newAndRemovedCandidatesPerCompetitor.entrySet()) {
|
||||
candidateChooser.calculateMarkPassDeltas(i.getKey(), i.getValue().getA(), i.getValue().getB());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishedTimeChanged(TimePoint oldFinishedTime, TimePoint newFinishedTime) {
|
||||
markPassingCalculator.enqueueUpdate(new StorePositionUpdateStrategy() {
|
||||
|
||||
+38
-7
@@ -37,6 +37,7 @@ import com.sap.sailing.domain.tracking.DynamicGPSFixTrack;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.GPSFixTrack;
|
||||
import com.sap.sailing.domain.tracking.MarkPositionAtTimePointCache;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.impl.MarkPositionAtTimePointCacheImpl;
|
||||
import com.sap.sailing.domain.tracking.impl.TimedComparator;
|
||||
import com.sap.sse.common.Bearing;
|
||||
@@ -1455,12 +1456,26 @@ public class CandidateFinderImpl implements CandidateFinder {
|
||||
/**
|
||||
* If the {@link #race}'s regatta is configured to infer the start times from start mark passings then {@code null}
|
||||
* must be tolerated as a value for {@code from}, leading to an open interval starting at the
|
||||
* {@link TimePoint#BeginningOfTime beginning of time}. However, if the start time is expected to be set and not
|
||||
* inferred, mark passings need to be detected only from the start minus some tolerance interval. In this case,
|
||||
* an interval that has {@code null} as its {@code from} time point and thus is considered empty will be returned.
|
||||
* It hence returns {@code null} from its {@link TimeRangeWithNullStartMeaningEmpty#getTimeRangeOrNull()} method.
|
||||
* {@link TrackedRace#getStartOfTracking()} or, if not set, the {@link TimePoint#BeginningOfTime beginning of time}.
|
||||
* However, if the start time is expected to be set and not inferred, mark passings need to be detected only from
|
||||
* the start minus some tolerance interval. In this case, an interval that has {@code null} as its {@code from} time
|
||||
* point and thus is considered empty will be returned. It hence returns {@code null} from its
|
||||
* {@link TimeRangeWithNullStartMeaningEmpty#getTimeRangeOrNull()} method.
|
||||
*/
|
||||
private TimeRangeWithNullStartMeaningEmpty getTimeRangeOrNull(TimePoint from, TimePoint to) {
|
||||
final TimePoint effectiveFrom = getEffectiveFrom(from);
|
||||
return new TimeRangeWithNullStartMeaningEmpty(effectiveFrom, to);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the {@link #race}'s regatta is configured to infer the start times from start mark passings then {@code null}
|
||||
* must be tolerated as a value for {@code from}, leading to an open interval starting at the
|
||||
* {@link TrackedRace#getStartOfTracking()} or, if not set, the {@link TimePoint#BeginningOfTime beginning of time}.
|
||||
* However, if the start time is expected to be set and not inferred, mark passings need to be detected only from
|
||||
* the start minus some tolerance interval. In this case, for an interval that has {@code null} as its {@code from} time
|
||||
* point and thus is considered empty, {@code null} will be returned.
|
||||
*/
|
||||
private TimePoint getEffectiveFrom(TimePoint from) {
|
||||
final TimePoint effectiveFrom;
|
||||
if (from == null && race.getTrackedRegatta().getRegatta().useStartTimeInference()) {
|
||||
// need to check the whole track to be able to find start mark passings
|
||||
@@ -1470,15 +1485,22 @@ public class CandidateFinderImpl implements CandidateFinder {
|
||||
} else {
|
||||
effectiveFrom = from;
|
||||
}
|
||||
return new TimeRangeWithNullStartMeaningEmpty(effectiveFrom, to);
|
||||
return effectiveFrom;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> getCandidateDeltasAfterRaceStartTimeChange() {
|
||||
final Map<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> result;
|
||||
final TimePoint newNonInferredStartTime = race.getStartOfRace(/* inferred */ false);
|
||||
final TimePoint newTimePointWhenToStartConsideringCandidates = getTimePointWhenToStartConsideringCandidates(newNonInferredStartTime);
|
||||
final TimeRangeWithNullStartMeaningEmpty newTimeRange = timeRangeForValidCandidates.getWithNewFrom(newTimePointWhenToStartConsideringCandidates);
|
||||
final TimePoint newEffectiveTimePointWhenToStartConsideringCandidates = getEffectiveFrom(newTimePointWhenToStartConsideringCandidates);
|
||||
final TimeRangeWithNullStartMeaningEmpty newTimeRange = timeRangeForValidCandidates.getWithNewFrom(newEffectiveTimePointWhenToStartConsideringCandidates);
|
||||
return getCandidateDeltasAfterTimingChange(newEffectiveTimePointWhenToStartConsideringCandidates, newTimeRange);
|
||||
}
|
||||
|
||||
private Map<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> getCandidateDeltasAfterTimingChange(
|
||||
final TimePoint newTimePointWhenToStartConsideringCandidates,
|
||||
final TimeRangeWithNullStartMeaningEmpty newTimeRange) {
|
||||
final Map<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> result;
|
||||
if (!Util.equalsWithNull(newTimeRange, timeRangeForValidCandidates)) {
|
||||
if (newTimeRange.getTimeRangeOrNull() == null) {
|
||||
result = clearAllCandidates();
|
||||
@@ -1499,6 +1521,15 @@ public class CandidateFinderImpl implements CandidateFinder {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> getCandidateDeltasAfterStartOfTrackingChange() {
|
||||
final TimePoint newNonInferredStartTime = race.getStartOfRace(/* inferred */ false);
|
||||
final TimePoint newTimePointWhenToStartConsideringCandidates = getTimePointWhenToStartConsideringCandidates(newNonInferredStartTime);
|
||||
final TimePoint newEffectiveTimePointWhenToStartConsideringCandidates = getEffectiveFrom(newTimePointWhenToStartConsideringCandidates);
|
||||
final TimeRangeWithNullStartMeaningEmpty newTimeRange = timeRangeForValidCandidates.getWithNewFrom(newEffectiveTimePointWhenToStartConsideringCandidates);
|
||||
return getCandidateDeltasAfterTimingChange(newEffectiveTimePointWhenToStartConsideringCandidates, newTimeRange);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Competitor, Pair<Iterable<Candidate>, Iterable<Candidate>>> getCandidateDeltasAfterRaceFinishedTimeChange(
|
||||
TimePoint oldFinishedTime, TimePoint newFinishedTime) {
|
||||
|
||||
Executable
+78
@@ -0,0 +1,78 @@
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.ParseException;
|
||||
|
||||
import com.sap.sailing.domain.base.CourseBase;
|
||||
import com.sap.sailing.domain.tracking.CourseDesignChangedListener;
|
||||
import com.sap.sailing.server.gateway.serialization.JsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.ControlPointJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.CourseBaseJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.CourseJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.GateJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.MarkJsonSerializer;
|
||||
import com.sap.sailing.server.gateway.serialization.coursedata.impl.WaypointJsonSerializer;
|
||||
|
||||
public class CourseDesignUpdateHandler extends UpdateHandler implements CourseDesignChangedListener {
|
||||
|
||||
private final static String ACTION = "update_course";
|
||||
|
||||
private final static Logger logger = Logger.getLogger(CourseDesignUpdateHandler.class.getName());
|
||||
private final JsonSerializer<CourseBase> courseSerializer;
|
||||
|
||||
public CourseDesignUpdateHandler(URI updateURI, String username, String password, Serializable eventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, username, password, eventId, raceId);
|
||||
this.courseSerializer = new CourseJsonSerializer(
|
||||
new CourseBaseJsonSerializer(
|
||||
new WaypointJsonSerializer(
|
||||
new ControlPointJsonSerializer(
|
||||
new MarkJsonSerializer(),
|
||||
new GateJsonSerializer(new MarkJsonSerializer())))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void courseDesignChanged(final CourseBase newCourseDesign) throws MalformedURLException, IOException {
|
||||
if (!isActive()) {
|
||||
logger.info("Not sending course update to TracTrac because no URL has been provided.");
|
||||
return;
|
||||
}
|
||||
final CourseBase newCourseDesignWithExistingControlPoints = replaceControlPointsByMatchingExistingControlPoints(newCourseDesign);
|
||||
JSONObject serializedCourseDesign = courseSerializer.serialize(newCourseDesignWithExistingControlPoints);
|
||||
String payload = serializedCourseDesign.toJSONString();
|
||||
URL currentCourseDesignURL = buildUpdateURL();
|
||||
logger.info("Using " + currentCourseDesignURL.toString() + " for the course update!");
|
||||
logger.info("Payload is " + payload);
|
||||
HttpURLConnection connection = (HttpURLConnection) currentCourseDesignURL.openConnection();
|
||||
try {
|
||||
setConnectionPropertiesAndSendWithPayload(connection, payload);
|
||||
try {
|
||||
checkAndLogUpdateResponse(connection);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
} else {
|
||||
logger.severe("Connection to TracTrac Course Update URL " + currentCourseDesignURL.toString() + " could not be established");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This default implementation returns the {@code courseDesign} unchanged. Subclasses have the possibility to
|
||||
* override this method in order to replace individual course marks provided in a detailed course design,
|
||||
* based on the actual course marks available.
|
||||
*/
|
||||
protected CourseBase replaceControlPointsByMatchingExistingControlPoints(CourseBase courseDesign) {
|
||||
return courseDesign;
|
||||
}
|
||||
}
|
||||
+8
-17
@@ -205,6 +205,7 @@ public class CrossTrackErrorCache extends AbstractRaceChangeListener {
|
||||
owner.addListener(this);
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
private interface CrossTrackErrorMeterRetriever {
|
||||
double getDistanceInMetersSumFromStart(CrossTrackErrorSumAndNumberOfFixes cacheEntry);
|
||||
}
|
||||
@@ -220,12 +221,7 @@ public class CrossTrackErrorCache extends AbstractRaceChangeListener {
|
||||
*/
|
||||
public Distance getAverageAbsoluteCrossTrackError(Competitor competitor, TimePoint from, TimePoint to, boolean upwindOnly,
|
||||
boolean waitForLatest) throws NoWindException {
|
||||
CrossTrackErrorMeterRetriever absoluteMetersRetriever = new CrossTrackErrorMeterRetriever() {
|
||||
@Override
|
||||
public double getDistanceInMetersSumFromStart(CrossTrackErrorSumAndNumberOfFixes cacheEntry) {
|
||||
return cacheEntry.getAbsoluteDistanceInMetersSumFromStart();
|
||||
}
|
||||
};
|
||||
CrossTrackErrorMeterRetriever absoluteMetersRetriever = cacheEntry->cacheEntry.getAbsoluteDistanceInMetersSumFromStart();
|
||||
return getAbsoluteOrSignedAverageCrossTrackError(competitor, from, to, upwindOnly, waitForLatest, absoluteMetersRetriever);
|
||||
}
|
||||
|
||||
@@ -240,20 +236,15 @@ public class CrossTrackErrorCache extends AbstractRaceChangeListener {
|
||||
*/
|
||||
public Distance getAverageSignedCrossTrackError(Competitor competitor, TimePoint from, TimePoint to, boolean upwindOnly,
|
||||
boolean waitForLatest) throws NoWindException {
|
||||
CrossTrackErrorMeterRetriever signedMetersRetriever = new CrossTrackErrorMeterRetriever() {
|
||||
@Override
|
||||
public double getDistanceInMetersSumFromStart(CrossTrackErrorSumAndNumberOfFixes cacheEntry) {
|
||||
return cacheEntry.getSignedDistanceInMetersSumFromStart();
|
||||
}
|
||||
};
|
||||
CrossTrackErrorMeterRetriever signedMetersRetriever = cacheEntry->cacheEntry.getSignedDistanceInMetersSumFromStart();
|
||||
return getAbsoluteOrSignedAverageCrossTrackError(competitor, from, to, upwindOnly, waitForLatest, signedMetersRetriever);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param absoluteMetersRetriever determines whether the absolute or signed cross track error will be aggregated
|
||||
* @param absoluteOrSignedMetersRetriever determines whether the absolute or signed cross track error will be aggregated
|
||||
*/
|
||||
private Distance getAbsoluteOrSignedAverageCrossTrackError(Competitor competitor, TimePoint from, TimePoint to,
|
||||
boolean upwindOnly, boolean waitForLatest, CrossTrackErrorMeterRetriever absoluteMetersRetriever)
|
||||
boolean upwindOnly, boolean waitForLatest, CrossTrackErrorMeterRetriever absoluteOrSignedMetersRetriever)
|
||||
throws NoWindException {
|
||||
Track<CrossTrackErrorSumAndNumberOfFixes> cacheForCompetitor = cachePerCompetitor.get(competitor, waitForLatest);
|
||||
double distanceInMeters = 0;
|
||||
@@ -268,7 +259,7 @@ public class CrossTrackErrorCache extends AbstractRaceChangeListener {
|
||||
final MarkPassing legStartMarkPassing = owner.getMarkPassing(competitor, leg.getFrom());
|
||||
if (legStartMarkPassing != null) {
|
||||
if (!upwindOnly || trackedLeg.getLegType(legStartMarkPassing.getTimePoint()) == LegType.UPWIND) {
|
||||
TimePoint start;
|
||||
final TimePoint start;
|
||||
final TimePoint legStart = legStartMarkPassing.getTimePoint();
|
||||
if (legStart.compareTo(from) < 0) {
|
||||
// the interval requested starts after this leg's start:
|
||||
@@ -277,7 +268,7 @@ public class CrossTrackErrorCache extends AbstractRaceChangeListener {
|
||||
start = legStart;
|
||||
}
|
||||
final MarkPassing legEndMarkPassing = owner.getMarkPassing(competitor, leg.getTo());
|
||||
TimePoint end;
|
||||
final TimePoint end;
|
||||
if (legEndMarkPassing == null || legEndMarkPassing.getTimePoint().compareTo(to) >= 0) {
|
||||
// no next mark passing, or next mark passing is beyond the "to" time point; aggregate up to "to"
|
||||
end = to;
|
||||
@@ -294,7 +285,7 @@ public class CrossTrackErrorCache extends AbstractRaceChangeListener {
|
||||
}
|
||||
CrossTrackErrorSumAndNumberOfFixes endAggregate = cacheForCompetitor.getLastFixAtOrBefore(end);
|
||||
if (endAggregate != null) {
|
||||
distanceInMeters += absoluteMetersRetriever.getDistanceInMetersSumFromStart(endAggregate) - absoluteMetersRetriever.getDistanceInMetersSumFromStart(startAggregate);
|
||||
distanceInMeters += absoluteOrSignedMetersRetriever.getDistanceInMetersSumFromStart(endAggregate) - absoluteOrSignedMetersRetriever.getDistanceInMetersSumFromStart(startAggregate);
|
||||
count += endAggregate.getFixCountFromStart() - startAggregate.getFixCountFromStart();
|
||||
startAggregate = endAggregate;
|
||||
}
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ public class DynamicTrackedRaceLogListener extends BaseRaceLogEventVisitor {
|
||||
logger.severe("Trying to add " + this + " as listener to a null race log for tracked race " + trackedRace.getRace());
|
||||
} else {
|
||||
raceLog.addListener(this);
|
||||
final ReadonlyRaceState raceState = ReadonlyRaceStateImpl.create(trackedRace.getRaceLogResolver(), raceLog);
|
||||
final ReadonlyRaceState raceState = ReadonlyRaceStateImpl.getOrCreate(trackedRace.getRaceLogResolver(), raceLog);
|
||||
raceLogs.put(raceLog, raceState);
|
||||
raceState.addChangedListener(new BaseRaceStateChangedListener() {
|
||||
@Override
|
||||
|
||||
+6
-7
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@@ -20,12 +20,11 @@ import org.json.simple.parser.ParseException;
|
||||
|
||||
import com.sap.sailing.domain.base.Regatta;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.impl.AbstractRaceChangeListener;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.util.LaxRedirectStrategyForAllRedirectResponseCodes;
|
||||
|
||||
public class TracTracFinishTimeUpdateHandler extends UpdateHandler {
|
||||
private final static Logger logger = Logger.getLogger(TracTracFinishTimeUpdateHandler.class.getName());
|
||||
public class FinishTimeUpdateHandler extends UpdateHandler {
|
||||
private final static Logger logger = Logger.getLogger(FinishTimeUpdateHandler.class.getName());
|
||||
|
||||
private final static String ACTION_STOP_TRACKING = "end_tracking";
|
||||
private final static String FIELD_TRACKING_END_TIME = "tracking_end_time";
|
||||
@@ -36,9 +35,9 @@ public class TracTracFinishTimeUpdateHandler extends UpdateHandler {
|
||||
*/
|
||||
private final Regatta regatta;
|
||||
|
||||
public TracTracFinishTimeUpdateHandler(URI updateURI, String tracTracUsername, String tracTracPassword,
|
||||
Serializable tracTracEventId, Serializable raceId, Regatta regatta) {
|
||||
super(updateURI, ACTION_STOP_TRACKING, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
public FinishTimeUpdateHandler(URI updateURI, String username, String password,
|
||||
Serializable eventId, Serializable raceId, Regatta regatta) {
|
||||
super(updateURI, ACTION_STOP_TRACKING, username, password, eventId, raceId);
|
||||
this.regatta = regatta;
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
@@ -15,14 +15,14 @@ import org.json.simple.parser.ParseException;
|
||||
import com.sap.sailing.domain.common.racelog.Flags;
|
||||
import com.sap.sailing.domain.tracking.RaceAbortedListener;
|
||||
|
||||
public class TracTracRaceAbortedHandler extends UpdateHandler implements RaceAbortedListener {
|
||||
public class RaceAbortedHandler extends UpdateHandler implements RaceAbortedListener {
|
||||
|
||||
private final static String ACTION = "update_race_status";
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TracTracRaceAbortedHandler.class.getName());
|
||||
private final static Logger logger = Logger.getLogger(RaceAbortedHandler.class.getName());
|
||||
|
||||
public TracTracRaceAbortedHandler(URI updateURI, String tracTracUsername, String tracTracPassword, Serializable tracTracEventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
public RaceAbortedHandler(URI updateURI, String username, String password, Serializable eventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, username, password, eventId, raceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
@@ -13,14 +13,14 @@ import org.json.simple.parser.ParseException;
|
||||
import com.sap.sailing.domain.tracking.StartTimeChangedListener;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
|
||||
public class TracTracStartTimeResetHandler extends UpdateHandler implements StartTimeChangedListener {
|
||||
public class StartTimeResetHandler extends UpdateHandler implements StartTimeChangedListener {
|
||||
|
||||
private static final String ACTION = "resetStartTime";
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TracTracStartTimeResetHandler.class.getName());
|
||||
private final static Logger logger = Logger.getLogger(StartTimeResetHandler.class.getName());
|
||||
|
||||
public TracTracStartTimeResetHandler(URI updateURI, String tracTracUsername, String tracTracPassword, Serializable tracTracEventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
public StartTimeResetHandler(URI updateURI, String username, String password, Serializable eventId, Serializable raceId) {
|
||||
super(updateURI, ACTION, username, password, eventId, raceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@@ -28,8 +28,8 @@ import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.util.LaxRedirectStrategyForAllRedirectResponseCodes;
|
||||
|
||||
public class TracTracStartTimeUpdateHandler extends UpdateHandler implements StartTimeChangedListener {
|
||||
private final static Logger logger = Logger.getLogger(TracTracStartTimeUpdateHandler.class.getName());
|
||||
public class StartTimeUpdateHandler extends UpdateHandler implements StartTimeChangedListener {
|
||||
private final static Logger logger = Logger.getLogger(StartTimeUpdateHandler.class.getName());
|
||||
|
||||
private final static String ACTION = "update_race_start_time";
|
||||
private final static String ACTION_START_TRACKING = "start_tracking";
|
||||
@@ -42,7 +42,7 @@ public class TracTracStartTimeUpdateHandler extends UpdateHandler implements Sta
|
||||
*/
|
||||
private final Regatta regatta;
|
||||
|
||||
public TracTracStartTimeUpdateHandler(URI updateURI, String tracTracUsername, String tracTracPassword,
|
||||
public StartTimeUpdateHandler(URI updateURI, String tracTracUsername, String tracTracPassword,
|
||||
Serializable tracTracEventId, Serializable raceId, Regatta regatta) {
|
||||
super(updateURI, ACTION, tracTracUsername, tracTracPassword, tracTracEventId, raceId);
|
||||
this.regatta = regatta;
|
||||
+2
-2
@@ -50,7 +50,7 @@ import com.sap.sailing.domain.abstractlog.race.analyzing.impl.TrackingTimesFinde
|
||||
import com.sap.sailing.domain.abstractlog.race.impl.RaceLogGateLineOpeningTimeEventImpl;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.RaceState;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.ReadonlyRaceState;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.impl.RaceStateImpl;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.impl.ReadonlyRaceStateImpl;
|
||||
import com.sap.sailing.domain.abstractlog.race.state.racingprocedure.ReadonlyRacingProcedure;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.RegattaLog;
|
||||
import com.sap.sailing.domain.abstractlog.regatta.tracking.analyzing.impl.RegattaLogDefinedMarkAnalyzer;
|
||||
@@ -2975,7 +2975,7 @@ public abstract class TrackedRaceImpl extends TrackedRaceWithWindEssentials impl
|
||||
synchronized (raceStates) {
|
||||
result = raceStates.get(raceLog);
|
||||
if (result == null) {
|
||||
result = RaceStateImpl.create(raceLogResolver, raceLog);
|
||||
result = ReadonlyRaceStateImpl.getOrCreate(raceLogResolver, raceLog);
|
||||
raceStates.put(raceLog, result);
|
||||
}
|
||||
}
|
||||
|
||||
+28
-21
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -25,21 +25,28 @@ import org.json.simple.JSONObject;
|
||||
import org.json.simple.JSONValue;
|
||||
import org.json.simple.parser.ParseException;
|
||||
|
||||
import com.sap.sailing.domain.tractracadapter.UpdateResponse;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
import com.sap.sailing.server.gateway.deserialization.impl.Helpers;
|
||||
import com.sap.sse.common.Duration;
|
||||
|
||||
/**
|
||||
* An update handler can be registered as a listener on a {@link TrackedRace} and can then propagate information to
|
||||
* an external service. This can, e.g., be a tracking partner's system that is interested in receiving race status
|
||||
* updates such as new start times or postponements.
|
||||
*
|
||||
* @author Axel Uhl (d043530)
|
||||
*
|
||||
*/
|
||||
public class UpdateHandler {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(UpdateHandler.class.getName());
|
||||
|
||||
private JsonDeserializer<UpdateResponse> updateDeserializer;
|
||||
private final URI baseURI;
|
||||
private final String tracTracUsername;
|
||||
private final String tracTracPassword;
|
||||
private final Serializable tracTracEventId;
|
||||
private final String username;
|
||||
private final String password;
|
||||
private final Serializable eventId;
|
||||
private final Serializable raceId;
|
||||
private final String action;
|
||||
private final boolean active;
|
||||
@@ -53,16 +60,16 @@ public class UpdateHandler {
|
||||
private final static String ResponseCodeForFailure = "FAILURE";
|
||||
private final static String UpdateUrlTemplate = "%s%s?eventid=%s&raceid=%s&username=%s&password=%s";
|
||||
|
||||
public UpdateHandler(URI updateURI, String action, String tracTracUsername, String tracTracPassword, Serializable tracTracEventId, Serializable raceId) {
|
||||
public UpdateHandler(URI updateURI, String action, String username, String password, Serializable eventId, Serializable raceId) {
|
||||
this.baseURI = updateURI;
|
||||
this.action = action;
|
||||
this.tracTracUsername = tracTracUsername;
|
||||
this.tracTracPassword = tracTracPassword;
|
||||
this.tracTracEventId = tracTracEventId;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.eventId = eventId;
|
||||
this.raceId = raceId;
|
||||
this.updateDeserializer = new UpdateResponseDeserializer();
|
||||
if (updateURI != null && !updateURI.toString().equals("")) {
|
||||
logger.info("Activating TracTrac update handler "+this+" for race with ID "+raceId);
|
||||
logger.info("Activating update handler "+this+" for race with ID "+raceId);
|
||||
this.active = true;
|
||||
} else {
|
||||
this.active = false;
|
||||
@@ -87,10 +94,10 @@ public class UpdateHandler {
|
||||
*/
|
||||
protected List<BasicNameValuePair> getDefaultParametersAsNewList() {
|
||||
final List<BasicNameValuePair> result = new ArrayList<>();
|
||||
result.add(new BasicNameValuePair("eventid", tracTracEventId.toString()));
|
||||
result.add(new BasicNameValuePair("eventid", eventId.toString()));
|
||||
result.add(new BasicNameValuePair("raceid", this.raceId.toString()));
|
||||
result.add(new BasicNameValuePair("username", tracTracUsername));
|
||||
result.add(new BasicNameValuePair("password", tracTracPassword));
|
||||
result.add(new BasicNameValuePair("username", username));
|
||||
result.add(new BasicNameValuePair("password", password));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -103,10 +110,10 @@ public class UpdateHandler {
|
||||
String url = String.format(UpdateUrlTemplate,
|
||||
serverUpdateURI.toString(),
|
||||
this.action,
|
||||
URLEncoder.encode(this.tracTracEventId.toString(), EncodingUtf8),
|
||||
URLEncoder.encode(this.eventId.toString(), EncodingUtf8),
|
||||
URLEncoder.encode(this.raceId.toString(), EncodingUtf8),
|
||||
URLEncoder.encode(tracTracUsername, EncodingUtf8),
|
||||
URLEncoder.encode(tracTracPassword, EncodingUtf8));
|
||||
URLEncoder.encode(username, EncodingUtf8),
|
||||
URLEncoder.encode(password, EncodingUtf8));
|
||||
|
||||
for (Entry<String, String> entry : additionalParameters.entrySet()) {
|
||||
url += String.format("&%s=%s",
|
||||
@@ -123,7 +130,7 @@ public class UpdateHandler {
|
||||
protected void checkAndLogUpdateResponse(HttpURLConnection connection) throws IOException, ParseException {
|
||||
connection.setConnectTimeout(10000/*milliseconds*/);
|
||||
connection.connect();
|
||||
BufferedReader reader = getResponseOnUpdateFromTracTrac(connection);
|
||||
BufferedReader reader = getResponseOnUpdateFromProvider(connection);
|
||||
parseAndLogResponse(reader);
|
||||
}
|
||||
|
||||
@@ -133,13 +140,13 @@ public class UpdateHandler {
|
||||
JSONObject responseObject = Helpers.toJSONObjectSafe(responseBody);
|
||||
UpdateResponse updateResponse = updateDeserializer.deserialize(responseObject);
|
||||
if (updateResponse.getStatus().equals(ResponseCodeForFailure)) {
|
||||
logger.severe("Failed to send data to TracTrac, got following response: " + updateResponse.getMessage());
|
||||
logger.severe("Failed to send data to provider, got following response: " + updateResponse.getMessage());
|
||||
} else {
|
||||
logger.info("Successfully sent data to TracTrac with response: " + updateResponse.getMessage());
|
||||
logger.info("Successfully sent data to provider with response: " + updateResponse.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private BufferedReader getResponseOnUpdateFromTracTrac(HttpURLConnection connection) throws IOException {
|
||||
private BufferedReader getResponseOnUpdateFromProvider(HttpURLConnection connection) throws IOException {
|
||||
InputStream inputStream = connection.getInputStream();
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
return reader;
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
package com.sap.sailing.domain.tractracadapter;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
public interface UpdateResponse {
|
||||
|
||||
String getStatus();
|
||||
|
||||
String getMessage();
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.sap.sailing.domain.tractracadapter.UpdateResponse;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializationException;
|
||||
import com.sap.sailing.server.gateway.deserialization.JsonDeserializer;
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
package com.sap.sailing.domain.tractracadapter.impl;
|
||||
|
||||
import com.sap.sailing.domain.tractracadapter.UpdateResponse;
|
||||
package com.sap.sailing.domain.tracking.impl;
|
||||
|
||||
public class UpdateResponseImpl implements UpdateResponse {
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<name>com.gwtplugins.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
@@ -34,6 +34,6 @@
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -20,16 +20,6 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
@@ -44,7 +34,6 @@
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+1
-1
@@ -75,7 +75,7 @@ public class SailingServiceImplMock extends SailingServiceImpl {
|
||||
public RaceHandle addSwissTimingRace(TrackerManager trackerManager,
|
||||
RegattaIdentifier regattaToAddTo, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, RaceLogStore logStore,
|
||||
RegattaLogStore regattaLogStore, long timeoutInMilliseconds, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination) throws InterruptedException,
|
||||
RegattaLogStore regattaLogStore, long timeoutInMilliseconds, boolean useInternalMarkPassingAlgorithm, boolean trackWind, boolean correctWindDirectionByMagneticDeclination, String updateURL, String updateUsername, String updatePassword) throws InterruptedException,
|
||||
UnknownHostException, IOException, ParseException, Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
|
||||
@@ -20,16 +20,6 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
@@ -44,7 +34,6 @@
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.cdt.launch.launchGroup">
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.0.action" value="NONE"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.0.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.0.mode" value="run"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.0.name" value="SailingGWT sdm"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.1.action" value="NONE"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.1.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.1.mode" value="run"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.1.name" value="Security UI sdm"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.2.action" value="NONE"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.2.enabled" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.2.mode" value="run"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.launchGroup.2.name" value="SailingDashboardsGWT sdm"/>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
</launchConfiguration>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
|
||||
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.CLASSIC_DEVMODE_CODE_SERVER_PORT" value="9876"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT" value="9876"/>
|
||||
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.gwt.ui.PairingList"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.SUPERDEVMODE_ENABLED" value="true"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/Home.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.gwt.ui"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="false"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" javaProject="com.sap.sailing.gwt.ui" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.googlecode.java-diff-utils/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.json.simple/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.udpconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.mongodb/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.operationaltransformation/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.replication/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.geocoding/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.gwt.ui"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.polars.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.annotations/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.ui/src/main/java" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-style PRETTY -incremental -workDir "${project_loc:com.sap.sailing.gwt.ui}/.tmp/gwt-work" -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9876 -startupUrl /gwt/Home.html com.sap.sailing.gwt.home.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/EmbeddedMapAndWindChart com.sap.sailing.gwt.ui.EmbeddedMapAndWindChart -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.regattaoverview.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/YoutubePopup.html com.sap.sailing.gwt.ui.YoutubePopup -startupUrl /gwt/AutoPlay.html com.sap.sailing.gwt.autoplay.AutoPlay -startupUrl /gwt/PairingList.html com.sap.sailing.gwt.ui.PairingList"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms1024m -Xmx3072m -Dgwt.watchFileChanges=false"/>
|
||||
</launchConfiguration>
|
||||
@@ -1,66 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
|
||||
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.CLASSIC_DEVMODE_CODE_SERVER_PORT" value="9876"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT_AUTO" value="true"/>
|
||||
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.gwt.autoplay.AutoPlay"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/Home.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.gwt.ui"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="false"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" javaProject="com.sap.sailing.gwt.ui" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.googlecode.java-diff-utils/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.json.simple/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.udpconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.mongodb/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.operationaltransformation/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.replication/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.geocoding/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.gwt.ui"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.polars.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.annotations/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector.common/src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -incremental -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9876 -startupUrl /gwt/Home.html com.sap.sailing.gwt.home.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.regattaoverview.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /gwt/AutoPlay.html com.sap.sailing.gwt.autoplay.AutoPlay"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -Dgwt-usearchives=false -Dgwt.persistentunitcache=false -Dgwt.watchFileChanges=false"/>
|
||||
</launchConfiguration>
|
||||
+3
-2
@@ -1,10 +1,11 @@
|
||||
package com.sap.sailing.gwt.autoplay.client.configs;
|
||||
|
||||
import com.google.gwt.http.client.UrlBuilder;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.sap.sailing.gwt.autoplay.client.app.AutoPlayClientFactory;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.gwt.client.Notification;
|
||||
import com.sap.sse.gwt.client.Notification.NotificationType;
|
||||
import com.sap.sse.gwt.client.shared.perspective.PerspectiveCompositeSettings;
|
||||
import com.sap.sse.gwt.settings.SettingsToUrlSerializer;
|
||||
import com.sap.sse.gwt.settings.UrlBuilderUtil;
|
||||
@@ -21,7 +22,7 @@ public abstract class AutoPlayConfiguration {
|
||||
public void openSettingsDialog(EventDTO selectedEvent, StrippedLeaderboardDTO leaderboard,
|
||||
OnSettingsCallback holder, PerspectiveCompositeSettings<?> settings, AutoPlayContextDefinition apcd,
|
||||
UserService userService) {
|
||||
Window.alert("This configuration does not have settings");
|
||||
Notification.notify("This configuration does not have settings", NotificationType.WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-4
@@ -137,12 +137,11 @@ public class AutoplayHelper {
|
||||
RaceTimesInfoDTO raceTimes = raceTimesInfos.get(raceIdentifier);
|
||||
boolean notNullInRequiredValues = raceTimes != null && raceTimes.startOfTracking != null
|
||||
&& raceTimes.getStartOfRace() != null;
|
||||
|
||||
boolean raceHasNotEndedOrOnlyRecentlyEnded = raceTimes.endOfRace == null
|
||||
Date endTime = raceTimes.getFinishedTime() != null ? raceTimes.getFinishedTime() : raceTimes.getEndOfRace();
|
||||
boolean raceHasNotEndedOrOnlyRecentlyEnded = endTime == null
|
||||
|| serverTimeDuringRequest.getTime()
|
||||
- raceTimes.delayToLiveInMs < raceTimes.endOfRace.getTime()
|
||||
- raceTimes.delayToLiveInMs < endTime.getTime()
|
||||
+ waitTimeAfterRaceEndInMillis;
|
||||
|
||||
if (notNullInRequiredValues && raceHasNotEndedOrOnlyRecentlyEnded) {
|
||||
long startTimeInMs = raceTimes.getStartOfRace().getTime();
|
||||
long startIn = startTimeInMs - serverTimeDuringRequest.getTime() - raceTimes.delayToLiveInMs;
|
||||
|
||||
+6
-1
@@ -6,8 +6,13 @@
|
||||
<div class="innerContent">
|
||||
<h5 class="articleSubheadline">July 2018</h5>
|
||||
<ul class="bulletList">
|
||||
<li>In <tt>RaceBoard.html</tt> there is a new feature for maneuver loss visualization. There is a setting in the map settings and in the maneuver pop up.
|
||||
<li>The Maneuver Table now uses the same color coding for competitors as the leaderboard to help
|
||||
recognize competitor tracks for selected maneuvers more easily.</li>
|
||||
<li>In <tt>RaceBoard.html</tt> there is a new feature for maneuver loss visualization. There is a setting in the map settings and in the maneuver pop up.</li>
|
||||
<li>In <tt>RaceBoard.html</tt> when zooming into a specific time range, the time slider will provide a "reset zoom" button in expanded mode.</li>
|
||||
<li>Issues with sporadic incorrect zoom/pan states in the Race Board / race viewer have been fixed.</li>
|
||||
<li>Fixed an issue with the "Winning Lanes" mode for large races that could lead to full tails for
|
||||
all competitors to be loaded instead of only the ones for the podium competitors.</li>
|
||||
</ul>
|
||||
|
||||
<h5 class="articleSubheadline">June 2018</h5>
|
||||
|
||||
+17
@@ -50,6 +50,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
.regattacompetition_phase_fleetfullwidth .regattacompetition_phase_fleet_race_title {
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 1.133333333333333em;
|
||||
@@ -178,3 +179,19 @@
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.regattacompetition_phase_fleet_race_title_big {
|
||||
width: 27%;
|
||||
}
|
||||
|
||||
@media (min-width: 375px) {
|
||||
.regattacompetition_phase_fleet_race_title_big {
|
||||
width: 33%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
.regattacompetition_phase_fleet_race_title_big {
|
||||
width: 40%;
|
||||
}
|
||||
}
|
||||
+13
-2
@@ -17,6 +17,9 @@ import com.sap.sailing.gwt.home.shared.partials.regattacompetition.RegattaCompet
|
||||
public class RegattaCompetitionFleet extends AbstractRegattaCompetitionFleet {
|
||||
|
||||
private static RegattaCompetitionFleetUiBinder uiBinder = GWT.create(RegattaCompetitionFleetUiBinder.class);
|
||||
|
||||
private int fleetCount = -1;
|
||||
private RegattaCompetitionFleetRace raceView;
|
||||
|
||||
interface RegattaCompetitionFleetUiBinder extends UiBinder<Widget, RegattaCompetitionFleet> {
|
||||
}
|
||||
@@ -32,8 +35,9 @@ public class RegattaCompetitionFleet extends AbstractRegattaCompetitionFleet {
|
||||
|
||||
@Override
|
||||
public RegattaCompetitionRaceView addRaceView(SimpleRaceMetadataDTO race, RegattaCompetitionPresenter presenter) {
|
||||
RegattaCompetitionFleetRace raceView = new RegattaCompetitionFleetRace(race, presenter);
|
||||
raceView = new RegattaCompetitionFleetRace(race, presenter);
|
||||
raceContainerUi.add(raceView);
|
||||
updateRaceViewIfReady();
|
||||
return raceView;
|
||||
}
|
||||
|
||||
@@ -42,6 +46,8 @@ public class RegattaCompetitionFleet extends AbstractRegattaCompetitionFleet {
|
||||
getElement().getStyle().setWidth(100.0 / fleetCount, Unit.PCT);
|
||||
setStyleName(local_res.css().regattacompetition_phase_fleetfullwidth(), fleetCount < 2);
|
||||
setStyleName(local_res.css().regattacompetition_phase_fleetcompact(), fleetCount > 4);
|
||||
this.fleetCount = fleetCount;
|
||||
updateRaceViewIfReady();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,5 +70,10 @@ public class RegattaCompetitionFleet extends AbstractRegattaCompetitionFleet {
|
||||
protected Element getFleetCornerUiElement() {
|
||||
return fleetCornerUi;
|
||||
}
|
||||
|
||||
|
||||
private void updateRaceViewIfReady() {
|
||||
if (raceView != null && fleetCount > 1) {
|
||||
raceView.removeBigRaceTitleCSS();
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
@@ -65,5 +65,9 @@ public class RegattaCompetitionFleetRace extends AbstractRegattaCompetitionFleet
|
||||
protected String getRaceUntrackedStyleName() {
|
||||
return local_res.css().regattacompetition_phase_fleet_raceuntracked();
|
||||
}
|
||||
|
||||
public void removeBigRaceTitleCSS() {
|
||||
raceNameUi.removeClassName(local_res.css().regattacompetition_phase_fleet_race_title_big());
|
||||
}
|
||||
|
||||
}
|
||||
+10
-10
@@ -1,15 +1,15 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:mp="urn:import:com.sap.sailing.gwt.home.mobile.partials" xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.mobile.partials.regattacompetition.RegattaCompetitionResources" />
|
||||
xmlns:mp="urn:import:com.sap.sailing.gwt.home.mobile.partials" xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.mobile.partials.regattacompetition.RegattaCompetitionResources" />
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race}" style="display:block; text-decoration:none;">
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race_title}" ui:field="raceNameUi"></div>
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race_subtitle}">
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race_state}" ui:field="raceStateUi"></div>
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race_date}" ui:field="raceDateUi"></div>
|
||||
</div>
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race_title} {local_res.css.regattacompetition_phase_fleet_race_title_big}" ui:field="raceNameUi"></div>
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race_subtitle}">
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race_state}" ui:field="raceStateUi"></div>
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race_date}" ui:field="raceDateUi"></div>
|
||||
</div>
|
||||
<div class="{local_res.css.regattacompetition_phase_fleet_race_arrow}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</ui:UiBinder>
|
||||
Loaded 100 of 586 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user