diff --git a/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoDataFixMapper.java b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoDataFixMapper.java index bfc21932801..e4a300b3c40 100644 --- a/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoDataFixMapper.java +++ b/java/com.sap.sailing.domain.racelogtrackingadapter/src/com/sap/sailing/domain/racelogtracking/impl/BravoDataFixMapper.java @@ -11,6 +11,10 @@ import com.sap.sailing.domain.tracking.DynamicSensorFixTrack; import com.sap.sailing.domain.tracking.DynamicTrackedRace; import com.sap.sailing.domain.tracking.impl.BravoFixTrackImpl; +/** + * {@link SensorFixMapper} to handle {@link BravoFix}es. + * + */ public class BravoDataFixMapper implements SensorFixMapper, Competitor> { @Override diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/racelog/tracking/SensorFixMapper.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/racelog/tracking/SensorFixMapper.java index dd00aedf6c3..3ed5bfaefee 100644 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/racelog/tracking/SensorFixMapper.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/racelog/tracking/SensorFixMapper.java @@ -5,11 +5,38 @@ import com.sap.sailing.domain.tracking.Track; import com.sap.sse.common.Timed; import com.sap.sse.common.WithID; +/** + * This is used by the fix tracking mechanism to make fixes available in a track. + * This makes it possible to e.g. map fixes to another type before adding them to the track. + * + * @param the type of fix this mapper handles + * @param the type of track this mapper adds the fixes to + * @param the type of item the track is mapped to + */ public interface SensorFixMapper, K extends WithID> { + /** + * Extracts the track from the TrackedRace or creates a new one if it doesn't already exist. + * + * @param race the race to get the track for + * @param key the mapped item to get the track for + * @return the track to add fixes to + */ TrackT getTrack(DynamicTrackedRace race, K key); + /** + * Adds a fix to the given Track. This can also be used to map fixes to another type if necessary. + * + * @param track the track to add the fix to + * @param fix the fix to add + */ void addFix(TrackT track, FixT fix); + /** + * Checks if this mapper can be used for tracks/fixes that are associated to a given RegattaLog device mapping event. + * + * @param eventType the type of the RegattaLog device mapping event + * @return true if this mapper can handle fixes for the event, false otherwise. + */ boolean isResponsibleFor(Class eventType); }