mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-20 19:20:04 +00:00
Bug 4316: Added JavaDocs
This commit is contained in:
1 parent
d1683efca8
commit
76dc7dc7b3
5 files changed
+24
No files matched your search
+3
@@ -2,6 +2,9 @@ package com.sap.sailing.domain.common.tracking;
|
||||
|
||||
import com.sap.sailing.domain.common.Bearing;
|
||||
|
||||
/**
|
||||
* Extended version of {@link BravoFix} that provides access to more measures found in the extended data format.
|
||||
*/
|
||||
public interface BravoExtendedFix extends BravoFix {
|
||||
Bearing getDbRakePort();
|
||||
Bearing getDbRakeStbd();
|
||||
|
||||
+3
@@ -11,6 +11,9 @@ import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.racelogtracking.DeviceIdentifier;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
|
||||
/**
|
||||
* Base type for mapping event for devices mapped for specific Bravo type fixes.
|
||||
*/
|
||||
public abstract class AbstractRegattaLogDeviceCompetitorSensorDataMappingEventImpl extends RegattaLogDeviceMappingEventImpl<Competitor>
|
||||
implements RegattaLogDeviceCompetitorSensorDataMappingEvent {
|
||||
private static final long serialVersionUID = -1494030544804758753L;
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.io.Serializable;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.Bearing;
|
||||
import com.sap.sailing.domain.common.Distance;
|
||||
import com.sap.sailing.domain.common.tracking.BravoExtendedFix;
|
||||
import com.sap.sailing.domain.common.tracking.BravoFix;
|
||||
import com.sap.sailing.domain.common.tracking.GPSFixMoving;
|
||||
import com.sap.sse.common.Duration;
|
||||
@@ -74,6 +75,12 @@ public interface BravoFixTrack<ItemType extends WithID & Serializable> extends S
|
||||
*/
|
||||
Distance getDistanceSpentFoiling(GPSFixTrack<Competitor, GPSFixMoving> gpsFixTrack, TimePoint from, TimePoint to);
|
||||
|
||||
/**
|
||||
* Returns {@code true}, if the track contains {@link BravoExtendedFix} instances instead of simple {@link BravoFix BravoFixes}.
|
||||
* It is not guaranteed that the track exclusively contains {@link BravoExtendedFix BravoExtendedFixes} if this is {@code true}.
|
||||
* It is up to the operator to ensure, that either normal Bravo data or the extended data is imported, but it isn't enforced.
|
||||
* If both types of fixes are contained, data may seem to have "gaps" because single fixes returned do not provide the extended data.
|
||||
*/
|
||||
boolean hasExtendedFixes();
|
||||
|
||||
Bearing getDbRakePortIfAvailable(TimePoint timePoint);
|
||||
|
||||
@@ -234,6 +234,9 @@ public interface TrackedRace extends Serializable, IsManagedByCache<SharedDomain
|
||||
*/
|
||||
<FixT extends SensorFix, TrackT extends SensorFixTrack<Competitor, FixT>> TrackT getSensorTrack(Competitor competitor, String trackName);
|
||||
|
||||
/**
|
||||
* Returns all contained {@link SensorFixTrack SensorFixTracks} for the given trackName and associated to any competitor.
|
||||
*/
|
||||
<FixT extends SensorFix, TrackT extends SensorFixTrack<Competitor, FixT>> Iterable<TrackT> getSensorTracks(String trackName);
|
||||
|
||||
/**
|
||||
|
||||
+8
@@ -178,6 +178,14 @@ public class BravoFixTrackImpl<ItemType extends WithID & Serializable> extends S
|
||||
return hasExtendedFixes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic implementation to get values from extended fixes. The implementation ensured that in case of simple
|
||||
* {@link BravoFix} instances, just {@code null} is returned. If valid {@link BravoExtendedFix BravoExtendedFixes}
|
||||
* are found, the provided getter is used to extract the value from the identified fix.
|
||||
*
|
||||
* In case of a mix of {@link BravoFix} and {@link BravoExtendedFix} instances, this method may return null values
|
||||
* for specific {@link TimePoint TimePoints}.
|
||||
*/
|
||||
private Bearing getBearingValueFromExtendedFix(final TimePoint timePoint, final Function<BravoExtendedFix, Bearing> getter) {
|
||||
if (!hasExtendedFixes) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user