From 8d87da620612ba23fbdf33f7f4d9ff49ee2bfa3b Mon Sep 17 00:00:00 2001 From: Fan-Wu Yang Date: Tue, 15 Aug 2017 22:44:56 +1200 Subject: [PATCH] fixed java doc issues on my side #story[1092] --- .../src/main/java/mock/app/Event.java | 4 ++++ .../main/java/mock/xml/RaceXMLCreator.java | 4 +++- .../java/shared/xml/Race/XMLCompoundMark.java | 6 ++--- .../xml/Race/XMLCompoundMarkSequence.java | 2 +- .../main/java/shared/xml/Race/XMLCorner.java | 12 +++++----- .../main/java/shared/xml/Race/XMLCourse.java | 2 +- .../java/shared/xml/Race/XMLCourseLimit.java | 2 +- .../main/java/shared/xml/Race/XMLLimit.java | 12 +++++----- .../main/java/shared/xml/Race/XMLMark.java | 12 +++++----- .../java/shared/xml/Race/XMLParticipants.java | 2 +- .../main/java/shared/xml/Race/XMLRace.java | 4 ++-- .../java/shared/xml/Race/XMLRaceFactory.java | 22 +++++++++---------- .../main/java/shared/xml/Race/XMLYacht.java | 4 ++-- 13 files changed, 47 insertions(+), 41 deletions(-) diff --git a/racevisionGame/src/main/java/mock/app/Event.java b/racevisionGame/src/main/java/mock/app/Event.java index 0b742786..6b8f5553 100644 --- a/racevisionGame/src/main/java/mock/app/Event.java +++ b/racevisionGame/src/main/java/mock/app/Event.java @@ -94,6 +94,10 @@ public class Event { * @throws XMLReaderException Thrown if any of the xml files cannot be parsed. * @throws InvalidBoatDataException Thrown if the boat xml file cannot be parsed. * @throws InvalidRegattaDataException Thrown if the regatta xml file cannot be parsed. + * @throws ParserConfigurationException Error in parsing XML + * @throws JAXBException error in mapping the xml to a schema + * @throws SAXException error in reading the schema + * @throws IOException error in finding the schema */ public void start() throws InvalidRaceDataException, XMLReaderException, InvalidBoatDataException, InvalidRegattaDataException, ParserConfigurationException, JAXBException, SAXException, IOException { new Thread(connectionAcceptor, "Event.Start()->ConnectionAcceptor thread").start(); diff --git a/racevisionGame/src/main/java/mock/xml/RaceXMLCreator.java b/racevisionGame/src/main/java/mock/xml/RaceXMLCreator.java index 4daf3cce..5f7b12cf 100644 --- a/racevisionGame/src/main/java/mock/xml/RaceXMLCreator.java +++ b/racevisionGame/src/main/java/mock/xml/RaceXMLCreator.java @@ -70,6 +70,9 @@ public class RaceXMLCreator { * @throws XMLReaderException if the xml is not readable * @throws InvalidRaceDataException if the race is invalid * @throws JAXBException if the Race class cannot be parsed into a xml. + * @throws IOException if the schema file cannot be found + * @throws SAXException error in schema file + * @throws ParserConfigurationException error in parsing the schema file */ public static String alterRaceToWind(String s, double degrees) throws XMLReaderException, InvalidRaceDataException, JAXBException, IOException, SAXException, ParserConfigurationException { RaceXMLReader reader = new RaceXMLReader(s, XMLFileType.ResourcePath); @@ -187,7 +190,6 @@ public class RaceXMLCreator { /** * Sets the xml description of the race to show the race was created now, and starts in 4 minutes * @param raceXML The race.xml contents. - * @return String containing edited xml */ public static void setRaceXMLAtCurrentTimeToNow(XMLRace raceXML) { diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLCompoundMark.java b/racevisionGame/src/main/java/shared/xml/Race/XMLCompoundMark.java index c4de29c7..7149c4f1 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLCompoundMark.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLCompoundMark.java @@ -83,7 +83,7 @@ public class XMLCompoundMark { * Objects of the following type(s) are allowed in the list * {@link XMLMark } * - * + * @return list of marks */ public List getMark() { if (mark == null) { @@ -94,7 +94,7 @@ public class XMLCompoundMark { /** * Gets the value of the compoundMarkID property. - * + * @return the id of the compound mark */ public int getCompoundMarkID() { return compoundMarkID; @@ -102,7 +102,7 @@ public class XMLCompoundMark { /** * Sets the value of the compoundMarkID property. - * + * @param value sets ID of the compound mark */ public void setCompoundMarkID(int value) { this.compoundMarkID = value; diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLCompoundMarkSequence.java b/racevisionGame/src/main/java/shared/xml/Race/XMLCompoundMarkSequence.java index 87f28dda..cca11aa5 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLCompoundMarkSequence.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLCompoundMarkSequence.java @@ -75,7 +75,7 @@ public class XMLCompoundMarkSequence { * Objects of the following type(s) are allowed in the list * {@link XMLCorner } * - * + * @return getCorners/legs that the boats are to sequentially pass */ public List getCorner() { if (corner == null) { diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLCorner.java b/racevisionGame/src/main/java/shared/xml/Race/XMLCorner.java index db203fee..fa6237ac 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLCorner.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLCorner.java @@ -49,7 +49,7 @@ public class XMLCorner { /** * Gets the value of the compoundMarkID property. - * + * @return Id of the compound mark */ public int getCompoundMarkID() { return compoundMarkID; @@ -57,7 +57,7 @@ public class XMLCorner { /** * Sets the value of the compoundMarkID property. - * + * @param value sets the id of the compound mark */ public void setCompoundMarkID(int value) { this.compoundMarkID = value; @@ -65,7 +65,7 @@ public class XMLCorner { /** * Gets the value of the seqID property. - * + * @return the order that the mark is to be passed at */ public int getSeqID() { return seqID; @@ -73,7 +73,7 @@ public class XMLCorner { /** * Sets the value of the seqID property. - * + * @param value sets the order that this corner is to appear in a race at. */ public void setSeqID(int value) { this.seqID = value; @@ -105,7 +105,7 @@ public class XMLCorner { /** * Gets the value of the zoneSize property. - * + * @return the size of the leg */ public int getZoneSize() { return zoneSize; @@ -113,7 +113,7 @@ public class XMLCorner { /** * Sets the value of the zoneSize property. - * + * @param value sets the size of the corner. */ public void setZoneSize(int value) { this.zoneSize = value; diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLCourse.java b/racevisionGame/src/main/java/shared/xml/Race/XMLCourse.java index 8a937e83..8fe22193 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLCourse.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLCourse.java @@ -88,7 +88,7 @@ public class XMLCourse { * Objects of the following type(s) are allowed in the list * {@link XMLCompoundMark } * - * + * @return the compound marks in the course. */ public List getCompoundMark() { if (compoundMark == null) { diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLCourseLimit.java b/racevisionGame/src/main/java/shared/xml/Race/XMLCourseLimit.java index 144d3f9d..5218128f 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLCourseLimit.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLCourseLimit.java @@ -74,7 +74,7 @@ public class XMLCourseLimit { * Objects of the following type(s) are allowed in the list * {@link XMLLimit } * - * + * @return the limits of the race */ public List getLimit() { if (limit == null) { diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLLimit.java b/racevisionGame/src/main/java/shared/xml/Race/XMLLimit.java index bf000511..b6519069 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLLimit.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLLimit.java @@ -46,7 +46,7 @@ public class XMLLimit { /** * Gets the value of the lat property. - * + * @return get the latitude of the limit */ public double getLat() { return lat; @@ -54,7 +54,7 @@ public class XMLLimit { /** * Sets the value of the lat property. - * + * @param value sets the latitude of the limit */ public void setLat(double value) { this.lat = value; @@ -62,7 +62,7 @@ public class XMLLimit { /** * Gets the value of the lon property. - * + * @return sets the longitude of the limit */ public double getLon() { return lon; @@ -70,7 +70,7 @@ public class XMLLimit { /** * Sets the value of the lon property. - * + * @param value sets the longitude of the limit */ public void setLon(double value) { this.lon = value; @@ -78,7 +78,7 @@ public class XMLLimit { /** * Gets the value of the seqID property. - * + * @return gets the sequence that the limit is at. */ public int getSeqID() { return seqID; @@ -86,7 +86,7 @@ public class XMLLimit { /** * Sets the value of the seqID property. - * + * @param value sets the order that this limit is to appear in. */ public void setSeqID(int value) { this.seqID = value; diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLMark.java b/racevisionGame/src/main/java/shared/xml/Race/XMLMark.java index c8c2c644..8affde4a 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLMark.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLMark.java @@ -100,7 +100,7 @@ public class XMLMark { /** * Gets the value of the targetLat property. - * + * @return latitude that mark is at */ public double getTargetLat() { return targetLat; @@ -108,7 +108,7 @@ public class XMLMark { /** * Sets the value of the targetLat property. - * + * @param value sets the latitude that the mark is at. */ public void setTargetLat(double value) { this.targetLat = value; @@ -116,7 +116,7 @@ public class XMLMark { /** * Gets the value of the targetLng property. - * + * @return the longitude the mark is at */ public double getTargetLng() { return targetLng; @@ -124,7 +124,7 @@ public class XMLMark { /** * Sets the value of the targetLng property. - * + * @param value sets the longitude that the value is at */ public void setTargetLng(double value) { this.targetLng = value; @@ -132,7 +132,7 @@ public class XMLMark { /** * Gets the value of the sourceID property. - * + * @return the markerboats source ID */ public int getSourceID() { return sourceID; @@ -140,7 +140,7 @@ public class XMLMark { /** * Sets the value of the sourceID property. - * + * @param value sets the id of the boat that the mark is referencing to. */ public void setSourceID(int value) { this.sourceID = value; diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLParticipants.java b/racevisionGame/src/main/java/shared/xml/Race/XMLParticipants.java index 597758fa..331cc861 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLParticipants.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLParticipants.java @@ -73,7 +73,7 @@ public class XMLParticipants { * Objects of the following type(s) are allowed in the list * {@link XMLYacht } * - * + * @return the yachts that are part of the race. */ public List getYacht() { if (yacht == null) { diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLRace.java b/racevisionGame/src/main/java/shared/xml/Race/XMLRace.java index 69493b3d..2bbc21d4 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLRace.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLRace.java @@ -177,7 +177,7 @@ public class XMLRace { /** * Gets the value of the raceID property. - * + * @return the id of the race */ public int getRaceID() { return raceID; @@ -185,7 +185,7 @@ public class XMLRace { /** * Sets the value of the raceID property. - * + * @param value sets the id of the race */ public void setRaceID(int value) { this.raceID = value; diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLRaceFactory.java b/racevisionGame/src/main/java/shared/xml/Race/XMLRaceFactory.java index 385f7fae..35a45cbb 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLRaceFactory.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLRaceFactory.java @@ -38,7 +38,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLRace } - * + * @return a new instance of a race. */ public XMLRace createRace() { return new XMLRace(); @@ -46,7 +46,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLRaceStartTime } - * + * @return a new start time for the race */ public XMLRaceStartTime createXMLRaceStartTime() { return new XMLRaceStartTime(); @@ -54,7 +54,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLParticipants } - * + * @return a new participant of the race */ public XMLParticipants createXMLParticipants() { return new XMLParticipants(); @@ -62,7 +62,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLCompoundMarkSequence } - * + * @return a new Compound Mark Sequence that hte race is to follow. */ public XMLCompoundMarkSequence createXMLCompoundMarkSequence() { return new XMLCompoundMarkSequence(); @@ -70,7 +70,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLCourse } - * + * @return the course the race is to use. */ public XMLCourse createXMLCourse() { return new XMLCourse(); @@ -78,7 +78,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLCourseLimit } - * + * @return the limits/boundaries of the course. */ public XMLCourseLimit createXMLCourseLimit() { return new XMLCourseLimit(); @@ -86,7 +86,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLLimit } - * + * @return a point on hte boundaries */ public XMLLimit createXMLLimit() { return new XMLLimit(); @@ -94,7 +94,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLCompoundMark } - * + * @return a compound mark (made out of multiple marks) */ public XMLCompoundMark createXMLCompoundMark() { return new XMLCompoundMark(); @@ -102,7 +102,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLMark } - * + * @return a mark */ public XMLMark createXMLMark() { return new XMLMark(); @@ -110,7 +110,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLCorner } - * + * @return a corner of a compound mark sequence */ public XMLCorner createXMLCorner() { return new XMLCorner(); @@ -118,7 +118,7 @@ public class XMLRaceFactory { /** * Create an instance of {@link XMLYacht } - * + * @return creates a new Yacht. */ public XMLYacht createXMLYacht() { return new XMLYacht(); diff --git a/racevisionGame/src/main/java/shared/xml/Race/XMLYacht.java b/racevisionGame/src/main/java/shared/xml/Race/XMLYacht.java index eb76ad94..652af26a 100644 --- a/racevisionGame/src/main/java/shared/xml/Race/XMLYacht.java +++ b/racevisionGame/src/main/java/shared/xml/Race/XMLYacht.java @@ -43,7 +43,7 @@ public class XMLYacht { /** * Gets the value of the sourceID property. - * + * @return the id of the yacht */ public int getSourceID() { return sourceID; @@ -51,7 +51,7 @@ public class XMLYacht { /** * Sets the value of the sourceID property. - * + * @param value sets the source ID of the a yacht that is participating in the race */ public void setSourceID(int value) { this.sourceID = value;