You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.2 KiB

package shared.dataInput;
import network.Messages.Enums.RaceTypeEnum;
import shared.model.Boat;
import shared.model.CompoundMark;
import shared.model.GPSCoordinate;
import shared.model.Leg;
import java.time.ZonedDateTime;
import java.util.List;
/**
* An object that holds relevant data for a race. <br>
* Information includes: {@link shared.model.Boat Boat}s,
* {@link shared.model.Leg Leg}s, {@link shared.model.CompoundMark CompoundMark}s and
* the {@link shared.model.GPSCoordinate GPSCoordinate}s.
*/
public interface RaceDataSource {
/**
* Returns the list of sourceIDs for boats competing in the race.
* @return SourceIDs for boats competing in the race.
*/
List<Integer> getParticipants();
/**
* Returns the list of legs in the race.
* @return The list of legs in the race.
*/
List<Leg> getLegs();
/**
* Returns a list of coordinates representing the boundary of the race.
* @return The boundary of the race.
*/
List<GPSCoordinate> getBoundary();
/**
* Returns a list of CompoundMarks in the race.
* @return The sequence of compounds marks in the race.
*/
List<CompoundMark> getCompoundMarks();
/**
* Returns the ID of the race.
* @return The ID of the race.
*/
int getRaceId();
/**
* Returns the type of race.
* @return The type of race.
*/
RaceTypeEnum getRaceType();
/**
* Returns the start time/date of the race.
* @return The race's start time.
*/
ZonedDateTime getStartDateTime();
/**
* Returns the creation time/date of the race xml file.
* @return The race xml file's creation time.
*/
ZonedDateTime getCreationDateTime();
/**
* Returns whether or not the race has been postponed.
* @return True if the race has been postponed, false otherwise.
*/
boolean getPostponed();
/**
* Returns the GPS coordinate of the top left of the race map area.
* @return Top left GPS coordinate.
*/
GPSCoordinate getMapTopLeft();
/**
* Returns the GPS coordinate of the bottom right of the race map area.
* @return Bottom right GPS coordinate.
*/
GPSCoordinate getMapBottomRight();
}