Added participants field to xml generator

#story[778]
This commit is contained in:
Erika Savell
2017-04-21 17:02:06 +12:00
parent c365d5a344
commit 9764f448eb
2 changed files with 14 additions and 10 deletions
+12 -1
View File
@@ -75,7 +75,18 @@ public class RaceData {
startTimeElement.setAttribute("Postpone", "false");
raceElement.appendChild(startTimeElement);
//PARTICIPANTS
Element participantsElement = doc.createElement("Participants");
for (BoatInRace boat : participants) {
Element yachtElement = doc.createElement("Yacht");
yachtElement.setAttribute("SourceID", boat.getSourceID() + "");
participantsElement.appendChild(yachtElement);
}
raceElement.appendChild(participantsElement);
Element courseElement = doc.createElement("Course");
Element compoundMarkSeqElement = doc.createElement("CompoundMarkSequence");
+2 -9
View File
@@ -42,7 +42,9 @@ public class Event {
public void sendRaceData() {
RaceData raceData = new RaceData(raceDataSource);
raceData.createXML();
}
public void sendBoatData() {
List<BoatInRace> boatData = raceDataSource.getBoats();
@@ -136,15 +138,6 @@ public class Event {
} catch (Exception e) {}
}
public void sendBoatData() {
}
}