Added more JavaDocs

This commit is contained in:
Steffen Schaefer committed 2016-06-23 14:49:43 +02:00
1 parent 3564470b6a
commit f2bc540daa
6 files changed
+46

No files matched your search

@@ -4,6 +4,9 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* Metadata that defines the column structure of {@link com.sap.sailing.domain.common.tracking.DoubleVectorFix}es when imported.
*/
public enum BravoSensorDataMetadata {
INSTANCE;
@@ -2,8 +2,12 @@ package com.sap.sailing.domain.abstractlog.regatta;
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceCompetitorMappingEvent;
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceCompetitorSensorDataMappingEvent;
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceMappingEvent;
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceMarkMappingEvent;
/**
* Used to dynamically dispatch calls for {@link RegattaLogDeviceMappingEvent}s depending on the concrete type.
*/
public interface EventMappingVisitor {
void visit(RegattaLogDeviceMarkMappingEvent event);
@@ -11,6 +11,9 @@ import com.sap.sailing.domain.base.Competitor;
import com.sap.sailing.domain.racelogtracking.DeviceIdentifier;
import com.sap.sse.common.TimePoint;
/**
* Mapping event for devices mapped for Bravo type fixes.
*/
public class RegattaLogDeviceCompetitorBravoMappingEventImpl extends RegattaLogDeviceMappingEventImpl<Competitor>
implements RegattaLogDeviceCompetitorSensorDataMappingEvent {
private static final long serialVersionUID = -1494030544804758753L;
@@ -3,6 +3,11 @@ package com.sap.sailing.domain.racelog.tracking;
import com.sap.sailing.domain.racelogtracking.DeviceIdentifier;
import com.sap.sse.common.Timed;
/**
* Listener to be informed about new fixes by {@link SensorFixStore}.
*
* @param <FixT> the type of fixes this listener can consume.
*/
public interface FixReceivedListener<FixT extends Timed> {
void fixReceived(DeviceIdentifier device, FixT fix);
}
@@ -5,6 +5,7 @@ import java.io.InputStream;
import java.io.Serializable;
import com.sap.sailing.domain.abstractlog.AbstractLogEventAuthor;
import com.sap.sailing.domain.abstractlog.regatta.RegattaLogEvent;
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceCompetitorSensorDataMappingEvent;
import com.sap.sailing.domain.base.Competitor;
import com.sap.sailing.domain.common.tracking.DoubleVectorFix;
@@ -12,17 +13,44 @@ import com.sap.sailing.domain.racelogtracking.DeviceIdentifier;
import com.sap.sailing.domain.trackfiles.TrackFileImportDeviceIdentifier;
import com.sap.sse.common.TimePoint;
/**
* Definition of importers used by SensorDataImportServlet to do the import of a specific file type.
*/
public interface DoubleVectorFixImporter {
interface Callback {
void addFix(DoubleVectorFix fix, TrackFileImportDeviceIdentifier device);
}
/**
* Parses the uploaded file and calls the callback for every fix that's contained in the input.
*
* @param inputStream
* the uploaded file as {@link InputStream}
* @param callback
* the callback to call for every new fix
* @param sourceName
* the uploaded file's name. This can be used to identify the file type if the importer can import
* different formats.
* @throws FormatNotSupportedException
* if the uploaded file can't be parsed by the importer
* @throws IOException
* if there is a problem while reading the file
*/
void importFixes(InputStream inputStream, Callback callback, String sourceName)
throws FormatNotSupportedException, IOException;
/**
* The type is a String that's presented to the user for selection of the type when doing an import.
* The type is used on import to identify the importer to use depending on the user's selection.
*
* @return name of the file type to be imported by the importer
*/
String getType();
/**
* Creates the {@link RegattaLogEvent} for the DeviceMapping.
*/
RegattaLogDeviceCompetitorSensorDataMappingEvent createEvent(TimePoint createdAt, TimePoint logicalTimePoint,
AbstractLogEventAuthor author, Serializable id, Competitor mappedTo, DeviceIdentifier device,
TimePoint from, TimePoint to);
@@ -1,5 +1,8 @@
package com.sap.sailing.domain.tracking;
/**
* Empty implementation of {@link TrackedRegattaListener} e.g. used by tests.
*/
public enum EmptyTrackedRegattaListener implements TrackedRegattaListener {
INSTANCE;