mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-24 06:28:41 +00:00
Merge branch 'master' into bug5214
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/ec2-2.13.50.jar" sourcepath="lib/ec2-2.13.50-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/annotations-2.13.50.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/apache-client-2.13.50.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/arns-2.13.50.jar" sourcepath="lib/arns-2.13.50-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/auth-2.13.50.jar" sourcepath="lib/auth-2.13.50-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/aws-core-2.13.50.jar" sourcepath="lib/aws-core-2.13.50-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/aws-query-protocol-2.13.50.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/aws-xml-protocol-2.13.50.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-codec-1.11.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-logging-1.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/eventstream-1.0.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/http-client-spi-2.13.50.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/httpclient-4.5.9.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/httpcore-4.4.11.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jackson-annotations-2.10.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jackson-core-2.10.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jackson-databind-2.10.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-buffer-4.1.46.Final.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-codec-4.1.46.Final.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-codec-http-4.1.46.Final.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-codec-http2-4.1.46.Final.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-common-4.1.46.Final.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-handler-4.1.46.Final.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-nio-client-2.13.50.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-reactive-streams-2.0.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-reactive-streams-http-2.0.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-resolver-4.1.46.Final.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-transport-4.1.46.Final.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-transport-native-epoll-4.1.46.Final-linux-x86_64.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/netty-transport-native-unix-common-4.1.46.Final.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/profiles-2.13.50.jar" sourcepath="lib/profiles-2.13.50-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/protocol-core-2.13.50.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/reactive-streams-1.0.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/regions-2.13.50.jar" sourcepath="lib/regions-2.13.50-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/s3-2.13.50.jar" sourcepath="lib/s3-2.13.50-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/sdk-core-2.13.50.jar" sourcepath="lib/sdk-core-2.13.50-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.28.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/utils-2.13.50.jar" sourcepath="lib/utils-2.13.50-sources.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.amazon.aws.aws-java-api</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
||||
@@ -0,0 +1,169 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: aws-java-api
|
||||
Bundle-SymbolicName: com.amazon.aws.aws-java-api
|
||||
Bundle-Version: 2.13.50
|
||||
Bundle-Vendor: Amazon
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-ClassPath: .,
|
||||
lib/annotations-2.13.50.jar,
|
||||
lib/apache-client-2.13.50.jar,
|
||||
lib/arns-2.13.50.jar,
|
||||
lib/auth-2.13.50.jar,
|
||||
lib/aws-core-2.13.50.jar,
|
||||
lib/aws-query-protocol-2.13.50.jar,
|
||||
lib/aws-xml-protocol-2.13.50.jar,
|
||||
lib/commons-codec-1.11.jar,
|
||||
lib/commons-logging-1.2.jar,
|
||||
lib/eventstream-1.0.1.jar,
|
||||
lib/http-client-spi-2.13.50.jar,
|
||||
lib/httpclient-4.5.9.jar,
|
||||
lib/httpcore-4.4.11.jar,
|
||||
lib/jackson-annotations-2.10.4.jar,
|
||||
lib/jackson-core-2.10.4.jar,
|
||||
lib/jackson-databind-2.10.4.jar,
|
||||
lib/netty-buffer-4.1.46.Final.jar,
|
||||
lib/netty-codec-4.1.46.Final.jar,
|
||||
lib/netty-codec-http-4.1.46.Final.jar,
|
||||
lib/netty-codec-http2-4.1.46.Final.jar,
|
||||
lib/netty-common-4.1.46.Final.jar,
|
||||
lib/netty-handler-4.1.46.Final.jar,
|
||||
lib/netty-nio-client-2.13.50.jar,
|
||||
lib/netty-reactive-streams-2.0.4.jar,
|
||||
lib/netty-reactive-streams-http-2.0.4.jar,
|
||||
lib/netty-resolver-4.1.46.Final.jar,
|
||||
lib/netty-transport-4.1.46.Final.jar,
|
||||
lib/netty-transport-native-epoll-4.1.46.Final-linux-x86_64.jar,
|
||||
lib/netty-transport-native-unix-common-4.1.46.Final.jar,
|
||||
lib/profiles-2.13.50.jar,
|
||||
lib/protocol-core-2.13.50.jar,
|
||||
lib/reactive-streams-1.0.3.jar,
|
||||
lib/regions-2.13.50.jar,
|
||||
lib/s3-2.13.50.jar,
|
||||
lib/sdk-core-2.13.50.jar,
|
||||
lib/slf4j-api-1.7.28.jar,
|
||||
lib/utils-2.13.50.jar,
|
||||
lib/ec2-2.13.50.jar
|
||||
Automatic-Module-Name: com.amazon.aws.aws-java-api
|
||||
Export-Package: software.amazon.awssdk.annotations,
|
||||
software.amazon.awssdk.arns,
|
||||
software.amazon.awssdk.auth.credentials,
|
||||
software.amazon.awssdk.auth.credentials.internal,
|
||||
software.amazon.awssdk.auth.signer,
|
||||
software.amazon.awssdk.auth.signer.internal,
|
||||
software.amazon.awssdk.auth.signer.params,
|
||||
software.amazon.awssdk.awscore,
|
||||
software.amazon.awssdk.awscore.client.builder,
|
||||
software.amazon.awssdk.awscore.client.config,
|
||||
software.amazon.awssdk.awscore.client.handler,
|
||||
software.amazon.awssdk.awscore.endpoint,
|
||||
software.amazon.awssdk.awscore.eventstream,
|
||||
software.amazon.awssdk.awscore.exception,
|
||||
software.amazon.awssdk.awscore.interceptor,
|
||||
software.amazon.awssdk.awscore.internal,
|
||||
software.amazon.awssdk.awscore.internal.client.config,
|
||||
software.amazon.awssdk.awscore.presigner,
|
||||
software.amazon.awssdk.awscore.retry,
|
||||
software.amazon.awssdk.awscore.retry.conditions,
|
||||
software.amazon.awssdk.awscore.util,
|
||||
software.amazon.awssdk.core,
|
||||
software.amazon.awssdk.core.adapter,
|
||||
software.amazon.awssdk.core.async,
|
||||
software.amazon.awssdk.core.checksums,
|
||||
software.amazon.awssdk.core.client.builder,
|
||||
software.amazon.awssdk.core.client.config,
|
||||
software.amazon.awssdk.core.client.handler,
|
||||
software.amazon.awssdk.core.endpointdiscovery,
|
||||
software.amazon.awssdk.core.endpointdiscovery.providers,
|
||||
software.amazon.awssdk.core.exception,
|
||||
software.amazon.awssdk.core.http,
|
||||
software.amazon.awssdk.core.interceptor,
|
||||
software.amazon.awssdk.core.internal,
|
||||
software.amazon.awssdk.core.internal.async,
|
||||
software.amazon.awssdk.core.internal.capacity,
|
||||
software.amazon.awssdk.core.internal.handler,
|
||||
software.amazon.awssdk.core.internal.http,
|
||||
software.amazon.awssdk.core.internal.http.async,
|
||||
software.amazon.awssdk.core.internal.http.loader,
|
||||
software.amazon.awssdk.core.internal.http.pipeline,
|
||||
software.amazon.awssdk.core.internal.http.pipeline.stages,
|
||||
software.amazon.awssdk.core.internal.http.pipeline.stages.utils,
|
||||
software.amazon.awssdk.core.internal.http.timers,
|
||||
software.amazon.awssdk.core.internal.interceptor,
|
||||
software.amazon.awssdk.core.internal.io,
|
||||
software.amazon.awssdk.core.internal.pagination.async,
|
||||
software.amazon.awssdk.core.internal.retry,
|
||||
software.amazon.awssdk.core.internal.sync,
|
||||
software.amazon.awssdk.core.internal.transform,
|
||||
software.amazon.awssdk.core.internal.util,
|
||||
software.amazon.awssdk.core.io,
|
||||
software.amazon.awssdk.core.pagination.async,
|
||||
software.amazon.awssdk.core.pagination.sync,
|
||||
software.amazon.awssdk.core.protocol,
|
||||
software.amazon.awssdk.core.retry,
|
||||
software.amazon.awssdk.core.retry.backoff,
|
||||
software.amazon.awssdk.core.retry.conditions,
|
||||
software.amazon.awssdk.core.runtime,
|
||||
software.amazon.awssdk.core.runtime.transform,
|
||||
software.amazon.awssdk.core.signer,
|
||||
software.amazon.awssdk.core.sync,
|
||||
software.amazon.awssdk.core.traits,
|
||||
software.amazon.awssdk.core.util,
|
||||
software.amazon.awssdk.core.util.json,
|
||||
software.amazon.awssdk.http,
|
||||
software.amazon.awssdk.http.apache,
|
||||
software.amazon.awssdk.http.apache.internal,
|
||||
software.amazon.awssdk.http.apache.internal.conn,
|
||||
software.amazon.awssdk.http.apache.internal.impl,
|
||||
software.amazon.awssdk.http.apache.internal.net,
|
||||
software.amazon.awssdk.http.apache.internal.utils,
|
||||
software.amazon.awssdk.http.async,
|
||||
software.amazon.awssdk.http.nio.netty,
|
||||
software.amazon.awssdk.http.nio.netty.internal,
|
||||
software.amazon.awssdk.http.nio.netty.internal.http2,
|
||||
software.amazon.awssdk.http.nio.netty.internal.nrs,
|
||||
software.amazon.awssdk.http.nio.netty.internal.utils,
|
||||
software.amazon.awssdk.internal.http,
|
||||
software.amazon.awssdk.profiles,
|
||||
software.amazon.awssdk.profiles.internal,
|
||||
software.amazon.awssdk.protocols.core,
|
||||
software.amazon.awssdk.protocols.query,
|
||||
software.amazon.awssdk.protocols.query.interceptor,
|
||||
software.amazon.awssdk.protocols.query.internal.marshall,
|
||||
software.amazon.awssdk.protocols.query.internal.unmarshall,
|
||||
software.amazon.awssdk.protocols.query.unmarshall,
|
||||
software.amazon.awssdk.protocols.xml,
|
||||
software.amazon.awssdk.protocols.xml.internal.marshall,
|
||||
software.amazon.awssdk.protocols.xml.internal.unmarshall,
|
||||
software.amazon.awssdk.regions,
|
||||
software.amazon.awssdk.regions.internal,
|
||||
software.amazon.awssdk.regions.internal.util,
|
||||
software.amazon.awssdk.regions.partitionmetadata,
|
||||
software.amazon.awssdk.regions.providers,
|
||||
software.amazon.awssdk.regions.regionmetadata,
|
||||
software.amazon.awssdk.regions.servicemetadata,
|
||||
software.amazon.awssdk.regions.util,
|
||||
software.amazon.awssdk.services.ec2,
|
||||
software.amazon.awssdk.services.ec2.model,
|
||||
software.amazon.awssdk.services.ec2.paginators,
|
||||
software.amazon.awssdk.services.ec2.transform,
|
||||
software.amazon.awssdk.services.ec2.transform.internal,
|
||||
software.amazon.awssdk.services.s3,
|
||||
software.amazon.awssdk.services.s3.checksums,
|
||||
software.amazon.awssdk.services.s3.internal,
|
||||
software.amazon.awssdk.services.s3.internal.handlers,
|
||||
software.amazon.awssdk.services.s3.internal.presigner,
|
||||
software.amazon.awssdk.services.s3.internal.resource,
|
||||
software.amazon.awssdk.services.s3.internal.usearnregion,
|
||||
software.amazon.awssdk.services.s3.model,
|
||||
software.amazon.awssdk.services.s3.paginators,
|
||||
software.amazon.awssdk.services.s3.presigner,
|
||||
software.amazon.awssdk.services.s3.presigner.model,
|
||||
software.amazon.awssdk.services.s3.transform,
|
||||
software.amazon.awssdk.utils,
|
||||
software.amazon.awssdk.utils.async,
|
||||
software.amazon.awssdk.utils.builder,
|
||||
software.amazon.awssdk.utils.cache,
|
||||
software.amazon.awssdk.utils.http,
|
||||
software.amazon.awssdk.utils.internal,
|
||||
software.amazon.eventstream
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
This is an OSGi wrapper project around the parts of the AWS Java SDK libraries required by
|
||||
this project. There is a Gradle configuration (build.gradle, settings.gradle). Change to this
|
||||
project's directory (${workspace}/java/com.amazon.aws.aws-java-api) and run
|
||||
|
||||
rm ./lib/*
|
||||
../../gradlew downloadLibs
|
||||
|
||||
This will download all JARs required for the components listed in build.gradle in the
|
||||
dependencies section, such as
|
||||
|
||||
implementation 'software.amazon.awssdk:s3'
|
||||
|
||||
Add more components by adding more lines, such as
|
||||
|
||||
implementation 'software.amazon.awssdk:ec2'
|
||||
|
||||
and repeat the process as needed. Make sure to update build.properties to
|
||||
reference the additional JAR files (which can alternatively be accomplished through the MANIFEST.MF
|
||||
editor's "Runtime" tab).
|
||||
|
||||
To download source JARs which can then be attached, add lines such as the following to the dependencies section:
|
||||
|
||||
implementation group: 'software.amazon.awssdk', name: 's3', classifier: 'sources'
|
||||
|
||||
This will fetch the source JAR corresponding to the s3 code JAR. To attach it, go to the project's
|
||||
build path settings, expand the code JAR's tree node in the "Libraries" tab, select the "Source Attachment"
|
||||
sub-node, click the "Edit" button and select the source JAR that got downloaded. Don't forget to add the
|
||||
source JAR to the git repository.
|
||||
@@ -0,0 +1,24 @@
|
||||
apply plugin: 'java'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation platform('software.amazon.awssdk:bom:2.13.50')
|
||||
implementation 'software.amazon.awssdk:s3'
|
||||
implementation 'software.amazon.awssdk:ec2'
|
||||
implementation group: 'software.amazon.awssdk', name: 'sdk-core', classifier: 'sources'
|
||||
implementation group: 'software.amazon.awssdk', name: 'arns', classifier: 'sources'
|
||||
implementation group: 'software.amazon.awssdk', name: 'aws-core', classifier: 'sources'
|
||||
implementation group: 'software.amazon.awssdk', name: 'auth', classifier: 'sources'
|
||||
implementation group: 'software.amazon.awssdk', name: 's3', classifier: 'sources'
|
||||
implementation group: 'software.amazon.awssdk', name: 'ec2', classifier: 'sources'
|
||||
implementation group: 'software.amazon.awssdk', name: 'regions', classifier: 'sources'
|
||||
implementation group: 'software.amazon.awssdk', name: 'profiles', classifier: 'sources'
|
||||
implementation group: 'software.amazon.awssdk', name: 'utils', classifier: 'sources'
|
||||
}
|
||||
task downloadLibs(type: Copy) {
|
||||
into file('lib')
|
||||
from configurations.runtimeClasspath
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/annotations-2.13.50.jar,\
|
||||
lib/utils-2.13.50.jar,\
|
||||
lib/sdk-core-2.13.50.jar,\
|
||||
lib/s3-2.13.50.jar,\
|
||||
lib/regions-2.13.50.jar,\
|
||||
lib/apache-client-2.13.50.jar,\
|
||||
lib/arns-2.13.50.jar,\
|
||||
lib/auth-2.13.50.jar,\
|
||||
lib/aws-core-2.13.50.jar,\
|
||||
lib/aws-query-protocol-2.13.50.jar,\
|
||||
lib/aws-xml-protocol-2.13.50.jar,\
|
||||
lib/http-client-spi-2.13.50.jar,\
|
||||
lib/netty-nio-client-2.13.50.jar,\
|
||||
lib/profiles-2.13.50.jar,\
|
||||
lib/protocol-core-2.13.50.jar,\
|
||||
lib/commons-codec-1.11.jar,\
|
||||
lib/commons-logging-1.2.jar,\
|
||||
lib/eventstream-1.0.1.jar,\
|
||||
lib/httpclient-4.5.9.jar,\
|
||||
lib/httpcore-4.4.11.jar,\
|
||||
lib/jackson-annotations-2.10.4.jar,\
|
||||
lib/jackson-core-2.10.4.jar,\
|
||||
lib/jackson-databind-2.10.4.jar,\
|
||||
lib/netty-buffer-4.1.46.Final.jar,\
|
||||
lib/netty-codec-4.1.46.Final.jar,\
|
||||
lib/netty-codec-http-4.1.46.Final.jar,\
|
||||
lib/netty-codec-http2-4.1.46.Final.jar,\
|
||||
lib/netty-common-4.1.46.Final.jar,\
|
||||
lib/netty-handler-4.1.46.Final.jar,\
|
||||
lib/netty-reactive-streams-2.0.4.jar,\
|
||||
lib/netty-reactive-streams-http-2.0.4.jar,\
|
||||
lib/netty-resolver-4.1.46.Final.jar,\
|
||||
lib/netty-transport-4.1.46.Final.jar,\
|
||||
lib/netty-transport-native-epoll-4.1.46.Final-linux-x86_64.jar,\
|
||||
lib/netty-transport-native-unix-common-4.1.46.Final.jar,\
|
||||
lib/reactive-streams-1.0.3.jar,\
|
||||
lib/slf4j-api-1.7.28.jar,\
|
||||
lib/ec2-2.13.50.jar
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>root</artifactId>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.amazon.aws.aws-java-api</artifactId>
|
||||
<version>2.13.50</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
@@ -0,0 +1 @@
|
||||
rootProject.name = 'AWS-API-downloader'
|
||||
@@ -4,5 +4,6 @@
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
filesCopiedToWebInfLib=
|
||||
@@ -11,5 +11,6 @@ Import-Package: junit.framework;version="4.8.2",
|
||||
org.junit.runner;version="4.8.2"
|
||||
Require-Bundle: org.mockito.mockito-core;bundle-version="1.9.5",
|
||||
org.hamcrest;bundle-version="1.1.0",
|
||||
com.sap.sse.common
|
||||
com.sap.sse.common,
|
||||
org.objenesis;bundle-version="2.1.0"
|
||||
Automatic-Module-Name: com.sap.sailing.datamining.test
|
||||
|
||||
+10
-24
@@ -10,9 +10,10 @@ import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.sap.sailing.datamining.data.HasLeaderboardGroupContext;
|
||||
@@ -35,7 +36,6 @@ public class TestLeaderboardGroupRetrievalProcessor {
|
||||
public void initializeComponents() {
|
||||
service = mock(RacingEventService.class);
|
||||
stub(service.getLeaderboardGroups()).toReturn(getGroupsInService());
|
||||
|
||||
retrievedGroups = new HashSet<>();
|
||||
Processor<HasLeaderboardGroupContext, Void> receiver = new NullProcessor<HasLeaderboardGroupContext, Void>(HasLeaderboardGroupContext.class, Void.class) {
|
||||
@Override
|
||||
@@ -49,34 +49,20 @@ public class TestLeaderboardGroupRetrievalProcessor {
|
||||
retriever = new LeaderboardGroupRetrievalProcessor(ConcurrencyTestsUtil.getExecutor(), resultReceivers, 0, "");
|
||||
}
|
||||
|
||||
private Map<String, LeaderboardGroup> getGroupsInService() {
|
||||
Map<String, LeaderboardGroup> groups = new HashMap<>();
|
||||
groups.put("LG1", new LeaderboardGroupImpl("LG1", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
groups.put("LG2", new LeaderboardGroupImpl("LG2", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
groups.put("LG3", new LeaderboardGroupImpl("LG3", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
groups.put("LG4", new LeaderboardGroupImpl("LG4", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
groups.put("LG5", new LeaderboardGroupImpl("LG5", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
private Map<UUID, LeaderboardGroup> getGroupsInService() {
|
||||
Map<UUID, LeaderboardGroup> groups = new HashMap<>();
|
||||
for (int i=1; i<=5; i++) {
|
||||
final LeaderboardGroupImpl lg = new LeaderboardGroupImpl("LG"+i, "", /* displayName */ null, false, new ArrayList<Leaderboard>());
|
||||
groups.put(lg.getId(), lg);
|
||||
}
|
||||
return groups;
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testFilteringRetrieval() throws InterruptedException {
|
||||
retriever.processElement(service);
|
||||
retriever.finish();
|
||||
|
||||
Collection<LeaderboardGroup> expectedGroups = getExpectedRetrievedGroups();
|
||||
assertThat(retrievedGroups, is(expectedGroups));
|
||||
final Set<LeaderboardGroup> expectedGroups = new HashSet<>(service.getLeaderboardGroups().values());
|
||||
assertThat(new HashSet<>(retrievedGroups), is(expectedGroups));
|
||||
}
|
||||
|
||||
private Collection<LeaderboardGroup> getExpectedRetrievedGroups() {
|
||||
Collection<LeaderboardGroup> groups = new HashSet<>();
|
||||
groups.add(new LeaderboardGroupImpl("LG1", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
groups.add(new LeaderboardGroupImpl("LG2", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
groups.add(new LeaderboardGroupImpl("LG3", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
groups.add(new LeaderboardGroupImpl("LG4", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
groups.add(new LeaderboardGroupImpl("LG5", "", /* displayName */ null, false, new ArrayList<Leaderboard>()));
|
||||
return groups;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="resources"/>
|
||||
<classpathentry kind="con" path="com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
filesCopiedToWebInfLib=
|
||||
@@ -4,5 +4,6 @@
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
filesCopiedToWebInfLib=
|
||||
+3
@@ -29,6 +29,7 @@ public enum BoatClassMasterdata {
|
||||
BAVARIA_CRUISER_41S ("Bavaria Cruiser 41S", true, 12.35, 3.96, BoatHullType.MONOHULL, true, "B41S", "B 41S", "BAVARIACRUISER41S"),
|
||||
BAVARIA_CRUISER_45 ("Bavaria Cruiser 45", true, 14.27, 4.35, BoatHullType.MONOHULL, true, "B45", "B 45", "BAVARIACRUISER45"),
|
||||
BAVARIA_CRUISER_46 ("Bavaria Cruiser 46", true, 14.27, 4.35, BoatHullType.MONOHULL, true, "B46", "B 46", "BAVARIACRUISER46"),
|
||||
BB10M ("BB 10m", true, 10.00, 2.30, BoatHullType.MONOHULL, true, "Dansk BB10M klub"),
|
||||
CADET ("Cadet", true, 3.20, 1.38, BoatHullType.MONOHULL, true),
|
||||
CANOE_IC ("International Canoe", true, 5.20, 1.01, BoatHullType.MONOHULL, true, "Canoe IC", "Canoe-IC", "IC", "Kanu IC", "International Canoe", "International 10 Sq.m. Sailing Canoe"),
|
||||
CANOE_TAIFUN ("Canoe Taifun", true, 5.20, 1.32, BoatHullType.MONOHULL, false, "Taifun", "Taifun Kanu", "Kanu Taifun"),
|
||||
@@ -105,10 +106,12 @@ public enum BoatClassMasterdata {
|
||||
RS_X ("RS:X", true, 2.86, 0.93, BoatHullType.SURFERBOARD, false, "RS-X", "RSX", "RS:X", "RS:X Men", "RS:X Woman", "RS:X Women"),
|
||||
RS_FEVA ("RS Feva", true, 3.64, 1.42, BoatHullType.MONOHULL, true, "RSFeva"),
|
||||
RS_TERA ("RS Tera", true, 2.87, 1.23, BoatHullType.MONOHULL, true, "RSTera"),
|
||||
SCAN_KAP_99 ("Scan-kap 99", true, 9.86, 2.61, BoatHullType.MONOHULL,true, "Scan Kap 99"),
|
||||
SK_22 ("SK 22", true, 12, 2, BoatHullType.MONOHULL, true, "22er Schärenkreuzer", "22", "SK22", "22 sq.m."),
|
||||
SKUD_18 ("SKUD 18", true, 5.8, 2.29, BoatHullType.MONOHULL, true),
|
||||
SONAR ("Sonar", true, 7.01, 2.39, BoatHullType.MONOHULL, true),
|
||||
SOLING ("Soling", true, 8.15, 1.91, BoatHullType.MONOHULL, true),
|
||||
SPAEKHUGGER ("Spaekhugger", true, 7.44, 2.33, BoatHullType.MONOHULL, false, "Spækhugger", "Spækhuggeren"),
|
||||
SPLASH_BLUE ("Splash Blue", true, 3.50, 1.50, BoatHullType.MONOHULL, false, "Splash_Blue"),
|
||||
SPLASH_RED ("Splash Red", true, 3.50, 1.50, BoatHullType.MONOHULL, false, "Splash_Red"),
|
||||
SPLASH_GREEN ("Splash Green", true, 3.50, 1.50, BoatHullType.MONOHULL, false, "Splash_Green"),
|
||||
|
||||
+1
@@ -10,6 +10,7 @@ public final class ExpeditionAllInOneConstants {
|
||||
public static final String RESPONSE_EVENT_ID = "eventId";
|
||||
public static final String RESPONSE_LEADER_BOARD_NAME = "leaderboardName";
|
||||
public static final String RESPONSE_LEADER_BOARD_GROUP_NAME = "leaderboardGroupName";
|
||||
public static final String RESPONSE_LEADER_BOARD_GROUP_ID = "leaderboardGroupId";
|
||||
public static final String RESPONSE_REGATTA_NAME = "regattaName";
|
||||
public static final String RESPONSE_RACE_LIST = "raceNameRaceColumnNameFleetNameList";
|
||||
public static final String RESPONSE_ERRORS = "errors";
|
||||
|
||||
+34
-10
@@ -487,6 +487,19 @@ public class IncrementalLeaderboardDTO extends LeaderboardDTO implements Increme
|
||||
}
|
||||
}
|
||||
}
|
||||
// replace null values of Regatta specific competitor handicap values with the respective competitor's
|
||||
// default values
|
||||
for (LeaderboardRowDTO row : rows.values()) {
|
||||
if(row != null) {
|
||||
if (row.effectiveTimeOnDistanceAllowancePerNauticalMile == null) {
|
||||
row.effectiveTimeOnDistanceAllowancePerNauticalMile = row.competitor
|
||||
.getTimeOnDistanceAllowancePerNauticalMile();
|
||||
}
|
||||
if (row.effectiveTimeOnTimeFactor == null) {
|
||||
row.effectiveTimeOnTimeFactor = row.competitor.getTimeOnTimeFactor();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -598,16 +611,27 @@ public class IncrementalLeaderboardDTO extends LeaderboardDTO implements Increme
|
||||
// now clone the rows map to enable stripping the LeaderboardEntryDTOs inside
|
||||
HashMap<CompetitorDTO, LeaderboardRowDTO> newRows = new HashMap<>();
|
||||
for (Map.Entry<CompetitorDTO, LeaderboardRowDTO> competitorAndRow : rows.entrySet()) {
|
||||
LeaderboardRowDTO previousRowDTO = previousVersion.rows.get(competitorAndRow.getKey());
|
||||
final CompetitorDTO competitorDTO = competitorAndRow.getKey();
|
||||
final LeaderboardRowDTO previousRowDTO = previousVersion.rows.get(competitorDTO);
|
||||
if (Util.equalsWithNull(competitorAndRow.getValue(), previousRowDTO)
|
||||
// can only compress for competitors that existed in the previous version
|
||||
&& previousVersion.competitors.contains(competitorAndRow.getKey())) {
|
||||
entireRowUnchanged(previousVersion, competitorAndRow.getKey());
|
||||
// And don't enter into newRows. Mark all entries and all leg details in this row as unchanged for compaction of those structures:
|
||||
// And don't enter into newRows. Mark all entries and all leg details in this row as unchanged for
|
||||
// compaction of those structures:
|
||||
} else {
|
||||
LeaderboardRowDTO newRowDTO = new LeaderboardRowDTO();
|
||||
cloner.clone(competitorAndRow.getValue(), newRowDTO);
|
||||
CompetitorDTO compactCompetitor = compactCompetitorMap.get(competitorAndRow.getKey());
|
||||
// if the Regatta specific competitor handicap values are equal to the competitor's default values they
|
||||
// do not need to be transfered reduntantly
|
||||
if (newRowDTO.effectiveTimeOnDistanceAllowancePerNauticalMile != null && newRowDTO.effectiveTimeOnDistanceAllowancePerNauticalMile
|
||||
.equals(competitorDTO.getTimeOnDistanceAllowancePerNauticalMile())) {
|
||||
newRowDTO.effectiveTimeOnDistanceAllowancePerNauticalMile = null;
|
||||
}
|
||||
if (newRowDTO.effectiveTimeOnTimeFactor != null && newRowDTO.effectiveTimeOnTimeFactor.equals(competitorDTO.getTimeOnTimeFactor())) {
|
||||
newRowDTO.effectiveTimeOnTimeFactor = null;
|
||||
}
|
||||
CompetitorDTO compactCompetitor = compactCompetitorMap.get(competitorDTO);
|
||||
newRowDTO.competitor = compactCompetitor;
|
||||
newRows.put(compactCompetitor, newRowDTO);
|
||||
HashMap<String, LeaderboardEntryDTO> newFieldsByRaceColumnName = new HashMap<String, LeaderboardEntryDTO>();
|
||||
@@ -619,12 +643,12 @@ public class IncrementalLeaderboardDTO extends LeaderboardDTO implements Increme
|
||||
if (previousEntryDTO != null
|
||||
&& Util.equalsWithNull(raceColumnNameAndLeaderboardEntry.getValue(), previousEntryDTO)
|
||||
// can only compress for competitors that existed in the previous version
|
||||
&& previousVersion.competitors.contains(competitorAndRow.getKey())) {
|
||||
getUnchangedLeaderboardEntries(previousVersion).unchanged(competitorAndRow.getKey(),
|
||||
&& previousVersion.competitors.contains(competitorDTO)) {
|
||||
getUnchangedLeaderboardEntries(previousVersion).unchanged(competitorDTO,
|
||||
raceColumnNameAndLeaderboardEntry.getKey());
|
||||
// also mark all leg details for the competitor for this column as unchanged; this will ensure
|
||||
// that column compression can work for leg details
|
||||
getLegDetailsUnchanged(previousVersion).unchanged(competitorAndRow.getKey(),
|
||||
getLegDetailsUnchanged(previousVersion).unchanged(competitorDTO,
|
||||
new com.sap.sse.common.Util.Pair<String, Integer>(raceColumnNameAndLeaderboardEntry.getKey(), null));
|
||||
} else {
|
||||
LeaderboardEntryDTO newLeaderboardEntryDTO = new LeaderboardEntryDTO();
|
||||
@@ -643,9 +667,9 @@ public class IncrementalLeaderboardDTO extends LeaderboardDTO implements Increme
|
||||
&& Util.equalsWithNull(legDetails,
|
||||
previousEntryDTO.legDetails.get(legDetailsIndex))
|
||||
// can only compress for competitors that existed in the previous version
|
||||
&& previousVersion.competitors.contains(competitorAndRow.getKey())) {
|
||||
&& previousVersion.competitors.contains(competitorDTO)) {
|
||||
getLegDetailsUnchanged(previousVersion).unchanged(
|
||||
competitorAndRow.getKey(),
|
||||
competitorDTO,
|
||||
new com.sap.sse.common.Util.Pair<String, Integer>(raceColumnNameAndLeaderboardEntry.getKey(),
|
||||
legDetailsIndex));
|
||||
newLeaderboardEntryDTO.legDetails.set(legDetailsIndex, null);
|
||||
@@ -654,12 +678,12 @@ public class IncrementalLeaderboardDTO extends LeaderboardDTO implements Increme
|
||||
} else {
|
||||
if ((previousEntryDTO == null || previousEntryDTO.legDetails == null)
|
||||
// can only compress for competitors that existed in the previous version
|
||||
&& previousVersion.competitors.contains(competitorAndRow.getKey())) {
|
||||
&& previousVersion.competitors.contains(competitorDTO)) {
|
||||
// old and new entry are null; no need to set the legDetails in the new version to null
|
||||
// as it already consumes no space;
|
||||
// however, mark the legDetails as unchanged in legDetailsUnchanged so as to allow for
|
||||
// all-column compression
|
||||
getLegDetailsUnchanged(previousVersion).unchanged(competitorAndRow.getKey(),
|
||||
getLegDetailsUnchanged(previousVersion).unchanged(competitorDTO,
|
||||
new com.sap.sse.common.Util.Pair<String, Integer>(raceColumnNameAndLeaderboardEntry.getKey(), null));
|
||||
}
|
||||
}
|
||||
|
||||
+41
-23
@@ -30,24 +30,29 @@ public class LeaderboardRowDTO implements Serializable {
|
||||
public Double totalDurationFoiledInSeconds;
|
||||
public Double totalDistanceFoiledInMeters;
|
||||
public Integer totalScoredRaces;
|
||||
public Double effectiveTimeOnTimeFactor;
|
||||
public Duration effectiveTimeOnDistanceAllowancePerNauticalMile;
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((boat == null) ? 0 : boat.hashCode());
|
||||
result = prime * result + ((carriedPoints == null) ? 0 : carriedPoints.hashCode());
|
||||
result = prime * result + ((competitor == null) ? 0 : competitor.hashCode());
|
||||
result = prime * result + ((boat == null) ? 0 : boat.hashCode());
|
||||
result = prime * result + ((fieldsByRaceColumnName == null) ? 0 : fieldsByRaceColumnName.hashCode());
|
||||
result = prime * result
|
||||
+ ((maximumSpeedOverGroundInKnots == null) ? 0 : maximumSpeedOverGroundInKnots.hashCode());
|
||||
result = prime * result + ((netPoints == null) ? 0 : netPoints.hashCode());
|
||||
result = prime * result + ((effectiveTimeOnDistanceAllowancePerNauticalMile == null) ? 0
|
||||
: effectiveTimeOnDistanceAllowancePerNauticalMile.hashCode());
|
||||
result = prime * result + ((effectiveTimeOnTimeFactor == null) ? 0 : effectiveTimeOnTimeFactor.hashCode());
|
||||
result = prime * result + ((totalDistanceFoiledInMeters == null) ? 0 : totalDistanceFoiledInMeters.hashCode());
|
||||
result = prime * result
|
||||
+ ((totalDistanceTraveledInMeters == null) ? 0 : totalDistanceTraveledInMeters.hashCode());
|
||||
result = prime * result
|
||||
+ ((totalDurationFoiledInSeconds == null) ? 0 : totalDurationFoiledInSeconds.hashCode());
|
||||
result = prime * result
|
||||
+ ((totalDistanceFoiledInMeters == null) ? 0 : totalDistanceFoiledInMeters.hashCode());
|
||||
result = prime * result + ((netPoints == null) ? 0 : netPoints.hashCode());
|
||||
result = prime * result + ((totalScoredRaces == null) ? 0 : totalScoredRaces.hashCode());
|
||||
result = prime * result
|
||||
+ ((totalTimeSailedDownwindInSeconds == null) ? 0 : totalTimeSailedDownwindInSeconds.hashCode());
|
||||
result = prime * result + ((totalTimeSailedInSeconds == null) ? 0 : totalTimeSailedInSeconds.hashCode());
|
||||
@@ -55,13 +60,11 @@ public class LeaderboardRowDTO implements Serializable {
|
||||
+ ((totalTimeSailedReachingInSeconds == null) ? 0 : totalTimeSailedReachingInSeconds.hashCode());
|
||||
result = prime * result
|
||||
+ ((totalTimeSailedUpwindInSeconds == null) ? 0 : totalTimeSailedUpwindInSeconds.hashCode());
|
||||
result = prime
|
||||
* result
|
||||
+ ((whenMaximumSpeedOverGroundWasAchieved == null) ? 0 : whenMaximumSpeedOverGroundWasAchieved
|
||||
.hashCode());
|
||||
result = prime * result + ((whenMaximumSpeedOverGroundWasAchieved == null) ? 0
|
||||
: whenMaximumSpeedOverGroundWasAchieved.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
@@ -71,6 +74,11 @@ public class LeaderboardRowDTO implements Serializable {
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
LeaderboardRowDTO other = (LeaderboardRowDTO) obj;
|
||||
if (boat == null) {
|
||||
if (other.boat != null)
|
||||
return false;
|
||||
} else if (!boat.equals(other.boat))
|
||||
return false;
|
||||
if (carriedPoints == null) {
|
||||
if (other.carriedPoints != null)
|
||||
return false;
|
||||
@@ -81,11 +89,6 @@ public class LeaderboardRowDTO implements Serializable {
|
||||
return false;
|
||||
} else if (!competitor.equals(other.competitor))
|
||||
return false;
|
||||
if (boat == null) {
|
||||
if (other.boat != null)
|
||||
return false;
|
||||
} else if (!boat.equals(other.boat))
|
||||
return false;
|
||||
if (fieldsByRaceColumnName == null) {
|
||||
if (other.fieldsByRaceColumnName != null)
|
||||
return false;
|
||||
@@ -96,6 +99,26 @@ public class LeaderboardRowDTO implements Serializable {
|
||||
return false;
|
||||
} else if (!maximumSpeedOverGroundInKnots.equals(other.maximumSpeedOverGroundInKnots))
|
||||
return false;
|
||||
if (netPoints == null) {
|
||||
if (other.netPoints != null)
|
||||
return false;
|
||||
} else if (!netPoints.equals(other.netPoints))
|
||||
return false;
|
||||
if (effectiveTimeOnDistanceAllowancePerNauticalMile == null) {
|
||||
if (other.effectiveTimeOnDistanceAllowancePerNauticalMile != null)
|
||||
return false;
|
||||
} else if (!effectiveTimeOnDistanceAllowancePerNauticalMile.equals(other.effectiveTimeOnDistanceAllowancePerNauticalMile))
|
||||
return false;
|
||||
if (effectiveTimeOnTimeFactor == null) {
|
||||
if (other.effectiveTimeOnTimeFactor != null)
|
||||
return false;
|
||||
} else if (!effectiveTimeOnTimeFactor.equals(other.effectiveTimeOnTimeFactor))
|
||||
return false;
|
||||
if (totalDistanceFoiledInMeters == null) {
|
||||
if (other.totalDistanceFoiledInMeters != null)
|
||||
return false;
|
||||
} else if (!totalDistanceFoiledInMeters.equals(other.totalDistanceFoiledInMeters))
|
||||
return false;
|
||||
if (totalDistanceTraveledInMeters == null) {
|
||||
if (other.totalDistanceTraveledInMeters != null)
|
||||
return false;
|
||||
@@ -106,15 +129,10 @@ public class LeaderboardRowDTO implements Serializable {
|
||||
return false;
|
||||
} else if (!totalDurationFoiledInSeconds.equals(other.totalDurationFoiledInSeconds))
|
||||
return false;
|
||||
if (totalDistanceFoiledInMeters == null) {
|
||||
if (other.totalDistanceFoiledInMeters != null)
|
||||
if (totalScoredRaces == null) {
|
||||
if (other.totalScoredRaces != null)
|
||||
return false;
|
||||
} else if (!totalDistanceFoiledInMeters.equals(other.totalDistanceFoiledInMeters))
|
||||
return false;
|
||||
if (netPoints == null) {
|
||||
if (other.netPoints != null)
|
||||
return false;
|
||||
} else if (!netPoints.equals(other.netPoints))
|
||||
} else if (!totalScoredRaces.equals(other.totalScoredRaces))
|
||||
return false;
|
||||
if (totalTimeSailedDownwindInSeconds == null) {
|
||||
if (other.totalTimeSailedDownwindInSeconds != null)
|
||||
@@ -143,7 +161,7 @@ public class LeaderboardRowDTO implements Serializable {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public Distance getDistanceTraveled(String raceColumnName) {
|
||||
final Distance result;
|
||||
LeaderboardEntryDTO fieldsForRace = fieldsByRaceColumnName.get(raceColumnName);
|
||||
|
||||
+18
-20
@@ -24,14 +24,12 @@ public class MasterDataImportObjectCreationCountImpl implements MasterDataImport
|
||||
private int regattaCount = 0;
|
||||
private int mediaTrackCount = 0;
|
||||
private int trackedRacesCount = 0;
|
||||
|
||||
private Set<String> createdLeaderboards = new HashSet<String>();
|
||||
private Set<String> createdLeaderboardGroups = new HashSet<String>();
|
||||
private Set<String> createdEvents = new HashSet<String>();
|
||||
private Set<String> createdRegattas = new HashSet<String>();
|
||||
private Set<String> createdTrackedRaces = new HashSet<String>();
|
||||
|
||||
private Set<String> overwrittenRegattas = new HashSet<String>();
|
||||
private Set<String> createdLeaderboards = new HashSet<>();
|
||||
private Set<String> createdLeaderboardGroups = new HashSet<>();
|
||||
private Set<String> createdEvents = new HashSet<>();
|
||||
private Set<String> createdRegattas = new HashSet<>();
|
||||
private Set<String> createdTrackedRaces = new HashSet<>();
|
||||
private Set<String> overwrittenRegattas = new HashSet<>();
|
||||
|
||||
//For GWT serialization
|
||||
public MasterDataImportObjectCreationCountImpl() {};
|
||||
@@ -46,18 +44,18 @@ public class MasterDataImportObjectCreationCountImpl implements MasterDataImport
|
||||
leaderboardGroupCount++;
|
||||
}
|
||||
|
||||
public void addOneEvent(String id) {
|
||||
createdEvents.add(id);
|
||||
public void addOneEvent(String idAsString) {
|
||||
createdEvents.add(idAsString);
|
||||
eventCount++;
|
||||
}
|
||||
|
||||
public void addOneRegatta(String id) {
|
||||
createdRegattas.add(id);
|
||||
public void addOneRegatta(String idAsString) {
|
||||
createdRegattas.add(idAsString);
|
||||
regattaCount++;
|
||||
}
|
||||
|
||||
public void addOneTrackedRace(String id) {
|
||||
createdTrackedRaces.add(id);
|
||||
public void addOneTrackedRace(String idAsString) {
|
||||
createdTrackedRaces.add(idAsString);
|
||||
trackedRacesCount++;
|
||||
}
|
||||
|
||||
@@ -87,16 +85,16 @@ public class MasterDataImportObjectCreationCountImpl implements MasterDataImport
|
||||
return createdLeaderboardGroups.contains(name);
|
||||
}
|
||||
|
||||
public boolean alreadyAddedEventWithId(String id) {
|
||||
return createdEvents.contains(id);
|
||||
public boolean alreadyAddedEventWithId(String idAsString) {
|
||||
return createdEvents.contains(idAsString);
|
||||
}
|
||||
|
||||
public boolean alreadyAddedRegattaWithId(String id) {
|
||||
return createdRegattas.contains(id);
|
||||
public boolean alreadyAddedRegattaWithId(String idAsString) {
|
||||
return createdRegattas.contains(idAsString);
|
||||
}
|
||||
|
||||
public boolean alreadyAddedTrackedRaceWithId(String id) {
|
||||
return createdTrackedRaces.contains(id);
|
||||
public boolean alreadyAddedTrackedRaceWithId(String idAsString) {
|
||||
return createdTrackedRaces.contains(idAsString);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-1
@@ -50,7 +50,9 @@ public class ORCPerformanceCurveCourseImpl implements ORCPerformanceCurveCourse
|
||||
}
|
||||
resultLegs.add(potentiallyReplacedLeg);
|
||||
}
|
||||
resultLegs.add(lastFinishedLeg.scale(shareOfCurrentLeg));
|
||||
if (shareOfCurrentLeg > 0) {
|
||||
resultLegs.add(lastFinishedLeg.scale(shareOfCurrentLeg));
|
||||
}
|
||||
return new ORCPerformanceCurveCourseImpl(resultLegs);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-1
@@ -3,6 +3,7 @@ package com.sap.sailing.domain.deckmanadapter;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import com.sap.sailing.domain.common.Position;
|
||||
@@ -37,7 +38,11 @@ public class Record implements Timed, Positioned {
|
||||
|
||||
public Record(Map<FieldType, String> fieldsAsString) throws ParseException {
|
||||
this.fieldsAsString = fieldsAsString;
|
||||
timePoint = new MillisecondsTimePoint(dateFormat.parse(this.fieldsAsString.get(FieldType.date)));
|
||||
final Date date;
|
||||
synchronized (dateFormat) {
|
||||
date = dateFormat.parse(this.fieldsAsString.get(FieldType.date));
|
||||
}
|
||||
timePoint = new MillisecondsTimePoint(date);
|
||||
position = new DegreePosition(Double.valueOf(this.fieldsAsString.get(FieldType.latitude)),
|
||||
Double.valueOf(this.fieldsAsString.get(FieldType.longitude)));
|
||||
final SpeedWithBearing speed = new KnotSpeedWithBearingImpl(Double.valueOf(this.fieldsAsString.get(FieldType.sog)),
|
||||
|
||||
+4
-4
@@ -62,14 +62,14 @@ public interface MongoObjectFactory {
|
||||
void storeLeaderboardGroup(LeaderboardGroup leaderboardGroup);
|
||||
|
||||
/**
|
||||
* Removes the group with the name <code>groupName</code> from the database.
|
||||
* Removes the group with the ID <code>leaderboardGroupId</code> from the database.
|
||||
*/
|
||||
void removeLeaderboardGroup(String groupName);
|
||||
void removeLeaderboardGroup(UUID leaderboardGroupId);
|
||||
|
||||
/**
|
||||
* Renames the group with the name <code>oldName</code>.
|
||||
* Renames the group with the ID <code>leaderboardGroupId</code>.
|
||||
*/
|
||||
void renameLeaderboardGroup(String oldName, String newName);
|
||||
void renameLeaderboardGroup(UUID leaderboardGroupId, String newName);
|
||||
|
||||
/**
|
||||
* Stores the event with its name, venue and the venue's course areas, as well as the links to the
|
||||
|
||||
+8
-4
@@ -2149,7 +2149,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
|
||||
}
|
||||
}
|
||||
|
||||
private RegattaLogEvent loadRegattaLogEvent(Document o, RegattaLikeIdentifier regattaLogIdentifier)
|
||||
public RegattaLogEvent loadRegattaLogEvent(Document o, RegattaLikeIdentifier regattaLogIdentifier)
|
||||
throws JsonDeserializationException, ParseException {
|
||||
Document dbObject = (Document) o.get(FieldNames.REGATTA_LOG_EVENT.name());
|
||||
TimePoint logicalTimePoint = loadTimePoint(dbObject);
|
||||
@@ -2158,7 +2158,11 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
|
||||
final AbstractLogEventAuthor author;
|
||||
String authorName = (String) dbObject.get(FieldNames.REGATTA_LOG_EVENT_AUTHOR_NAME.name());
|
||||
Number authorPriority = (Number) dbObject.get(FieldNames.REGATTA_LOG_EVENT_AUTHOR_PRIORITY.name());
|
||||
author = new LogEventAuthorImpl(authorName, authorPriority.intValue());
|
||||
if (authorName != null && authorPriority != null) {
|
||||
author = new LogEventAuthorImpl(authorName, authorPriority.intValue());
|
||||
} else {
|
||||
author = LogEventAuthorImpl.createCompatibilityAuthor();
|
||||
}
|
||||
// CloseOpenEnded, DeviceCompMapping, DeviceMarkMapping, RegisterComp, Revoke
|
||||
String eventClass = (String) dbObject.get(FieldNames.REGATTA_LOG_EVENT_CLASS.name());
|
||||
if (eventClass.equals(RegattaLogDeviceCompetitorMappingEvent.class.getSimpleName())) {
|
||||
@@ -2221,7 +2225,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
|
||||
return boat;
|
||||
}
|
||||
|
||||
private RegattaLogEvent loadRegattaLogSetCompetitorTimeOnDistanceAllowancePerNauticalMileEvent(TimePoint createdAt,
|
||||
private RegattaLogEvent loadRegattaLogSetCompetitorTimeOnTimeFactorEvent(TimePoint createdAt,
|
||||
AbstractLogEventAuthor author, TimePoint logicalTimePoint, Serializable id, Document dbObject) {
|
||||
final Competitor comp = getCompetitorByID(dbObject);
|
||||
final Number timeOnTimeFactorAsNumber = (Number) dbObject.get(FieldNames.REGATTA_LOG_TIME_ON_TIME_FACTOR.name());
|
||||
@@ -2230,7 +2234,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
|
||||
timeOnTimeFactor);
|
||||
}
|
||||
|
||||
private RegattaLogEvent loadRegattaLogSetCompetitorTimeOnTimeFactorEvent(TimePoint createdAt,
|
||||
private RegattaLogEvent loadRegattaLogSetCompetitorTimeOnDistanceAllowancePerNauticalMileEvent(TimePoint createdAt,
|
||||
AbstractLogEventAuthor author, TimePoint logicalTimePoint, Serializable id, Document dbObject) {
|
||||
final Competitor comp = getCompetitorByID(dbObject);
|
||||
final Number timeOnDistanceSecondsAllowancePerNauticalMileAsNumber = (Number) dbObject
|
||||
|
||||
+43
-35
@@ -542,16 +542,16 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeLeaderboardGroup(String groupName) {
|
||||
public void removeLeaderboardGroup(UUID leaderboardGroupId) {
|
||||
MongoCollection<Document> leaderboardGroupCollection = database.getCollection(CollectionNames.LEADERBOARD_GROUPS.name());
|
||||
Document query = new Document(FieldNames.LEADERBOARD_GROUP_NAME.name(), groupName);
|
||||
Document query = new Document(FieldNames.LEADERBOARD_GROUP_UUID.name(), leaderboardGroupId);
|
||||
leaderboardGroupCollection.deleteOne(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renameLeaderboardGroup(String oldName, String newName) {
|
||||
public void renameLeaderboardGroup(UUID leaderboardGroupId, String newName) {
|
||||
MongoCollection<Document> leaderboardGroupCollection = database.getCollection(CollectionNames.LEADERBOARD_GROUPS.name());
|
||||
Document query = new Document(FieldNames.LEADERBOARD_GROUP_NAME.name(), oldName);
|
||||
Document query = new Document(FieldNames.LEADERBOARD_GROUP_UUID.name(), leaderboardGroupId);
|
||||
Document update = new Document("$set", new Document(FieldNames.LEADERBOARD_GROUP_NAME.name(), newName));
|
||||
leaderboardGroupCollection.withWriteConcern(WriteConcern.ACKNOWLEDGED).updateOne(query, update, new UpdateOptions().upsert(true));
|
||||
}
|
||||
@@ -827,6 +827,13 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
dbObject.put(FieldNames.RACE_LOG_EVENT_AUTHOR_PRIORITY.name(), author.getPriority());
|
||||
}
|
||||
}
|
||||
|
||||
private void storeRegattaLogEventAuthor(Document dbObject, AbstractLogEventAuthor author) {
|
||||
if (author != null) {
|
||||
dbObject.put(FieldNames.REGATTA_LOG_EVENT_AUTHOR_NAME.name(), author.getName());
|
||||
dbObject.put(FieldNames.REGATTA_LOG_EVENT_AUTHOR_PRIORITY.name(), author.getPriority());
|
||||
}
|
||||
}
|
||||
|
||||
public Document storeRaceLogEntry(RaceLogIdentifier raceLogIdentifier, RaceLogFlagEvent flagEvent) {
|
||||
Document result = new Document();
|
||||
@@ -1619,11 +1626,10 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
|
||||
private Document createBasicRegattaLogEventDBObject(RegattaLogEvent event) {
|
||||
Document result = new Document();
|
||||
storeTimed(event, result);
|
||||
storeTimePoint(event.getLogicalTimePoint(), result, FieldNames.TIME_AS_MILLIS);
|
||||
storeTimePoint(event.getCreatedAt(), result, FieldNames.REGATTA_LOG_EVENT_CREATED_AT);
|
||||
storeRegattaLogEventAuthor(result, event.getAuthor());
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_ID.name(), event.getId());
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_AUTHOR_NAME.name(), event.getAuthor().getName());
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_AUTHOR_PRIORITY.name(), event.getAuthor().getPriority());
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1632,91 +1638,93 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
toObject.put(FieldNames.REGATTA_LOG_IDENTIFIER_NAME.name(), regattaLikeId.getName());
|
||||
}
|
||||
|
||||
private void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, Document innerObject) {
|
||||
private Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, Document innerObject) {
|
||||
Document result = new Document(FieldNames.REGATTA_LOG_EVENT.name(), innerObject);
|
||||
addRegattaLikeIdentifier(regattaLikeId, result);
|
||||
getRegattaLogCollection().insertOne(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogDeviceCompetitorMappingEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogDeviceCompetitorMappingEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogDeviceCompetitorMappingEvent.class.getSimpleName());
|
||||
storeDeviceMappingEvent(event, result, FieldNames.REGATTA_LOG_FROM, FieldNames.REGATTA_LOG_TO);
|
||||
result.put(FieldNames.COMPETITOR_ID.name(), event.getMappedTo().getId());
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogDeviceBoatMappingEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogDeviceBoatMappingEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogDeviceBoatMappingEvent.class.getSimpleName());
|
||||
storeDeviceMappingEvent(event, result, FieldNames.REGATTA_LOG_FROM, FieldNames.REGATTA_LOG_TO);
|
||||
result.put(FieldNames.RACE_LOG_BOAT_ID.name(), event.getMappedTo().getId());
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId,
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId,
|
||||
RegattaLogDeviceCompetitorSensorDataMappingEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), event.getClass().getSimpleName());
|
||||
storeDeviceMappingEvent(event, result, FieldNames.REGATTA_LOG_FROM, FieldNames.REGATTA_LOG_TO);
|
||||
result.put(FieldNames.COMPETITOR_ID.name(), event.getMappedTo().getId());
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId,
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId,
|
||||
RegattaLogDeviceBoatSensorDataMappingEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), event.getClass().getSimpleName());
|
||||
storeDeviceMappingEvent(event, result, FieldNames.REGATTA_LOG_FROM, FieldNames.REGATTA_LOG_TO);
|
||||
result.put(FieldNames.RACE_LOG_BOAT_ID.name(), event.getMappedTo().getId());
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogDeviceMarkMappingEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogDeviceMarkMappingEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogDeviceMarkMappingEvent.class.getSimpleName());
|
||||
storeDeviceMappingEvent(event, result, FieldNames.REGATTA_LOG_FROM, FieldNames.REGATTA_LOG_TO);
|
||||
result.put(FieldNames.MARK.name(), storeMark(event.getMappedTo()));
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogRevokeEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogRevokeEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogRevokeEvent.class.getSimpleName());
|
||||
result.put(FieldNames.REGATTA_LOG_REVOKED_EVENT_ID.name(), event.getRevokedEventId());
|
||||
result.put(FieldNames.REGATTA_LOG_REVOKED_EVENT_TYPE.name(), event.getRevokedEventType());
|
||||
result.put(FieldNames.REGATTA_LOG_REVOKED_EVENT_SHORT_INFO.name(), event.getRevokedEventShortInfo());
|
||||
result.put(FieldNames.REGATTA_LOG_REVOKED_REASON.name(), event.getReason());
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogRegisterBoatEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogRegisterBoatEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogRegisterBoatEvent.class.getSimpleName());
|
||||
result.put(FieldNames.REGATTA_LOG_BOAT_ID.name(), event.getBoat().getId());
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogRegisterCompetitorEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogRegisterCompetitorEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogRegisterCompetitorEvent.class.getSimpleName());
|
||||
result.put(FieldNames.REGATTA_LOG_COMPETITOR_ID.name(), event.getCompetitor().getId());
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogCloseOpenEndedDeviceMappingEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogCloseOpenEndedDeviceMappingEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogCloseOpenEndedDeviceMappingEvent.class.getSimpleName());
|
||||
result.put(FieldNames.REGATTA_LOG_DEVICE_MAPPING_EVENT_ID.name(), event.getDeviceMappingEventId());
|
||||
storeTimePoint(event.getClosingTimePointInclusive(), result, FieldNames.REGATTA_LOG_CLOSING_TIMEPOINT);
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogSetCompetitorTimeOnTimeFactorEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogSetCompetitorTimeOnTimeFactorEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogCloseOpenEndedDeviceMappingEvent.class.getSimpleName());
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogSetCompetitorTimeOnTimeFactorEvent.class.getSimpleName());
|
||||
result.put(FieldNames.REGATTA_LOG_COMPETITOR_ID.name(), event.getCompetitor().getId());
|
||||
result.put(FieldNames.REGATTA_LOG_TIME_ON_TIME_FACTOR.name(), event.getTimeOnTimeFactor());
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public Document storeRaceLogEntry(RaceLogIdentifier raceLogIdentifier, RaceLogDependentStartTimeEvent event) {
|
||||
@@ -1726,19 +1734,19 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogSetCompetitorTimeOnDistanceAllowancePerNauticalMileEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeId, RegattaLogSetCompetitorTimeOnDistanceAllowancePerNauticalMileEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogCloseOpenEndedDeviceMappingEvent.class.getSimpleName());
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogSetCompetitorTimeOnDistanceAllowancePerNauticalMileEvent.class.getSimpleName());
|
||||
result.put(FieldNames.REGATTA_LOG_COMPETITOR_ID.name(), event.getCompetitor().getId());
|
||||
result.put(FieldNames.REGATTA_LOG_TIME_ON_DISTANCE_SECONDS_ALLOWANCE_PER_NAUTICAL_MILE.name(), event.getTimeOnDistanceAllowancePerNauticalMile().asSeconds());
|
||||
storeRegattaLogEvent(regattaLikeId, result);
|
||||
return storeRegattaLogEvent(regattaLikeId, result);
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeIdentifier, RegattaLogDefineMarkEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeIdentifier, RegattaLogDefineMarkEvent event) {
|
||||
Document result = createBasicRegattaLogEventDBObject(event);
|
||||
result.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogDefineMarkEvent.class.getSimpleName());
|
||||
result.put(FieldNames.REGATTA_LOG_MARK.name(), storeMark(event.getMark()));
|
||||
storeRegattaLogEvent(regattaLikeIdentifier, result);
|
||||
return storeRegattaLogEvent(regattaLikeIdentifier, result);
|
||||
}
|
||||
|
||||
private Document createImageObject(ImageDescriptor image) {
|
||||
@@ -1873,12 +1881,12 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeIdentifier, RegattaLogORCCertificateAssignmentEvent event) {
|
||||
public Document storeRegattaLogEvent(RegattaLikeIdentifier regattaLikeIdentifier, RegattaLogORCCertificateAssignmentEvent event) {
|
||||
Document document = createBasicRegattaLogEventDBObject(event);
|
||||
document.put(FieldNames.REGATTA_LOG_EVENT_CLASS.name(), RegattaLogORCCertificateAssignmentEvent.class.getSimpleName());
|
||||
document.append(FieldNames.RACE_LOG_BOAT_ID.name(), event.getBoatId());
|
||||
document.append(FieldNames.ORC_CERTIFICATE.name(), createORCCertificateObject(event.getCertificate()));
|
||||
storeRegattaLogEvent(regattaLikeIdentifier, document);
|
||||
return storeRegattaLogEvent(regattaLikeIdentifier, document);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -25,4 +25,9 @@ public abstract class RegattaLogSetCompetitorHandicapInfoEventImpl extends Abstr
|
||||
public Competitor getCompetitor() {
|
||||
return competitor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getShortInfo() {
|
||||
return "competitor: " + competitor;
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -31,5 +31,10 @@ public class RegattaLogSetCompetitorTimeOnDistanceAllowancePerNauticalMileEventI
|
||||
public Duration getTimeOnDistanceAllowancePerNauticalMile() {
|
||||
return timeOnDistanceAllowancePerNauticalMile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getShortInfo() {
|
||||
return super.getShortInfo() + ", timeOnDistanceAllowancePerNauticalMile: " + timeOnDistanceAllowancePerNauticalMile;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -30,4 +30,9 @@ public class RegattaLogSetCompetitorTimeOnTimeFactorEventImpl extends RegattaLog
|
||||
public Double getTimeOnTimeFactor() {
|
||||
return timeOnTimeFactor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getShortInfo() {
|
||||
return super.getShortInfo() + ", timeOnTimeFactor: " + timeOnTimeFactor;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -182,7 +182,8 @@ public class SharedDomainFactoryImpl<RLR extends RaceLogResolver> implements Sha
|
||||
public Mark getOrCreateMark(Serializable id, String name, String shortName, MarkType type, Color color, String shape, String pattern) {
|
||||
Mark result = markCache.get(id);
|
||||
if (result == null) {
|
||||
result = new MarkImpl(id, name, type, color, shape, pattern);
|
||||
result = new MarkImpl(id, name, shortName, type, color, shape, pattern,
|
||||
/* original mark template ID */ null, /* original mark properties ID */ null);
|
||||
cacheMark(id, result);
|
||||
}
|
||||
return result;
|
||||
|
||||
+18
-8
@@ -109,19 +109,23 @@ public class MessageFileServiceImpl implements MessageFileService {
|
||||
|
||||
private RPDMessage getRPDMessage(SailMasterMessage message) throws ParseException {
|
||||
String[] sections = message.getSections();
|
||||
|
||||
String raceID = sections[1];
|
||||
int status = Integer.valueOf(sections[2]);
|
||||
|
||||
String sec3 = sections[3];
|
||||
String sdataTimeStringWithoutColon = sec3.substring(0, sec3.length() - 3)
|
||||
+ sec3.substring(sec3.length() - 2, sec3.length());
|
||||
System.out.println(sdataTimeStringWithoutColon);
|
||||
Date timePoint = dateFormat.parse(sdataTimeStringWithoutColon);
|
||||
final Date timePoint;
|
||||
synchronized (dateFormat) {
|
||||
timePoint = dateFormat.parse(sdataTimeStringWithoutColon);
|
||||
}
|
||||
// Date startTimeEstimatedStartTime = timeFormat.parse(sections[4]);
|
||||
Date startTimeEstimatedStartTime = sections[4].trim().length() == 0 ? null : timeFormat.parse(sections[4]);
|
||||
Long millisecondsSinceRaceStart = sections[5].trim().length() == 0 ? null : timeFormat.parse(sections[5])
|
||||
.getTime();
|
||||
final Date startTimeEstimatedStartTime;
|
||||
final Long millisecondsSinceRaceStart;
|
||||
synchronized (timeFormat) {
|
||||
startTimeEstimatedStartTime= sections[4].trim().length() == 0 ? null : timeFormat.parse(sections[4]);
|
||||
millisecondsSinceRaceStart = sections[5].trim().length() == 0 ? null : timeFormat.parse(sections[5]).getTime();
|
||||
}
|
||||
Integer nextMarkIndexForLeader = sections[6].trim().length() == 0 ? null : Integer.valueOf(sections[6]);
|
||||
Distance distanceToNextMarkForLeader = sections[7].trim().length() == 0 ? null : new MeterDistance(
|
||||
Double.valueOf(sections[7]));
|
||||
@@ -232,8 +236,11 @@ public class MessageFileServiceImpl implements MessageFileService {
|
||||
for (int i = 0; i < count; i++) {
|
||||
String[] clockAtMarkDetail = message.getSections()[3 + i].split(";");
|
||||
int markIndex = Integer.valueOf(clockAtMarkDetail[0]);
|
||||
Date timePoint = clockAtMarkDetail.length <= 1 || clockAtMarkDetail[1].trim().length() == 0 ? null
|
||||
final Date timePoint;
|
||||
synchronized (timeFormat) {
|
||||
timePoint = clockAtMarkDetail.length <= 1 || clockAtMarkDetail[1].trim().length() == 0 ? null
|
||||
: timeFormat.parse(clockAtMarkDetail[1]);
|
||||
}
|
||||
result.add(new ClockAtMarkElement(markIndex, timePoint, clockAtMarkDetail.length <= 2 ? null
|
||||
: clockAtMarkDetail[2]));
|
||||
}
|
||||
@@ -250,7 +257,10 @@ public class MessageFileServiceImpl implements MessageFileService {
|
||||
Integer markIndex = details.length <= 0 || details[0].trim().length() == 0 ? null : Integer
|
||||
.valueOf(details[0]);
|
||||
Integer rank = details.length <= 1 || details[1].trim().length() == 0 ? null : Integer.valueOf(details[1]);
|
||||
Date timeSinceStart = details[2].trim().length() == 0 ? null : timeFormat.parse(details[2]);
|
||||
final Date timeSinceStart;
|
||||
synchronized (timeFormat) {
|
||||
timeSinceStart = details[2].trim().length() == 0 ? null : timeFormat.parse(details[2]);
|
||||
}
|
||||
timingDataelementList.add(new TimingDataElement(markIndex == null ? 0 : markIndex, rank == null ? 0 : rank, timeSinceStart));
|
||||
}
|
||||
return new TMDMessage(raceID, boatID, timingDataelementList);
|
||||
|
||||
+50
-2
@@ -153,11 +153,59 @@ public class LeaderboardDTODiffingTest {
|
||||
assertNull(nullRaceColumn); // there were no changes to the columns; expect all of them to have been eliminiated
|
||||
}
|
||||
LeaderboardDTO applied = newVersion.getLeaderboardDTO(previousVersion);
|
||||
assertEquals(rowsBeforeStripping, applied.rows);
|
||||
assertFieldsOfLeaderboardRowDTO(rowsBeforeStripping, applied.rows);
|
||||
assertNotSame(raceListBeforeStripping, applied.getRaceList());
|
||||
assertEquals(raceListBeforeStripping, applied.getRaceList());
|
||||
}
|
||||
|
||||
private void assertFieldsOfLeaderboardRowDTO(Map<CompetitorDTO, LeaderboardRowDTO> rowsBeforeStripping,
|
||||
Map<CompetitorDTO, LeaderboardRowDTO> rowsAfterApplication) {
|
||||
assertEquals(rowsBeforeStripping.keySet(), rowsAfterApplication.keySet());
|
||||
for (CompetitorDTO competitor : rowsBeforeStripping.keySet()) {
|
||||
LeaderboardRowDTO leaderboardRowDTOBefore = rowsBeforeStripping.get(competitor);
|
||||
LeaderboardRowDTO leaderboardRowDTOAfter = rowsAfterApplication.get(competitor);
|
||||
assertEquals(leaderboardRowDTOBefore.boat, leaderboardRowDTOAfter.boat);
|
||||
assertEquals(leaderboardRowDTOBefore.carriedPoints, leaderboardRowDTOAfter.carriedPoints);
|
||||
assertEquals(leaderboardRowDTOBefore.competitor, leaderboardRowDTOAfter.competitor);
|
||||
assertEquals(leaderboardRowDTOBefore.fieldsByRaceColumnName, leaderboardRowDTOAfter.fieldsByRaceColumnName);
|
||||
assertEquals(leaderboardRowDTOBefore.maximumSpeedOverGroundInKnots,
|
||||
leaderboardRowDTOAfter.maximumSpeedOverGroundInKnots);
|
||||
assertEquals(leaderboardRowDTOBefore.netPoints, leaderboardRowDTOAfter.netPoints);
|
||||
assertEquals(leaderboardRowDTOBefore.totalDistanceFoiledInMeters,
|
||||
leaderboardRowDTOAfter.totalDistanceFoiledInMeters);
|
||||
assertEquals(leaderboardRowDTOBefore.totalDistanceTraveledInMeters,
|
||||
leaderboardRowDTOAfter.totalDistanceTraveledInMeters);
|
||||
assertEquals(leaderboardRowDTOBefore.totalDurationFoiledInSeconds,
|
||||
leaderboardRowDTOAfter.totalDurationFoiledInSeconds);
|
||||
assertEquals(leaderboardRowDTOBefore.totalScoredRaces, leaderboardRowDTOAfter.totalScoredRaces);
|
||||
assertEquals(leaderboardRowDTOBefore.totalTimeSailedDownwindInSeconds,
|
||||
leaderboardRowDTOAfter.totalTimeSailedDownwindInSeconds);
|
||||
assertEquals(leaderboardRowDTOBefore.totalTimeSailedInSeconds,
|
||||
leaderboardRowDTOAfter.totalTimeSailedInSeconds);
|
||||
assertEquals(leaderboardRowDTOBefore.totalTimeSailedReachingInSeconds,
|
||||
leaderboardRowDTOAfter.totalTimeSailedReachingInSeconds);
|
||||
assertEquals(leaderboardRowDTOBefore.totalTimeSailedUpwindInSeconds,
|
||||
leaderboardRowDTOAfter.totalTimeSailedUpwindInSeconds);
|
||||
assertEquals(leaderboardRowDTOBefore.whenMaximumSpeedOverGroundWasAchieved,
|
||||
leaderboardRowDTOAfter.whenMaximumSpeedOverGroundWasAchieved);
|
||||
if (leaderboardRowDTOBefore.effectiveTimeOnDistanceAllowancePerNauticalMile == null
|
||||
&& competitor.getTimeOnDistanceAllowancePerNauticalMile() != null) {
|
||||
assertEquals(competitor.getTimeOnDistanceAllowancePerNauticalMile(),
|
||||
leaderboardRowDTOAfter.effectiveTimeOnDistanceAllowancePerNauticalMile);
|
||||
} else {
|
||||
assertEquals(leaderboardRowDTOBefore.effectiveTimeOnDistanceAllowancePerNauticalMile,
|
||||
leaderboardRowDTOAfter.effectiveTimeOnDistanceAllowancePerNauticalMile);
|
||||
}
|
||||
if (leaderboardRowDTOBefore.effectiveTimeOnTimeFactor == null
|
||||
&& competitor.getTimeOnDistanceAllowancePerNauticalMile() != null) {
|
||||
assertEquals(competitor.getTimeOnTimeFactor(), leaderboardRowDTOAfter.effectiveTimeOnTimeFactor);
|
||||
} else {
|
||||
assertEquals(leaderboardRowDTOBefore.effectiveTimeOnTimeFactor,
|
||||
leaderboardRowDTOAfter.effectiveTimeOnTimeFactor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStrippingExceptOneColumnInOneRace() {
|
||||
HashMap<CompetitorDTO, LeaderboardRowDTO> newRows = new HashMap<CompetitorDTO, LeaderboardRowDTO>(newVersion.rows);
|
||||
@@ -231,7 +279,7 @@ public class LeaderboardDTODiffingTest {
|
||||
}
|
||||
}
|
||||
LeaderboardDTO applied = newVersion.getLeaderboardDTO(previousVersion);
|
||||
assertEquals(rowsBeforeStripping, applied.rows);
|
||||
assertFieldsOfLeaderboardRowDTO(rowsBeforeStripping, applied.rows);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+2
-2
@@ -110,10 +110,10 @@ public class TestORCPerformanceCurveCourse {
|
||||
assertEquals(1.25, subcourse2.getTotalLength().getNauticalMiles(), accuracy);
|
||||
assertEquals(ORCPerformanceCurveLegTypes.LONG_DISTANCE, Util.last(subcourse2.getLegs()).getType());
|
||||
assertEquals(0, subcourse2.getLegs().iterator().next().getTwa().getDegrees(), accuracy);
|
||||
// special case: didn't start, equals to no legs finished and 0.0% of current leg
|
||||
// special case: didn't start, equals to no legs finished and no leg started yet, so zero legs
|
||||
ORCPerformanceCurveCourse subcourseSpecial1 = course.subcourse(0, 0);
|
||||
assertEquals(0, subcourseSpecial1.getTotalLength().getNauticalMiles(), accuracy);
|
||||
assertEquals(1, Util.size(subcourseSpecial1.getLegs()));
|
||||
assertEquals(0, Util.size(subcourseSpecial1.getLegs()));
|
||||
// special case: number of finished legs is higher then number of actual legs
|
||||
ORCPerformanceCurveCourse subcourseSpecial2 = course.subcourse(10, 0);
|
||||
assertEquals(10, subcourseSpecial2.getTotalLength().getNauticalMiles(), accuracy);
|
||||
|
||||
+151
-2
@@ -9,12 +9,14 @@ import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.sap.sailing.domain.abstractlog.AbstractLogEventAuthor;
|
||||
import com.sap.sailing.domain.abstractlog.impl.LogEventAuthorImpl;
|
||||
import com.sap.sailing.domain.abstractlog.race.CompetitorResult;
|
||||
import com.sap.sailing.domain.abstractlog.race.RaceLog;
|
||||
import com.sap.sailing.domain.abstractlog.race.RaceLogFlagEvent;
|
||||
import com.sap.sailing.domain.abstractlog.race.SimpleRaceLogIdentifier;
|
||||
@@ -23,13 +25,26 @@ import com.sap.sailing.domain.abstractlog.race.analyzing.impl.RaceLogResolver;
|
||||
import com.sap.sailing.domain.abstractlog.race.impl.RaceLogFlagEventImpl;
|
||||
import com.sap.sailing.domain.abstractlog.race.impl.RaceLogImpl;
|
||||
import com.sap.sailing.domain.abstractlog.race.impl.RaceLogPassChangeEventImpl;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.impl.BoatClassImpl;
|
||||
import com.sap.sailing.domain.base.impl.BoatImpl;
|
||||
import com.sap.sailing.domain.base.impl.DynamicBoat;
|
||||
import com.sap.sailing.domain.base.impl.NationalityImpl;
|
||||
import com.sap.sailing.domain.base.impl.PersonImpl;
|
||||
import com.sap.sailing.domain.base.impl.TeamImpl;
|
||||
import com.sap.sailing.domain.common.MaxPointsReason;
|
||||
import com.sap.sailing.domain.common.racelog.Flags;
|
||||
import com.sap.sailing.domain.tractracadapter.DomainFactory;
|
||||
import com.sap.sailing.domain.tractracadapter.impl.RaceAndCompetitorStatusWithRaceLogReconciler;
|
||||
import com.sap.sse.common.Color;
|
||||
import com.sap.sse.common.Duration;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
import com.sap.sse.common.impl.MillisecondsTimePoint;
|
||||
import com.tractrac.model.lib.api.event.ICompetitor;
|
||||
import com.tractrac.model.lib.api.event.IRace;
|
||||
import com.tractrac.model.lib.api.event.IRaceCompetitor;
|
||||
import com.tractrac.model.lib.api.event.RaceCompetitorStatusType;
|
||||
import com.tractrac.model.lib.api.event.RaceStatusType;
|
||||
|
||||
/**
|
||||
@@ -43,18 +58,50 @@ public class TestTracTracRaceAndCompetitorStatusReconciler {
|
||||
private TrackedRace trackedRace;
|
||||
private IRace tractracRace;
|
||||
private RaceLog raceLog;
|
||||
private RaceAndCompetitorStatusWithRaceLogReconciler reconciler;
|
||||
private RaceAndCompetitorStatusWithRaceLogReconcilerWithPublicResultFetcher reconciler;
|
||||
private TimePoint startOfPass;
|
||||
private IRaceCompetitor tractracRaceCompetitor;
|
||||
private ICompetitor tractracCompetitor;
|
||||
private Competitor competitor;
|
||||
|
||||
private static class RaceAndCompetitorStatusWithRaceLogReconcilerWithPublicResultFetcher extends RaceAndCompetitorStatusWithRaceLogReconciler {
|
||||
public RaceAndCompetitorStatusWithRaceLogReconcilerWithPublicResultFetcher(DomainFactory domainFactory,
|
||||
RaceLogResolver raceLogResolver, IRace tractracRace) {
|
||||
super(domainFactory, raceLogResolver, tractracRace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pair<CompetitorResult, TimePoint> getRaceLogResultAndCreationTimePointForCompetitor(
|
||||
TrackedRace trackedRace, Competitor competitor) {
|
||||
return super.getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
author = new LogEventAuthorImpl("me", 1);
|
||||
startOfPass = MillisecondsTimePoint.now();
|
||||
tractracRace = mock(IRace.class);
|
||||
when(tractracRace.getStatus()).thenReturn(RaceStatusType.RACING);
|
||||
trackedRace = mock(TrackedRace.class);
|
||||
tractracCompetitor = mock(ICompetitor.class);
|
||||
tractracRaceCompetitor = mock(IRaceCompetitor.class);
|
||||
when(tractracRaceCompetitor.getRace()).thenReturn(tractracRace);
|
||||
when(tractracRaceCompetitor.getCompetitor()).thenReturn(tractracCompetitor);
|
||||
final String competitorName = "The Competitor";
|
||||
final UUID competitorId = UUID.randomUUID();
|
||||
DynamicBoat b = new BoatImpl(competitorId, competitorName + "'s boat", new BoatClassImpl("505", /* typicallyStartsUpwind */true), null, null);
|
||||
competitor = DomainFactory.INSTANCE.getBaseDomainFactory().getOrCreateCompetitorWithBoat(
|
||||
competitorId, competitorName, "TC", Color.RED, null, null, new TeamImpl("STG", Collections.singleton(
|
||||
new PersonImpl(competitorName, new NationalityImpl("GER"),
|
||||
/* dateOfBirth */null, "This is famous " + competitorName)), new PersonImpl("Rigo van Maas",
|
||||
new NationalityImpl("NED"),
|
||||
/* dateOfBirth */null, "This is Rigo, the coach")),
|
||||
/* timeOnTimeFactor */ null, /* timeOnDistanceAllowancePerNauticalMile */ null, null, b, /* store */ false);
|
||||
when(tractracCompetitor.getId()).thenReturn((UUID) competitor.getId());
|
||||
raceLog = new RaceLogImpl("RaceLogID");
|
||||
when(trackedRace.getAttachedRaceLogs()).thenReturn(Collections.singleton(raceLog));
|
||||
reconciler = new RaceAndCompetitorStatusWithRaceLogReconciler(DomainFactory.INSTANCE, new RaceLogResolver() {
|
||||
reconciler = new RaceAndCompetitorStatusWithRaceLogReconcilerWithPublicResultFetcher(DomainFactory.INSTANCE, new RaceLogResolver() {
|
||||
@Override
|
||||
public RaceLog resolve(SimpleRaceLogIdentifier identifier) {
|
||||
return raceLog;
|
||||
@@ -130,4 +177,106 @@ public class TestTracTracRaceAndCompetitorStatusReconciler {
|
||||
assertEquals(2, raceLog.getCurrentPassId());
|
||||
assertSame(abortFlagEvent, abortingFlagFinder.analyze());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIRMUpdateFromTracTracMapsToRaceLogCompetitorResult() {
|
||||
// emulate we received a BFD for a competitor a second after the start of the pass
|
||||
final TimePoint resultTimePoint = startOfPass.plus(Duration.ONE_SECOND);
|
||||
when(tractracRaceCompetitor.getStatusTime()).thenReturn(resultTimePoint.asMillis());
|
||||
when(tractracRaceCompetitor.getStatus()).thenReturn(RaceCompetitorStatusType.BFD);
|
||||
reconciler.reconcileCompetitorStatus(tractracRaceCompetitor, trackedRace);
|
||||
{
|
||||
final Pair<CompetitorResult, TimePoint> raceLogBasedResult = reconciler.getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
assertNotNull(raceLogBasedResult);
|
||||
assertEquals(resultTimePoint, raceLogBasedResult.getB());
|
||||
assertEquals(MaxPointsReason.BFD, raceLogBasedResult.getA().getMaxPointsReason());
|
||||
}
|
||||
// now simulate an "outdated" TracTrac event and assert that it has no impact on a newer result:
|
||||
final TimePoint outdatedResultTimePoint = startOfPass.plus(Duration.ONE_SECOND.divide(2));
|
||||
when(tractracRaceCompetitor.getStatusTime()).thenReturn(outdatedResultTimePoint.asMillis());
|
||||
when(tractracRaceCompetitor.getStatus()).thenReturn(RaceCompetitorStatusType.DNF);
|
||||
reconciler.reconcileCompetitorStatus(tractracRaceCompetitor, trackedRace);
|
||||
{
|
||||
final Pair<CompetitorResult, TimePoint> raceLogBasedResult = reconciler.getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
assertNotNull(raceLogBasedResult);
|
||||
assertEquals(resultTimePoint, raceLogBasedResult.getB()); // still expecting to see the result from the later time point
|
||||
assertEquals(MaxPointsReason.BFD, raceLogBasedResult.getA().getMaxPointsReason());
|
||||
}
|
||||
// now simulate a newer TracTrac event and assert that it updates the result:
|
||||
final TimePoint newerResultTimePoint = startOfPass.plus(Duration.ONE_SECOND.times(2));
|
||||
when(tractracRaceCompetitor.getStatusTime()).thenReturn(newerResultTimePoint.asMillis());
|
||||
when(tractracRaceCompetitor.getStatus()).thenReturn(RaceCompetitorStatusType.DNC);
|
||||
reconciler.reconcileCompetitorStatus(tractracRaceCompetitor, trackedRace);
|
||||
{
|
||||
final Pair<CompetitorResult, TimePoint> raceLogBasedResult = reconciler.getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
assertNotNull(raceLogBasedResult);
|
||||
assertEquals(newerResultTimePoint, raceLogBasedResult.getB()); // expecting to see the result from the newer time point
|
||||
assertEquals(MaxPointsReason.DNC, raceLogBasedResult.getA().getMaxPointsReason());
|
||||
}
|
||||
// now simulate a yet newer TracTrac event that is expected to reset the "IRM" / MaxPointsReason:
|
||||
final TimePoint yetNewerResultTimePoint = startOfPass.plus(Duration.ONE_SECOND.times(3));
|
||||
when(tractracRaceCompetitor.getStatusTime()).thenReturn(yetNewerResultTimePoint.asMillis());
|
||||
when(tractracRaceCompetitor.getStatus()).thenReturn(RaceCompetitorStatusType.NO_DATA);
|
||||
reconciler.reconcileCompetitorStatus(tractracRaceCompetitor, trackedRace);
|
||||
{
|
||||
final Pair<CompetitorResult, TimePoint> raceLogBasedResult = reconciler.getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
assertNotNull(raceLogBasedResult);
|
||||
assertEquals(yetNewerResultTimePoint, raceLogBasedResult.getB()); // expecting to see the result from the yet newer time point
|
||||
assertEquals(MaxPointsReason.NONE, raceLogBasedResult.getA().getMaxPointsReason());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOfficialRankUpdateToRaceLogCompetitorResult() {
|
||||
// emulate we received a valid official rank for a competitor a second after the start of the pass
|
||||
final TimePoint resultTimePoint = startOfPass.plus(Duration.ONE_SECOND);
|
||||
when(tractracRaceCompetitor.getStatusTime()).thenReturn(resultTimePoint.asMillis());
|
||||
when(tractracRaceCompetitor.getOfficialRank()).thenReturn(42);
|
||||
when(tractracRaceCompetitor.getStatus()).thenReturn(RaceCompetitorStatusType.NO_DATA);
|
||||
reconciler.reconcileCompetitorStatus(tractracRaceCompetitor, trackedRace);
|
||||
{
|
||||
final Pair<CompetitorResult, TimePoint> raceLogBasedResult = reconciler.getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
assertNotNull(raceLogBasedResult);
|
||||
assertEquals(resultTimePoint, raceLogBasedResult.getB());
|
||||
assertEquals(MaxPointsReason.NONE, raceLogBasedResult.getA().getMaxPointsReason());
|
||||
assertEquals(42, raceLogBasedResult.getA().getOneBasedRank());
|
||||
}
|
||||
// now simulate an "outdated" TracTrac event and assert that it has no impact on a newer result:
|
||||
final TimePoint outdatedResultTimePoint = startOfPass.plus(Duration.ONE_SECOND.divide(2));
|
||||
when(tractracRaceCompetitor.getStatusTime()).thenReturn(outdatedResultTimePoint.asMillis());
|
||||
when(tractracRaceCompetitor.getOfficialRank()).thenReturn(43);
|
||||
reconciler.reconcileCompetitorStatus(tractracRaceCompetitor, trackedRace);
|
||||
{
|
||||
final Pair<CompetitorResult, TimePoint> raceLogBasedResult = reconciler.getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
assertNotNull(raceLogBasedResult);
|
||||
assertEquals(resultTimePoint, raceLogBasedResult.getB());
|
||||
assertEquals(MaxPointsReason.NONE, raceLogBasedResult.getA().getMaxPointsReason());
|
||||
assertEquals(42, raceLogBasedResult.getA().getOneBasedRank());
|
||||
}
|
||||
// now simulate a newer TracTrac event and assert that it updates the result:
|
||||
final TimePoint newerResultTimePoint = startOfPass.plus(Duration.ONE_SECOND.times(2));
|
||||
when(tractracRaceCompetitor.getStatusTime()).thenReturn(newerResultTimePoint.asMillis());
|
||||
when(tractracRaceCompetitor.getOfficialRank()).thenReturn(44);
|
||||
reconciler.reconcileCompetitorStatus(tractracRaceCompetitor, trackedRace);
|
||||
{
|
||||
final Pair<CompetitorResult, TimePoint> raceLogBasedResult = reconciler.getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
assertNotNull(raceLogBasedResult);
|
||||
assertEquals(newerResultTimePoint, raceLogBasedResult.getB());
|
||||
assertEquals(MaxPointsReason.NONE, raceLogBasedResult.getA().getMaxPointsReason());
|
||||
assertEquals(44, raceLogBasedResult.getA().getOneBasedRank());
|
||||
}
|
||||
// now simulate a yet newer TracTrac event that resets the official rank to 0, stating that there is no official rank yet
|
||||
final TimePoint yetNewerResultTimePoint = startOfPass.plus(Duration.ONE_SECOND.times(3));
|
||||
when(tractracRaceCompetitor.getStatusTime()).thenReturn(yetNewerResultTimePoint.asMillis());
|
||||
when(tractracRaceCompetitor.getOfficialRank()).thenReturn(0);
|
||||
reconciler.reconcileCompetitorStatus(tractracRaceCompetitor, trackedRace);
|
||||
{
|
||||
final Pair<CompetitorResult, TimePoint> raceLogBasedResult = reconciler.getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
assertNotNull(raceLogBasedResult);
|
||||
assertEquals(yetNewerResultTimePoint, raceLogBasedResult.getB());
|
||||
assertEquals(MaxPointsReason.NONE, raceLogBasedResult.getA().getMaxPointsReason());
|
||||
assertEquals(0, raceLogBasedResult.getA().getOneBasedRank());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+44
-45
@@ -124,7 +124,13 @@ public class RaceAndCompetitorStatusWithRaceLogReconciler {
|
||||
|
||||
@Override
|
||||
public void visit(RaceLogRevokeEvent event) {
|
||||
final RaceLogEvent revokedEvent = raceLog.getEventById(event.getRevokedEventId());
|
||||
final RaceLogEvent revokedEvent;
|
||||
raceLog.lockForRead();
|
||||
try {
|
||||
revokedEvent = raceLog.getEventById(event.getRevokedEventId());
|
||||
} finally {
|
||||
raceLog.unlockAfterRead();
|
||||
}
|
||||
if (revokedEvent != null) {
|
||||
if (revokedEvent instanceof RaceLogFinishPositioningConfirmedEvent) {
|
||||
final RaceLogFinishPositioningConfirmedEvent revokedResultsEvent = (RaceLogFinishPositioningConfirmedEvent) revokedEvent;
|
||||
@@ -219,7 +225,6 @@ public class RaceAndCompetitorStatusWithRaceLogReconciler {
|
||||
flagForRaceStatus.get(raceStatus), /* lower flag */ null, /* is displayed */ true));
|
||||
startNewPass(raceStatusUpdateTime, defaultRaceLog);
|
||||
}
|
||||
// TODO bug5154 check IRace.getStatus() and copy all competitor ranks to the leaderboard once the race status reached RaceStatusType.OFFICIAL
|
||||
}
|
||||
|
||||
protected void startNewPass(final MillisecondsTimePoint timePointForStartOfNewPass, final RaceLog raceLog) {
|
||||
@@ -316,59 +321,53 @@ public class RaceAndCompetitorStatusWithRaceLogReconciler {
|
||||
* {@link IRaceCompetitor#getOfficialRank()} methods. If the {@link IRaceCompetitor} has a status update time but
|
||||
* empty results and there is a {@link CompetitorResult} for that competitor coming from the race log, that competitor
|
||||
* result will be "invalidated" / "revoked" by adding a new {@link CompetitorResult} at the end of the race log that
|
||||
* has an empty finishing time and zero rank.
|
||||
* has an empty finishing time and zero rank.<p>
|
||||
*
|
||||
* See also <a href="https://bugzilla.sapsailing.com/bugzilla/show_bug.cgi?id=5154">bug 5154</a> for a discussion
|
||||
* about the functionality expected, and see also {@code TestTracTracRaceAndCompetitorStatusReconciler} for the
|
||||
* corresponding tests expressing the expected results in the form of test cases.
|
||||
*/
|
||||
public void reconcileCompetitorStatus(IRaceCompetitor raceCompetitor, TrackedRace trackedRace) {
|
||||
final IRace tractracRace = raceCompetitor.getRace();
|
||||
final RaceStatusType raceStatus = tractracRace.getStatus();
|
||||
final int officialRank = raceCompetitor.getOfficialRank(); // TODO accept rank information only if race status is OFFICIAL
|
||||
final int officialRank = raceCompetitor.getOfficialRank();
|
||||
final long officialFinishingTime = raceCompetitor.getOfficialFinishTime();
|
||||
final long timePointForStatusEvent = raceCompetitor.getStatusTime();
|
||||
if (timePointForStatusEvent != 0) {
|
||||
// there is an official result for the competitor on TracTrac's side
|
||||
// TODO bug5154: shall we really ignore that result in case the raceStatus is not OFFICIAL?
|
||||
if (raceStatus == RaceStatusType.OFFICIAL) {
|
||||
// find out if we already have this information represented in the race log(s) and if not if the TracTrac information is newer:
|
||||
final Competitor competitor = domainFactory.resolveCompetitor(raceCompetitor.getCompetitor());
|
||||
Pair<CompetitorResult, TimePoint> resultFromRaceLogAndItsCreationTimePoint = getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
final RaceCompetitorStatusType competitorStatus = raceCompetitor.getStatus();
|
||||
final MaxPointsReason officialMaxPointsReason = getMaxPointsReason(competitorStatus);
|
||||
final MillisecondsTimePoint officialResultTime = new MillisecondsTimePoint(timePointForStatusEvent);
|
||||
// accept even OFFICIAL results only if at least one of officialRank or officialFinishingTime is
|
||||
// provided:
|
||||
// Jorge Piera Llodra on 2020-04-01: "If both the finishing time and the rank are not defined means that
|
||||
// we don’t have these values. In fact, we only have these values for some races of the test event in
|
||||
// Enoshima last year.
|
||||
// If the race is OFFICIAL but these values are empty, just ignore them."
|
||||
if ((officialFinishingTime != 0 || officialRank != 0) && (resultFromRaceLogAndItsCreationTimePoint == null
|
||||
|| (resultFromRaceLogAndItsCreationTimePoint.getA().getOneBasedRank() != officialRank
|
||||
|| ((resultFromRaceLogAndItsCreationTimePoint.getA().getFinishingTime() == null) ? 0
|
||||
: resultFromRaceLogAndItsCreationTimePoint.getA().getFinishingTime().asMillis()) != officialFinishingTime
|
||||
|| resultFromRaceLogAndItsCreationTimePoint.getA().getMaxPointsReason() != officialMaxPointsReason)
|
||||
&& resultFromRaceLogAndItsCreationTimePoint.getB().before(officialResultTime))) {
|
||||
// We have an official statement from TracTrac, rank or finishing time or penalty varies and is newer
|
||||
// than the last thing we see in the race log (including we may not have anything in the race
|
||||
// log for the results of that competitor at all yet).
|
||||
// --> Write the official result to the race log
|
||||
final CompetitorResult resultForRaceLog = new CompetitorResultImpl(competitor.getId(), competitor.getName(),
|
||||
competitor.getShortName(),
|
||||
/* boat name: */ ((competitor.hasBoat() ? ((CompetitorWithBoat) competitor).getBoat().getName() : competitor.getShortInfo())),
|
||||
/* boatSailId */ ((competitor.hasBoat() ? ((CompetitorWithBoat) competitor).getBoat().getSailID() : competitor.getShortInfo())),
|
||||
officialRank, officialMaxPointsReason, /* score null means let the scoring system calculate it */ null,
|
||||
officialFinishingTime == 0 ? null : new MillisecondsTimePoint(officialFinishingTime),
|
||||
"Official results from TracTrac connector", MergeState.OK);
|
||||
final CompetitorResults resultsForRaceLog = new CompetitorResultsImpl();
|
||||
resultsForRaceLog.add(resultForRaceLog);
|
||||
final RaceLog defaultRaceLog = getDefaultRaceLog(trackedRace);
|
||||
defaultRaceLog.add(new RaceLogFinishPositioningConfirmedEventImpl(officialResultTime, officialResultTime,
|
||||
new LogEventAuthorImpl("Official TracTrac Result Provider", 1), // equally important as race officer on water
|
||||
UUID.randomUUID(), defaultRaceLog.getCurrentPassId(), resultsForRaceLog));
|
||||
}
|
||||
// find out if we already have this information represented in the race log(s) and if not if the TracTrac information is newer:
|
||||
final Competitor competitor = domainFactory.resolveCompetitor(raceCompetitor.getCompetitor());
|
||||
Pair<CompetitorResult, TimePoint> resultFromRaceLogAndItsCreationTimePoint = getRaceLogResultAndCreationTimePointForCompetitor(trackedRace, competitor);
|
||||
final RaceCompetitorStatusType competitorStatus = raceCompetitor.getStatus();
|
||||
final MaxPointsReason officialMaxPointsReason = getMaxPointsReason(competitorStatus);
|
||||
final MillisecondsTimePoint officialResultTime = new MillisecondsTimePoint(timePointForStatusEvent);
|
||||
if (resultFromRaceLogAndItsCreationTimePoint == null
|
||||
|| ((resultFromRaceLogAndItsCreationTimePoint.getA().getOneBasedRank() != officialRank
|
||||
|| ((resultFromRaceLogAndItsCreationTimePoint.getA().getFinishingTime() == null) ? 0
|
||||
: resultFromRaceLogAndItsCreationTimePoint.getA().getFinishingTime().asMillis()) != officialFinishingTime
|
||||
|| resultFromRaceLogAndItsCreationTimePoint.getA().getMaxPointsReason() != officialMaxPointsReason)
|
||||
&& resultFromRaceLogAndItsCreationTimePoint.getB().before(officialResultTime))) {
|
||||
// We have received an update from TracTrac, rank or finishing time or penalty varies and is newer
|
||||
// than the last thing we see in the race log (including we may not have anything in the race
|
||||
// log for the results of that competitor at all yet).
|
||||
// --> Write the TracTrac result to the race log, where 0 for the "official rank" maps to 0 of our
|
||||
// one-based rank; and 0 as official finishing time maps to null as the official finishing time:
|
||||
final CompetitorResult resultForRaceLog = new CompetitorResultImpl(competitor.getId(), competitor.getName(),
|
||||
competitor.getShortName(),
|
||||
/* boat name: */ ((competitor.hasBoat() ? ((CompetitorWithBoat) competitor).getBoat().getName() : competitor.getShortInfo())),
|
||||
/* boatSailId */ ((competitor.hasBoat() ? ((CompetitorWithBoat) competitor).getBoat().getSailID() : competitor.getShortInfo())),
|
||||
officialRank, officialMaxPointsReason, /* score null means let the scoring system calculate it */ null,
|
||||
officialFinishingTime == 0 ? null : new MillisecondsTimePoint(officialFinishingTime),
|
||||
"Official results from TracTrac connector", MergeState.OK);
|
||||
final CompetitorResults resultsForRaceLog = new CompetitorResultsImpl();
|
||||
resultsForRaceLog.add(resultForRaceLog);
|
||||
final RaceLog defaultRaceLog = getDefaultRaceLog(trackedRace);
|
||||
defaultRaceLog.add(new RaceLogFinishPositioningConfirmedEventImpl(officialResultTime, officialResultTime,
|
||||
new LogEventAuthorImpl("Official TracTrac Result Provider", 1), // equally important as race officer on water
|
||||
UUID.randomUUID(), defaultRaceLog.getCurrentPassId(), resultsForRaceLog));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Pair<CompetitorResult, TimePoint> getRaceLogResultAndCreationTimePointForCompetitor(TrackedRace trackedRace,
|
||||
protected Pair<CompetitorResult, TimePoint> getRaceLogResultAndCreationTimePointForCompetitor(TrackedRace trackedRace,
|
||||
final Competitor competitor) {
|
||||
Pair<CompetitorResult, TimePoint> resultFromRaceLogAndItsCreationTimePoint = null;
|
||||
for (final RaceLog raceLog : trackedRace.getAttachedRaceLogs()) {
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import com.sap.sse.common.Util;
|
||||
|
||||
public class WindFinderReportParserTest {
|
||||
private final String TEST_MESSAGE = "[{\"wg\":16,\"wd\":331,\"dtl\":\"2017-11-13T15:16:00+01:00\",\"dtl_s\":\"2017-11-13T15:15:30+01:00\",\"ws\":12,\"at\":7.0},{\"wg\":14,\"wd\":333,\"dtl\":\"2017-11-13T15:32:00+01:00\",\"dtl_s\":\"2017-11-13T15:31:30+01:00\",\"ws\":12,\"at\":7.0},{\"wg\":16,\"wd\":332,\"dtl\":\"2017-11-13T15:40:00+01:00\",\"dtl_s\":\"2017-11-13T15:39:30+01:00\",\"ws\":12,\"at\":7.0}]";
|
||||
|
||||
|
||||
@Test
|
||||
public void testReadingOneFix() throws ParseException, NumberFormatException, java.text.ParseException {
|
||||
final JSONArray fullJson = (JSONArray) new JSONParser().parse(TEST_MESSAGE);
|
||||
|
||||
+6
-1
@@ -4,6 +4,7 @@ import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
@@ -38,7 +39,11 @@ public class WindFinderReportParser {
|
||||
if (jsonOfSingleMeasurement.get("dtl") != null &&
|
||||
jsonOfSingleMeasurement.get("ws") != null &&
|
||||
jsonOfSingleMeasurement.get("wd") != null) {
|
||||
result = new WindImpl(position, new MillisecondsTimePoint(dateFormat.parse(jsonOfSingleMeasurement.get("dtl").toString())),
|
||||
final Date date;
|
||||
synchronized (dateFormat) {
|
||||
date = dateFormat.parse(jsonOfSingleMeasurement.get("dtl").toString());
|
||||
}
|
||||
result = new WindImpl(position, new MillisecondsTimePoint(date),
|
||||
new KnotSpeedWithBearingImpl(Double.parseDouble(jsonOfSingleMeasurement.get("ws").toString()),
|
||||
new DegreeBearingImpl(Double.parseDouble(jsonOfSingleMeasurement.get("wd").toString())).reverse()));
|
||||
} else {
|
||||
|
||||
+3
@@ -11,6 +11,9 @@ public interface LeaderboardGroupResolver {
|
||||
*/
|
||||
LeaderboardGroup getLeaderboardGroupByName(String leaderboardGroupName);
|
||||
|
||||
/**
|
||||
* @param leaderboardGroupID may be {@code null} in which case {@code null} is returned immediately
|
||||
*/
|
||||
LeaderboardGroup getLeaderboardGroupByID(UUID leaderboardGroupID);
|
||||
|
||||
LeaderboardGroup resolveLeaderboardGroupByRegattaName(String regattaName);
|
||||
|
||||
+3
-1
@@ -325,7 +325,9 @@ public class LeaderboardDTOCalculationReuseCache implements WindLegTypeAndLegBea
|
||||
Wind result = trackedLegAverageWindCache.get(leg);
|
||||
if (result == null) {
|
||||
result = averageWindForLegSupplier.apply(leg);
|
||||
trackedLegAverageWindCache.put(leg, result);
|
||||
if (result != null) {
|
||||
trackedLegAverageWindCache.put(leg, result);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
+8
@@ -13,6 +13,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NavigableSet;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Callable;
|
||||
@@ -564,6 +565,13 @@ public abstract class AbstractLeaderboardWithCache implements Leaderboard {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isLeaderboardThatHasRegattaLike) {
|
||||
LeaderboardThatHasRegattaLike regattaLikeLeaderboard = (LeaderboardThatHasRegattaLike) this;
|
||||
final Duration regattaLevelTimeOnDistanceAllowancePerNauticalMile = regattaLikeLeaderboard.getRegattaLike().getTimeOnDistanceAllowancePerNauticalMile(competitor, Optional.empty());
|
||||
final Double regattaLevelTimeOnTimeFactor = regattaLikeLeaderboard.getRegattaLike().getTimeOnTimeFactor(competitor, Optional.empty());
|
||||
row.effectiveTimeOnDistanceAllowancePerNauticalMile = regattaLevelTimeOnDistanceAllowancePerNauticalMile;
|
||||
row.effectiveTimeOnTimeFactor = regattaLevelTimeOnTimeFactor;
|
||||
}
|
||||
}
|
||||
final Duration computeTime = startOfRequestHandling.until(MillisecondsTimePoint.now());
|
||||
logger.info("computeLeaderboardByName(" + this.getName() + ", " + timePoint + ", "
|
||||
|
||||
+7
-1
@@ -1,5 +1,6 @@
|
||||
package com.sap.sailing.domain.orc.impl;
|
||||
|
||||
import com.sap.sailing.domain.common.Position;
|
||||
import com.sap.sailing.domain.common.Wind;
|
||||
import com.sap.sailing.domain.common.orc.AverageWindOnLegCache;
|
||||
import com.sap.sailing.domain.common.orc.ORCPerformanceCurveLeg;
|
||||
@@ -7,10 +8,12 @@ import com.sap.sailing.domain.common.orc.ORCPerformanceCurveLegTypes;
|
||||
import com.sap.sailing.domain.tracking.TrackedLeg;
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.WindLegTypeAndLegBearingAndORCPerformanceCurveCache;
|
||||
import com.sap.sailing.domain.tracking.WindWithConfidence;
|
||||
import com.sap.sailing.domain.tracking.impl.NoCachingWindLegTypeAndLegBearingCache;
|
||||
import com.sap.sse.common.Bearing;
|
||||
import com.sap.sse.common.Distance;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
|
||||
/**
|
||||
* Abstract base class for adapting a {@link TrackedLeg} to the {@link ORCPerformanceCurveLeg} interface. If wind
|
||||
@@ -101,7 +104,10 @@ public abstract class AbstractORCPerformanceCurveTwaLegAdapter implements ORCPer
|
||||
@Override
|
||||
public Bearing getTwa(AverageWindOnLegCache cache) {
|
||||
final EqualityByTrackedLegWrapper wrapper = new EqualityByTrackedLegWrapper();
|
||||
final Wind wind = cache.getAverageWind(wrapper, legAdapter->legAdapter.getTrackedLeg().getAverageWind(numParts).getObject());
|
||||
final Wind wind = cache.getAverageWind(wrapper, legAdapter->{
|
||||
final WindWithConfidence<Pair<Position, TimePoint>> averageWind = legAdapter.getTrackedLeg().getAverageWind(numParts);
|
||||
return averageWind == null ? null : averageWind.getObject();
|
||||
});
|
||||
final Bearing result;
|
||||
if (wind == null) {
|
||||
result = null;
|
||||
|
||||
+3
-1
@@ -128,7 +128,9 @@ public class ORCCertificatesCollectionRMS extends AbstractORCCertificatesCollect
|
||||
String timeString = certificateValues.getValue(ISSUETIME);
|
||||
TimePoint issueDate;
|
||||
try {
|
||||
issueDate = new MillisecondsTimePoint(timestampFormat.parse(dateString+" "+timeString+"+0000")); // assume UTC
|
||||
synchronized (timestampFormat) {
|
||||
issueDate = new MillisecondsTimePoint(timestampFormat.parse(dateString+" "+timeString+"+0000")); // assume UTC
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
issueDate = null;
|
||||
}
|
||||
|
||||
+6
-1
@@ -191,7 +191,12 @@ public abstract class NonPerformanceCurveRankingMetric extends AbstractRankingMe
|
||||
} else {
|
||||
assert getTrackedRace().getRace().getCourse().getIndexOfWaypoint(legWho.getLeg().getFrom()) <= getTrackedRace()
|
||||
.getRace().getCourse().getIndexOfWaypoint(legTo.getLeg().getFrom());
|
||||
final Duration toEndOfLegOrTo = getPredictedDurationToEndOfLegOrTo(timePoint, legWho, legWho.getTrackedLeg().getTrackedLeg(to), cache);
|
||||
// bug5316: note that the following may result in a negative duration; this is particularly the case
|
||||
// when "who" has sailed (or is extrapolated) beyond the end of the leg without having received a mark passing.
|
||||
// In this case we want to assume that it will take "who" approximately that long again to reach back to
|
||||
// the waypoint to actually pass it; so we use the absolute duration instead.
|
||||
final Duration toEndOfLegOrTo = getPredictedDurationToEndOfLegOrTo(timePoint, legWho, legWho.getTrackedLeg().getTrackedLeg(to), cache).
|
||||
abs();
|
||||
if (toEndOfLegOrTo == null) {
|
||||
result = null;
|
||||
} else {
|
||||
|
||||
+3
@@ -281,6 +281,9 @@ public class TimeOnTimeAndDistanceRankingMetric extends NonPerformanceCurveRanki
|
||||
final Duration timeOnDistanceFactorInSecondsPerNauticalMileWho = getTimeOnDistanceFactorInSecondsPerNauticalMile(who);
|
||||
final double g_who = timeOnDistanceFactorInSecondsPerNauticalMileWho==null?0:timeOnDistanceFactorInSecondsPerNauticalMileWho.asSeconds();
|
||||
t_who = d_to == null ? null : new MillisecondsDurationImpl(Double.valueOf(
|
||||
// first compute the seconds "to" would need with time-on-time correction for one nautical mile, then
|
||||
// subtract "to"'s ToD allowance and add "who"'s ToD allowance, then scale by "who"'s distance in NM and
|
||||
// apply who's ToT factor:
|
||||
(1./(d_to.inTime(t_to.times(f_to)).getMetersPerSecond() / Mile.METERS_PER_NAUTICAL_MILE) - g_to + g_who)
|
||||
* d_who.getNauticalMiles() / f_who * 1000.).longValue());
|
||||
}
|
||||
|
||||
+7
-1
@@ -230,7 +230,13 @@ public abstract class BaseRegattaLikeImpl implements IsRegattaLike {
|
||||
|
||||
@Override
|
||||
public void visit(RegattaLogRevokeEvent event) {
|
||||
final RegattaLogEvent revokedEvent = logToObserve.getEventById(event.getRevokedEventId());
|
||||
final RegattaLogEvent revokedEvent;
|
||||
logToObserve.lockForRead();
|
||||
try {
|
||||
revokedEvent = logToObserve.getEventById(event.getRevokedEventId());
|
||||
} finally {
|
||||
logToObserve.unlockAfterRead();
|
||||
}
|
||||
if (revokedEvent == null) {
|
||||
logger.warning("Unable to find revoked event with ID "+event.getRevokedEventId());
|
||||
} else if (regattaLogEventClass.isInstance(revokedEvent) &&
|
||||
|
||||
+26
-2
@@ -563,12 +563,36 @@ public class TrackedLegOfCompetitorImpl implements TrackedLegOfCompetitor {
|
||||
|
||||
@Override
|
||||
public Distance getAbsoluteCrossTrackError(TimePoint timePoint) throws NoWindException {
|
||||
return getTrackedLeg().getAbsoluteCrossTrackError(getTrackedRace().getTrack(getCompetitor()).getEstimatedPosition(timePoint, /* extrapolate */ true), timePoint);
|
||||
final Distance result;
|
||||
final GPSFixTrack<Competitor, GPSFixMoving> track = getTrackedRace().getTrack(getCompetitor());
|
||||
if (track != null) {
|
||||
final Position estimatedPosition = track.getEstimatedPosition(timePoint, /* extrapolate */ true);
|
||||
if (estimatedPosition != null) {
|
||||
result = getTrackedLeg().getAbsoluteCrossTrackError(estimatedPosition, timePoint);
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Distance getSignedCrossTrackError(TimePoint timePoint) throws NoWindException {
|
||||
return getTrackedLeg().getSignedCrossTrackError(getTrackedRace().getTrack(getCompetitor()).getEstimatedPosition(timePoint, /* extrapolate */ true), timePoint);
|
||||
final Distance result;
|
||||
final GPSFixTrack<Competitor, GPSFixMoving> track = getTrackedRace().getTrack(getCompetitor());
|
||||
if (track != null) {
|
||||
final Position estimatedPosition = track.getEstimatedPosition(timePoint, /* extrapolate */ true);
|
||||
if (estimatedPosition != null) {
|
||||
result = getTrackedLeg().getSignedCrossTrackError(estimatedPosition, timePoint);
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ public class IdleSixtyInchLeaderboardNode extends FiresPlaceNode {
|
||||
CompetitorSelectionProvider provider, String leaderboardName) {
|
||||
MultiRaceLeaderboardPanel leaderboardPanel = new MultiRaceLeaderboardPanel(null, null,
|
||||
cf.getSailingService(() -> leaderboardName), new AsyncActionsExecutor(), leaderboardSettings, false,
|
||||
provider, timer, null, leaderboardName, cf.getErrorReporter(), StringMessages.INSTANCE, false, null,
|
||||
provider, timer, leaderboardName, cf.getErrorReporter(), StringMessages.INSTANCE, false, null,
|
||||
false, null, false, true, false, false, false, new SixtyInchLeaderboardStyle(true),
|
||||
FlagImageResolverImpl.get(), Arrays.asList(DetailType.values()));
|
||||
|
||||
|
||||
+2
-1
@@ -75,6 +75,7 @@ public class LiveRaceBoardNode extends FiresPlaceNode implements RaceTimesInfoPr
|
||||
raceboardTimer,
|
||||
cf.getAutoPlayCtxSignalError().getLifeOrPreLiveRace(), cf.getAutoPlayCtxSignalError().getContextDefinition().getLeaderboardName(),
|
||||
/** leaderboardGroupName */
|
||||
null, /** leaderboardGroupId */
|
||||
null, /** eventId */
|
||||
null, cf.getErrorReporter(), StringMessages.INSTANCE, null, raceTimesInfoProvider, true, false,
|
||||
Arrays.asList(DetailType.values()), result.getLeaderboard(), result.getRace(), result.getTrackingConnectorInfo(), cf.getSailingServiceWrite());
|
||||
@@ -92,7 +93,7 @@ public class LiveRaceBoardNode extends FiresPlaceNode implements RaceTimesInfoPr
|
||||
};
|
||||
sailingService.getRaceboardData(cf.getAutoPlayCtxSignalError().getLifeOrPreLiveRace().getRegattaName(),
|
||||
cf.getAutoPlayCtxSignalError().getLifeOrPreLiveRace().getRaceName(), cf.getAutoPlayCtxSignalError().getContextDefinition().getLeaderboardName(), null,
|
||||
null, raceBoardDataCallback);
|
||||
null, null, raceBoardDataCallback);
|
||||
};
|
||||
|
||||
@Override
|
||||
|
||||
+4
-5
@@ -81,7 +81,7 @@ public class PreRaceRacemapPresenterImpl extends AutoPlayPresenterConfigured<Pre
|
||||
//in rare circumstances it can occure, that while the liverace changes, the url could be updated due to timing overlaps
|
||||
RegattaAndRaceIdentifier preRace = getSlideCtx().getPreLiveRace();
|
||||
if(preRace != null){
|
||||
String url = getRaceViewerURL(getSlideCtx().getContextDefinition().getLeaderboardName(), null,
|
||||
String url = getRaceViewerURL(getSlideCtx().getContextDefinition().getLeaderboardName(),
|
||||
preRace);
|
||||
view.updateStatistic(lastStatisticResult, url, windSpeed, windDegree);
|
||||
}
|
||||
@@ -94,13 +94,12 @@ public class PreRaceRacemapPresenterImpl extends AutoPlayPresenterConfigured<Pre
|
||||
view.startingWith(this, panel, getPlace().getRaceMap());
|
||||
};
|
||||
|
||||
public String getRaceViewerURL(String leaderboardName, String leaderboardGroupName,
|
||||
RegattaAndRaceIdentifier raceIdentifier) {
|
||||
public String getRaceViewerURL(String leaderboardName, RegattaAndRaceIdentifier raceIdentifier) {
|
||||
RaceboardContextDefinition raceboardContext = new RaceboardContextDefinition(raceIdentifier.getRegattaName(),
|
||||
raceIdentifier.getRaceName(), leaderboardName, leaderboardGroupName, null, null);
|
||||
raceIdentifier.getRaceName(), leaderboardName, /* leaderboardGroupName */ null, /* leaderboardGroupId */ null,
|
||||
/* eventId */ null, /* mode */ null);
|
||||
RaceBoardPerspectiveOwnSettings perspectiveOwnSettings = RaceBoardPerspectiveOwnSettings
|
||||
.createDefaultWithCanReplayDuringLiveRaces(true);
|
||||
;
|
||||
HashMap<String, Settings> innerSettings = new HashMap<>();
|
||||
innerSettings.put(RaceMapLifecycle.ID, RaceMapSettings.getDefaultWithShowMapControls(true));
|
||||
PerspectiveCompositeSettings<RaceBoardPerspectiveOwnSettings> settings = new PerspectiveCompositeSettings<>(
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ public class MultiRaceLeaderboardWithZoomingPerspective extends AbstractPerspect
|
||||
MultiRaceLeaderboardPanel leaderboardPanel = new MultiRaceLeaderboardPanel(this, getComponentContext(), sailingService,
|
||||
asyncActionsExecutor,
|
||||
leaderboardSettings, /*isEmbedded*/true,
|
||||
competitorSelectionProvider, timer, /* leaderboardGroupName */"",
|
||||
competitorSelectionProvider, timer,
|
||||
leaderboardName, errorReporter, stringMessages,
|
||||
/* showRaceDetails */false, /* competitorSearchTextBox */ null, /* showRegattaRank */
|
||||
/* showSelectionCheckbox */false, /* raceTimesInfoProvider */null, false, /* autoExpandLastRaceColumn */
|
||||
|
||||
+4
-1
@@ -39,7 +39,8 @@ public class BoatClassImageResolver {
|
||||
boatClassIconsMap.put(BoatClassMasterdata.A_CAT.getDisplayName(), imageResources.A_CatIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.ALBIN_EXPRESS.getDisplayName(), imageResources.AlbinExpressIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.ALBIN_BALLAD.getDisplayName(), imageResources.AlbinBalladIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.B_ONE.getDisplayName(), imageResources.BOne());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.B_ONE.getDisplayName(), imageResources.BOneIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.BB10M.getDisplayName(), imageResources.BB10MIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.BAVARIA_CRUISER_41S.getDisplayName(), imageResources.BavariaCruiser41S());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.BAVARIA_CRUISER_45.getDisplayName(), imageResources.BavariaCruiser45());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.BAVARIA_CRUISER_46.getDisplayName(), imageResources.BavariaCruiser46());
|
||||
@@ -118,10 +119,12 @@ public class BoatClassImageResolver {
|
||||
boatClassIconsMap.put(BoatClassMasterdata.RS_X.getDisplayName(), imageResources.RSXIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.RS_FEVA.getDisplayName(), imageResources.RSFevaIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.RS_TERA.getDisplayName(), imageResources.RSTeraIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SCAN_KAP_99.getDisplayName(), imageResources.ScanKap99Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SKUD_18.getDisplayName(), imageResources.Skud18Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SK_22.getDisplayName(), imageResources.SK22Icon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SONAR.getDisplayName(), imageResources.SonarIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SOLING.getDisplayName(), imageResources.SolingIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SPAEKHUGGER.getDisplayName(), imageResources.SpaekhuggerIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SPLASH_BLUE.getDisplayName(), imageResources.SplashBlueIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SPLASH_RED.getDisplayName(), imageResources.SplashRedIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.SPLASH_GREEN.getDisplayName(), imageResources.SplashGreenIcon());
|
||||
|
||||
+13
-1
@@ -74,7 +74,11 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/B_ONE.png")
|
||||
@ImageOptions(preventInlining = true)
|
||||
ImageResource BOne();
|
||||
ImageResource BOneIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/BB10M.png")
|
||||
@ImageOptions(preventInlining = true)
|
||||
ImageResource BB10MIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/BAVARIA_CRUISER_41S.png")
|
||||
@ImageOptions(preventInlining = true)
|
||||
@@ -315,6 +319,10 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/RS_TERA.png")
|
||||
@ImageOptions(preventInlining = true)
|
||||
ImageResource RSTeraIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/SCAN_KAP_99.png")
|
||||
@ImageOptions(preventInlining = true)
|
||||
ImageResource ScanKap99Icon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/SONAR.png")
|
||||
@ImageOptions(preventInlining = true)
|
||||
@@ -332,6 +340,10 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
@ImageOptions(preventInlining = true)
|
||||
ImageResource SolingIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/SPAEKHUGGER.png")
|
||||
@ImageOptions(preventInlining = true)
|
||||
ImageResource SpaekhuggerIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/STAR.png")
|
||||
@ImageOptions(preventInlining = true)
|
||||
ImageResource StarIcon();
|
||||
|
||||
+8
-1
@@ -1,6 +1,7 @@
|
||||
package com.sap.sailing.gwt.home.communication.event.news;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.gwt.core.shared.GwtIncompatible;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
@@ -9,6 +10,7 @@ public abstract class AbstractRaceNewsEntryDTO extends NewsEntryDTO {
|
||||
|
||||
private String leaderboardName;
|
||||
private String leaderboardGroupName;
|
||||
private UUID leaderboardGroupId;
|
||||
private RegattaAndRaceIdentifier regattaAndRaceIdentfier;
|
||||
private String boatClass;
|
||||
|
||||
@@ -16,11 +18,12 @@ public abstract class AbstractRaceNewsEntryDTO extends NewsEntryDTO {
|
||||
}
|
||||
|
||||
@GwtIncompatible
|
||||
public AbstractRaceNewsEntryDTO(String leaderboardName, String leaderboardGroupName,
|
||||
public AbstractRaceNewsEntryDTO(String leaderboardName, String leaderboardGroupName, UUID leaderboardGroupId,
|
||||
RegattaAndRaceIdentifier regattaAndRaceIdentifier, String raceTitle, String boatClass, Date timestamp) {
|
||||
super(raceTitle, timestamp, null);
|
||||
this.leaderboardName = leaderboardName;
|
||||
this.leaderboardGroupName = leaderboardGroupName;
|
||||
this.leaderboardGroupId = leaderboardGroupId;
|
||||
this.boatClass = boatClass;
|
||||
}
|
||||
|
||||
@@ -36,6 +39,10 @@ public abstract class AbstractRaceNewsEntryDTO extends NewsEntryDTO {
|
||||
public String getLeaderboardGroupName() {
|
||||
return leaderboardGroupName;
|
||||
}
|
||||
|
||||
public UUID getLeaderboardGroupId() {
|
||||
return leaderboardGroupId;
|
||||
}
|
||||
|
||||
public RegattaAndRaceIdentifier getRegattaAndRaceIdentfier() {
|
||||
return regattaAndRaceIdentfier;
|
||||
|
||||
+4
-2
@@ -1,6 +1,7 @@
|
||||
package com.sap.sailing.gwt.home.communication.event.news;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.gwt.core.shared.GwtIncompatible;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
@@ -20,10 +21,11 @@ public class RaceCompetitorNewsEntryDTO extends AbstractRaceNewsEntryDTO {
|
||||
}
|
||||
|
||||
@GwtIncompatible
|
||||
public RaceCompetitorNewsEntryDTO(String leaderboardName, String leaderboardGroupName,
|
||||
public RaceCompetitorNewsEntryDTO(String leaderboardName, String leaderboardGroupName, UUID leaderboardGroupId,
|
||||
RegattaAndRaceIdentifier regattaAndRaceIdentifier, String raceTitle, String boatClass, Date timestamp,
|
||||
String competitorName, Type type) {
|
||||
super(leaderboardName, leaderboardGroupName, regattaAndRaceIdentifier, raceTitle, boatClass, timestamp);
|
||||
super(leaderboardName, leaderboardGroupName, leaderboardGroupId, regattaAndRaceIdentifier, raceTitle, boatClass,
|
||||
timestamp);
|
||||
this.competitorName = competitorName;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
+10
@@ -3,6 +3,7 @@ package com.sap.sailing.gwt.home.communication.race;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.gwt.home.communication.event.SimpleCompetitorDTO;
|
||||
@@ -67,6 +68,7 @@ public class SimpleRaceMetadataDTO implements DTO, Comparable<SimpleRaceMetadata
|
||||
|
||||
private String leaderboardName;
|
||||
private String leaderboardGroupName;
|
||||
private UUID leaderboardGroupId;
|
||||
private RegattaAndRaceIdentifier regattaAndRaceIdentifier;
|
||||
private String raceName;
|
||||
private Date start;
|
||||
@@ -104,6 +106,14 @@ public class SimpleRaceMetadataDTO implements DTO, Comparable<SimpleRaceMetadata
|
||||
this.leaderboardGroupName = leaderboardGroupName;
|
||||
}
|
||||
|
||||
public UUID getLeaderboardGroupId() {
|
||||
return leaderboardGroupId;
|
||||
}
|
||||
|
||||
public void setLeaderboardGroupId(UUID leaderboardGroupId) {
|
||||
this.leaderboardGroupId = leaderboardGroupId;
|
||||
}
|
||||
|
||||
public Date getStart() {
|
||||
return start;
|
||||
}
|
||||
|
||||
+8
-1
@@ -48,12 +48,13 @@ public class SailorProfileStatisticDTO implements Result, Serializable {
|
||||
@GwtIncompatible
|
||||
public SingleEntry(Double value, RegattaAndRaceIdentifier relatedRaceOrNull, TimePoint relatedTimePointOrNull,
|
||||
TimePoint relatedRaceStartTimePointOrNull, String leaderboardNameOrNull,
|
||||
String leaderboardGroupNameOrNull, UUID eventIdOrNull, String raceNameOrNull) {
|
||||
String leaderboardGroupNameOrNull, UUID leaderboardGroupIdOrNull, UUID eventIdOrNull, String raceNameOrNull) {
|
||||
super();
|
||||
this.value = value;
|
||||
this.relatedRaceOrNull = relatedRaceOrNull;
|
||||
this.leaderboardNameOrNull = leaderboardNameOrNull;
|
||||
this.leaderboardGroupNameOrNull = leaderboardGroupNameOrNull;
|
||||
this.leaderboardGroupIdOrNull = leaderboardGroupIdOrNull;
|
||||
this.eventIdOrNull = eventIdOrNull;
|
||||
this.raceNameOrNull = raceNameOrNull;
|
||||
if (relatedTimePointOrNull != null) {
|
||||
@@ -85,6 +86,7 @@ public class SailorProfileStatisticDTO implements Result, Serializable {
|
||||
private MillisecondsTimePoint relatedRaceStartTimePointOrNull;
|
||||
private String leaderboardNameOrNull;
|
||||
private String leaderboardGroupNameOrNull;
|
||||
private UUID leaderboardGroupIdOrNull;
|
||||
private String raceNameOrNull;
|
||||
private UUID eventIdOrNull;
|
||||
|
||||
@@ -109,6 +111,7 @@ public class SailorProfileStatisticDTO implements Result, Serializable {
|
||||
+ ", relatedTimePointOrNull=" + relatedTimePointOrNull + ", relatedRaceStartTimePointOrNull="
|
||||
+ relatedRaceStartTimePointOrNull + ", leaderboardNameOrNull=" + leaderboardNameOrNull
|
||||
+ ", leaderboardGroupNameOrNull=" + leaderboardGroupNameOrNull + ", raceNameOrNull="
|
||||
+ ", leaderboardGroupIdOrNull=" + leaderboardGroupIdOrNull + ", raceNameOrNull="
|
||||
+ raceNameOrNull + ", eventIdOrNull=" + eventIdOrNull + "]";
|
||||
}
|
||||
|
||||
@@ -123,6 +126,10 @@ public class SailorProfileStatisticDTO implements Result, Serializable {
|
||||
public String getLeaderboardGroupNameOrNull() {
|
||||
return leaderboardGroupNameOrNull;
|
||||
}
|
||||
|
||||
public UUID getLeaderboardGroupIdOrNull() {
|
||||
return leaderboardGroupIdOrNull;
|
||||
}
|
||||
|
||||
public MillisecondsTimePoint getRelatedRaceStartTimePointOrNull() {
|
||||
return relatedRaceStartTimePointOrNull;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user