mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
removed unused properties from RaceRecord
This commit is contained in:
1 parent
49a7d7e761
commit
a79af78835
4 files changed
+22
-25
No files matched your search
+1
-1
@@ -126,7 +126,7 @@ public class RaceRecord {
|
||||
}
|
||||
|
||||
public boolean hasLiveAndStoredURI() {
|
||||
return !(liveURI == null);
|
||||
return liveURI != null;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
||||
+6
-7
@@ -781,11 +781,10 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
}
|
||||
|
||||
result.add(new TracTracRaceRecordDTO(raceRecord.getID(), raceRecord.getEventName(), raceRecord.getName(),
|
||||
raceRecord.getParamURL() != null ? raceRecord.getParamURL().toString() : "",
|
||||
raceRecord.getReplayURL(), raceRecord.getLiveURI() != null ? raceRecord.getLiveURI().toString() : "",
|
||||
raceRecord.getStoredURI() != null ? raceRecord.getStoredURI().toString() : "", raceRecord.getTrackingStartTime().asDate(), raceRecord
|
||||
.getTrackingEndTime().asDate(), raceRecord.getRaceStartTime().asDate(), raceRecord.getBoatClassNames(),
|
||||
raceRecord.getRaceStatus(), raceRecord.getJsonURL().toString()));
|
||||
raceRecord.getTrackingStartTime().asDate(),
|
||||
raceRecord
|
||||
.getTrackingEndTime().asDate(), raceRecord.getRaceStartTime().asDate(),
|
||||
raceRecord.getBoatClassNames(), raceRecord.getRaceStatus(), raceRecord.getJsonURL().toString()));
|
||||
}
|
||||
return new Pair<String, List<TracTracRaceRecordDTO>>(raceRecords.getA(), result);
|
||||
}
|
||||
@@ -797,7 +796,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
logger.info("tracWithTracTrac for regatta "+regattaToAddTo+" for race records "+rrs+" with liveURI "+liveURI+" and storedURI "+storedURI);
|
||||
for (TracTracRaceRecordDTO rr : rrs) {
|
||||
// reload JSON and load clientparams.php
|
||||
RaceRecord record = getService().getSingleTracTracRaceRecord(new URL(rr.jsonURL), rr.ID, /*loadClientParams*/true);
|
||||
RaceRecord record = getService().getSingleTracTracRaceRecord(new URL(rr.jsonURL), rr.id, /*loadClientParams*/true);
|
||||
logger.info("Loaded race " + record.getName() + " in " + record.getEventName() + " start:" + record.getRaceStartTime() + " trackingStart:" + record.getTrackingStartTime() + " trackingEnd:" + record.getTrackingEndTime());
|
||||
if (liveURI == null || liveURI.trim().length() == 0) {
|
||||
liveURI = record.getLiveURI().toString();
|
||||
@@ -812,7 +811,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
MongoWindStoreFactory.INSTANCE.getMongoWindStore(mongoObjectFactory, domainObjectFactory),
|
||||
RaceTracker.TIMEOUT_FOR_RECEIVING_RACE_DEFINITION_IN_MILLISECONDS, simulateWithStartTimeNow, tracTracUsername, tracTracPassword);
|
||||
if (trackWind) {
|
||||
new Thread("Wind tracking starter for race " + rr.regattaName + "/" + rr.name) {
|
||||
new Thread("Wind tracking starter for race " + record.getEventName() + "/" + record.getName()) {
|
||||
public void run() {
|
||||
try {
|
||||
startTrackingWind(raceHandle, correctWindByDeclination,
|
||||
|
||||
+4
-13
@@ -8,11 +8,7 @@ public class TracTracRaceRecordDTO implements IsSerializable {
|
||||
public String regattaName;
|
||||
public String name;
|
||||
public String jsonURL;
|
||||
public String replayURL;
|
||||
public String liveURI;
|
||||
public String storedURI;
|
||||
public String paramURL;
|
||||
public String ID;
|
||||
public String id;
|
||||
public Date trackingStartTime;
|
||||
public Date trackingEndTime;
|
||||
public Date raceStartTime;
|
||||
@@ -21,17 +17,12 @@ public class TracTracRaceRecordDTO implements IsSerializable {
|
||||
|
||||
public TracTracRaceRecordDTO() {}
|
||||
|
||||
public TracTracRaceRecordDTO(String id, String regattaName, String name, String paramURL,
|
||||
String replayURL, String liveURI, String storedURI, Date trackingStartTime, Date trackingEndTime, Date raceStartTime,
|
||||
Iterable<String> boatClassNames, String status, String jsonUrl) {
|
||||
public TracTracRaceRecordDTO(String id, String regattaName, String name, Date trackingStartTime,
|
||||
Date trackingEndTime, Date raceStartTime, Iterable<String> boatClassNames, String status, String jsonUrl) {
|
||||
super();
|
||||
this.regattaName = regattaName;
|
||||
this.name = name;
|
||||
this.replayURL = replayURL;
|
||||
this.paramURL = paramURL;
|
||||
this.liveURI = liveURI;
|
||||
this.storedURI = storedURI;
|
||||
ID = id;
|
||||
this.id = id;
|
||||
this.trackingStartTime = trackingStartTime;
|
||||
this.trackingEndTime = trackingEndTime;
|
||||
this.raceStartTime = raceStartTime;
|
||||
|
||||
@@ -221,10 +221,17 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
Iterable<Triple<Regatta, RaceDefinition, String>> getWindTrackedRaces();
|
||||
|
||||
/**
|
||||
* For the JSON URL of an account / event, lists the paramURLs that can be used for {@link #addTracTracRace(URL, URI, URI, WindStore, long)}
|
||||
* calls to individually start tracking races of this event, rather than tracking <em>all</em> races in the event which
|
||||
* is hardly ever useful. The returned pair's first component is the event name.
|
||||
* @param loadClientParams TODO
|
||||
* For the JSON URL of an account / event, lists the paramURLs that can be used for
|
||||
* {@link #addTracTracRace(URL, URI, URI, WindStore, long)} calls to individually start tracking races of this
|
||||
* event, rather than tracking <em>all</em> races in the event which is hardly ever useful. The returned pair's
|
||||
* first component is the event name.
|
||||
*
|
||||
* @param loadClientParams
|
||||
* shall the properties from the clientparams.php file such as liveURI and storedURI already be loaded?
|
||||
* Generally, this is not necessary as the
|
||||
* {@link #addTracTracRace(RegattaIdentifier, URL, URI, URI, URI, TimePoint, TimePoint, RaceLogStore, WindStore, long, boolean, String, String)}
|
||||
* and {@link #addTracTracRace(URL, URI, URI, URI, RaceLogStore, WindStore, long, String, String)} will
|
||||
* fetch the JSON and clientparams.php documents to work with up-to-date data.
|
||||
*/
|
||||
Pair<String, List<RaceRecord>> getTracTracRaceRecords(URL jsonURL, boolean loadClientParams) throws IOException, ParseException,
|
||||
org.json.simple.parser.ParseException, URISyntaxException;
|
||||
|
||||
Reference in new issue
Block a user