mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-16 09:11:02 +00:00
made stuff compile again with SwissTiming replay adapter using connectivity params; not tested yet...
Change-Id: I71e5090eb6e0178e4cf4ccf41aaa0249563ff11e
This commit is contained in:
1 parent
5714320b83
commit
c9c78a694c
15 files changed
+339
-89
No files matched your search
+3
-1
@@ -31,6 +31,9 @@ public interface DomainFactory {
|
||||
|
||||
com.sap.sailing.domain.base.DomainFactory getBaseDomainFactory();
|
||||
|
||||
/**
|
||||
* @param boatClass if {@code null}, the boat class will be inferred from the Race ID
|
||||
*/
|
||||
Regatta getOrCreateDefaultRegatta(RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, String raceID, BoatClass boatClass, TrackedRegattaRegistry trackedRegattaRegistry);
|
||||
|
||||
Nationality getOrCreateNationality(String threeLetterIOCCode);
|
||||
@@ -68,5 +71,4 @@ public interface DomainFactory {
|
||||
|
||||
RaceDefinition createRaceDefinition(Regatta regatta, String raceID, Iterable<Competitor> competitors,
|
||||
List<ControlPoint> courseDefinition);
|
||||
|
||||
}
|
||||
+4
-3
@@ -59,9 +59,10 @@ public interface SwissTimingFactory {
|
||||
|
||||
RaceTracker createRaceTracker(Regatta regatta, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
WindStore windStore, boolean useInternalMarkPassingAlgorithm,
|
||||
DomainFactory domainFactory, TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver) throws UnknownHostException,
|
||||
InterruptedException, IOException, ParseException;
|
||||
WindStore windStore, boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore)
|
||||
throws UnknownHostException, InterruptedException, IOException, ParseException;
|
||||
|
||||
Race createRace(String raceId, String raceName, String description, BoatClass boatClass);
|
||||
|
||||
|
||||
-1
@@ -364,5 +364,4 @@ public class DomainFactoryImpl implements DomainFactory {
|
||||
boatClass, startList, delayToLiveInMillis, swissTimingFactory, domainFactory, raceLogStore,
|
||||
regattaLogStore, useInternalMarkPassingAlgorithm);
|
||||
}
|
||||
|
||||
}
|
||||
+5
-4
@@ -102,12 +102,13 @@ public class SwissTimingFactoryImpl implements SwissTimingFactory {
|
||||
@Override
|
||||
public RaceTracker createRaceTracker(Regatta regatta, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, long delayToLiveInMillis,
|
||||
WindStore windStore, boolean useInternalMarkPassingAlgorithm,
|
||||
DomainFactory domainFactory, TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver)
|
||||
WindStore windStore, boolean useInternalMarkPassingAlgorithm, DomainFactory domainFactory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, RaceLogStore raceLogStore,
|
||||
RegattaLogStore regattaLogStore)
|
||||
throws UnknownHostException, InterruptedException, IOException, ParseException {
|
||||
return new SwissTimingRaceTrackerImpl(regatta, raceID, raceName, raceDescription, boatClass, hostname, port,
|
||||
startList, windStore, domainFactory, this, trackedRegattaRegistry, raceLogResolver, delayToLiveInMillis,
|
||||
useInternalMarkPassingAlgorithm);
|
||||
startList, windStore, domainFactory, this, trackedRegattaRegistry, raceLogStore, regattaLogStore,
|
||||
raceLogResolver, delayToLiveInMillis, useInternalMarkPassingAlgorithm);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+17
-9
@@ -115,23 +115,32 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver, long delayToLiveInMillis,
|
||||
boolean useInternalMarkPassingAlgorithm) throws InterruptedException,
|
||||
UnknownHostException, IOException, ParseException {
|
||||
this(domainFactory.getOrCreateDefaultRegatta(raceLogStore, regattaLogStore, raceID,
|
||||
boatClass, trackedRegattaRegistry), raceID, raceName,
|
||||
this(/* regatta */ null, raceID, raceName,
|
||||
raceDescription, boatClass, hostname, port, startList, windStore, domainFactory, factory,
|
||||
trackedRegattaRegistry,
|
||||
raceLogResolver, delayToLiveInMillis, useInternalMarkPassingAlgorithm);
|
||||
raceLogStore, regattaLogStore, raceLogResolver, delayToLiveInMillis, useInternalMarkPassingAlgorithm);
|
||||
}
|
||||
|
||||
protected SwissTimingRaceTrackerImpl(Regatta regatta, String raceID, String raceName, String raceDescription,
|
||||
BoatClass boatClass, String hostname, int port, StartList startList, WindStore windStore,
|
||||
DomainFactory domainFactory, SwissTimingFactory factory,
|
||||
TrackedRegattaRegistry trackedRegattaRegistry, RaceLogResolver raceLogResolver,
|
||||
long delayToLiveInMillis, boolean useInternalMarkPassingAlgorithm) throws InterruptedException, UnknownHostException, IOException,
|
||||
ParseException {
|
||||
DomainFactory domainFactory, SwissTimingFactory factory, TrackedRegattaRegistry trackedRegattaRegistry,
|
||||
RaceLogStore raceLogStore, RegattaLogStore regattaLogStore, RaceLogResolver raceLogResolver,
|
||||
long delayToLiveInMillis, boolean useInternalMarkPassingAlgorithm)
|
||||
throws InterruptedException, UnknownHostException, IOException, ParseException {
|
||||
super();
|
||||
this.raceLogResolver = raceLogResolver;
|
||||
this.tmdMessageQueue = new TMDMessageQueue(this);
|
||||
this.regatta = regatta;
|
||||
final Regatta effectiveRegatta;
|
||||
// Try to find a pre-associated event based on the Race ID
|
||||
if (regatta == null) {
|
||||
effectiveRegatta = trackedRegattaRegistry.getRememberedRegattaForRace(raceID);
|
||||
} else {
|
||||
effectiveRegatta = regatta;
|
||||
}
|
||||
// if regatta is still null, no previous assignment of any of the races in this TracTrac event to a Regatta was
|
||||
// found; in this case, create a default regatta based on the TracTrac event data
|
||||
this.regatta = effectiveRegatta == null ? domainFactory.getOrCreateDefaultRegatta(raceLogStore, regattaLogStore,
|
||||
raceID, boatClass, trackedRegattaRegistry) : effectiveRegatta;
|
||||
this.connector = factory.getOrCreateSailMasterConnector(hostname, port, raceID, raceName, raceDescription, boatClass);
|
||||
this.domainFactory = domainFactory;
|
||||
this.raceID = raceID;
|
||||
@@ -147,7 +156,6 @@ public class SwissTimingRaceTrackerImpl extends AbstractRaceTrackerImpl
|
||||
this.delayToLiveInMillis = delayToLiveInMillis;
|
||||
this.competitorsByBoatId = new HashMap<String, Competitor>();
|
||||
this.useInternalMarkPassingAlgorithm = useInternalMarkPassingAlgorithm;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ public class SwissTimingTrackingConnectivityParameters implements RaceTrackingCo
|
||||
WindStore windStore, RaceLogResolver raceLogResolver) throws Exception {
|
||||
return swissTimingFactory.createRaceTracker(regatta, raceID, raceName, raceDescription, boatClass, hostname,
|
||||
port, startList, delayToLiveInMillis, windStore, useInternalMarkPassingAlgorithm,
|
||||
domainFactory, trackedRegattaRegistry, raceLogResolver);
|
||||
domainFactory, trackedRegattaRegistry, raceLogResolver, raceLogStore, regattaLogStore);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user