Mock.Polars:
Finished PolarsTest test cases. Fixed a number of javadoc errors across the codebase. #story[873]
This commit is contained in:
@@ -97,6 +97,7 @@ public class BoatXMLReader extends XMLReader {
|
||||
/**
|
||||
* Reads the information about one boat
|
||||
* Ignored values: ShapeID, StoweName, HullNum, Skipper, Type
|
||||
* @param boat The node to read boat data from.
|
||||
*/
|
||||
private void readSingleBoat(Node boat) {
|
||||
StreamedBoat streamedBoat;
|
||||
@@ -127,9 +128,12 @@ public class BoatXMLReader extends XMLReader {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reads the positional information about a boat
|
||||
* Ignored values: FlagPosition, MastTop, Z value of GPSposition
|
||||
* @param sourceID The source ID of the boat.
|
||||
* @param GPSPosition The relative GPS position of the boat.
|
||||
*/
|
||||
private void readBoatPositionInformation(int sourceID, Node GPSPosition) {
|
||||
// TODO Get relative point before implementing. (GPSposition is based off a relative point).
|
||||
|
||||
@@ -138,6 +138,7 @@ public class StreamedCourseXMLReader extends XMLReader {
|
||||
|
||||
/**
|
||||
* Indexes CompoundMark elements by their ID for use in generating the course, and populates list of Markers.
|
||||
* @throws StreamedCourseXMLException if a CompoundMark element contains an unhandled number of compoundMarks.
|
||||
* @see seng302.Model.Marker
|
||||
*/
|
||||
private void readCompoundMarks() throws StreamedCourseXMLException {
|
||||
|
||||
@@ -323,6 +323,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
/**
|
||||
* Draws all track points for a given boat. Colour is set by boat, opacity by track point.
|
||||
* @param boat whose track is displayed
|
||||
* @param colour The color to use for the track.
|
||||
* @see seng302.Model.TrackPoint
|
||||
*/
|
||||
private void drawTrack(Boat boat, Color colour) {
|
||||
@@ -349,4 +350,4 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,8 +169,9 @@ public class RaceXMLReader extends XMLReader implements RaceDataSource {
|
||||
|
||||
/**
|
||||
* gets a marker from the XML file
|
||||
* @param start base nodelist this should be the tag that contains <coordinate></coordinate>
|
||||
* @return
|
||||
*
|
||||
* @param start base nodelist this should be the tag that contains {@literal <coordinate></coordinate>}.
|
||||
* @return The Marker object constructed from the XML file.
|
||||
*/
|
||||
private Marker getMarker(NodeList start) {
|
||||
return getMarker(start, 0);
|
||||
@@ -178,9 +179,10 @@ public class RaceXMLReader extends XMLReader implements RaceDataSource {
|
||||
|
||||
/**
|
||||
* gets a marker from the XML file
|
||||
* @param start base nodelist this should be the tag that contains <coordinate></coordinate>
|
||||
*
|
||||
* @param start base nodelist this should be the tag that contains {@literal <coordinate></coordinate>}.
|
||||
* @param startIndex index in the node that has the coordinate tag
|
||||
* @return
|
||||
* @return The Marker object constructed from the XML file.
|
||||
*/
|
||||
private Marker getMarker(NodeList start, int startIndex) {
|
||||
return getMarker(start, startIndex, 0);
|
||||
@@ -188,10 +190,11 @@ public class RaceXMLReader extends XMLReader implements RaceDataSource {
|
||||
|
||||
/**
|
||||
* gets a marker from the XML file
|
||||
* @param start base nodelist this should be the tag that contains <coordinate></coordinate>
|
||||
*
|
||||
* @param start base nodelist this should be the tag that contains {@literal <coordinate></coordinate>}.
|
||||
* @param startIndex index in the node that has the coordinate tag
|
||||
* @param nodeIndex coordinate index
|
||||
* @return
|
||||
* @param nodeIndex coordinate index
|
||||
* @return The Marker object constructed from the XML file.
|
||||
*/
|
||||
private Marker getMarker(NodeList start, int startIndex, int nodeIndex) {
|
||||
NodeList nodeList = ((Element) start.item(startIndex)).getElementsByTagName("marker");
|
||||
@@ -200,9 +203,10 @@ public class RaceXMLReader extends XMLReader implements RaceDataSource {
|
||||
}
|
||||
|
||||
/**
|
||||
* gets a changes a marker to GPS coordinates into a marker
|
||||
* Constructs a Marker object from an XML element.
|
||||
*
|
||||
* @param markerNode marker to turn into coordinates
|
||||
* @return
|
||||
* @return The Marker object constructed from the XML element.
|
||||
*/
|
||||
private Marker getMarker(Element markerNode) {
|
||||
|
||||
@@ -221,29 +225,31 @@ public class RaceXMLReader extends XMLReader implements RaceDataSource {
|
||||
|
||||
/**
|
||||
* gets a coordinates from the XML file
|
||||
* @param start base nodelist this should be the tag that contains <coordinate></coordinate>
|
||||
* @return
|
||||
*
|
||||
* @param start base nodelist this should be the tag that contains {@literal <coordinate></coordinate>}
|
||||
* @return The GPSCoordinate constructed from the XML file.
|
||||
*/
|
||||
private GPSCoordinate getCoordinates(NodeList start) {
|
||||
return getCoordinates(start, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* gets a coordinates from the XML file
|
||||
* @param start base nodelist this should be the tag that contains <coordinate></coordinate>
|
||||
*
|
||||
* @param start base nodelist this should be the tag that contains {@literal <coordinate></coordinate>}.
|
||||
* @param startIndex the index the tag containing the coordinate should be in
|
||||
* @return
|
||||
* @return The GPSCoordinate constructed from the XML file.
|
||||
*/
|
||||
private GPSCoordinate getCoordinates(NodeList start, int startIndex) {
|
||||
return getCoordinates(start, startIndex, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* gets a coordinates from the XML file
|
||||
* @param start base nodelist this should be the tag that contains <coordinate></coordinate>
|
||||
/**
|
||||
* Gets a GPSCoordinate from the XML file from a specific node and element.
|
||||
* @param start base nodelist this should be the tag that contains {@literal <coordinate></coordinate>}.
|
||||
* @param startIndex the index the tag containing the coordinate should be in
|
||||
* @param nodeIndex The coordinate index
|
||||
* @return
|
||||
* @param nodeIndex The coordinate index
|
||||
* @return The GPSCoordinate constructed from the XML file.
|
||||
*/
|
||||
private GPSCoordinate getCoordinates(NodeList start, int startIndex, int nodeIndex) {
|
||||
NodeList nodeList = ((Element) start.item(startIndex)).getElementsByTagName("coordinate");
|
||||
@@ -252,10 +258,10 @@ public class RaceXMLReader extends XMLReader implements RaceDataSource {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the coordinate TODO raise exception that runs when the XML is formatted wrongly.
|
||||
*
|
||||
* @param coordNode
|
||||
* @return
|
||||
* Returns the coordinate object from a coordinate XML element.
|
||||
* TODO raise exception that runs when the XML is formatted wrongly.
|
||||
* @param coordNode The XML coordinate element to parse.
|
||||
* @return The GPSCoordinate constructed from the XML coordinate element.
|
||||
*/
|
||||
private GPSCoordinate getCoordinates(Element coordNode) {
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ public class VisualiserInput implements Runnable {
|
||||
|
||||
/**
|
||||
* Sets the wind direction for the current course.
|
||||
* @param direction The new wind direction for the course.
|
||||
*/
|
||||
private void setCourseWindDirection(double direction) {
|
||||
this.course.setWindDirection(direction);
|
||||
|
||||
Reference in New Issue
Block a user