Merge branch 'splitIntoTwoModules' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into splitIntoTwoModules
This commit is contained in:
@@ -190,8 +190,12 @@ public class StartController extends Controller implements Observer {
|
||||
initialiseTables();
|
||||
}
|
||||
if (((StreamedCourse) o).getZonedDateTime() != null) {
|
||||
Platform.runLater(() -> {
|
||||
{
|
||||
setRaceClock();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package seng302.Mock;
|
||||
|
||||
import com.sun.org.apache.xpath.internal.operations.Bool;
|
||||
import org.joda.time.DateTime;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
@@ -71,20 +72,22 @@ public class StreamedCourseXMLReader extends XMLReader {
|
||||
}
|
||||
|
||||
private void read() throws ParseException, StreamedCourseXMLException {
|
||||
// readRace();
|
||||
readRace();
|
||||
readParticipants();
|
||||
readCourse();
|
||||
}
|
||||
|
||||
private void readRace() throws ParseException {
|
||||
DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ");
|
||||
DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
|
||||
Element settings = (Element) doc.getElementsByTagName("Race").item(0);
|
||||
|
||||
System.out.println(getTextValueOfNode(settings, "CreationTimeDate"));
|
||||
raceID = Integer.parseInt(getTextValueOfNode(settings, "RaceID"));
|
||||
raceType = getTextValueOfNode(settings, "RaceType");
|
||||
creationTimeDate = ZonedDateTime.parse(getTextValueOfNode(settings, "CreationTimeDate"), dateFormat);
|
||||
NamedNodeMap raceTimeTag = doc.getElementsByTagName("RaceStartTime").item(0).getAttributes();
|
||||
raceStartTime = ZonedDateTime.parse(raceTimeTag.getNamedItem("Time").getTextContent(), dateFormat);
|
||||
if (raceTimeTag.getNamedItem("Time") != null) raceStartTime = ZonedDateTime.parse(raceTimeTag.getNamedItem("Time").getTextContent(), dateFormat);
|
||||
else raceStartTime = ZonedDateTime.parse(raceTimeTag.getNamedItem("Start").getTextContent(), dateFormat);
|
||||
postpone = Boolean.parseBoolean(raceTimeTag.getNamedItem("Postpone").getTextContent());
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ public class VisualiserInput implements Runnable
|
||||
|
||||
public VisualiserInput(StreamedCourse course) throws IOException{
|
||||
|
||||
connectionSocket = new Socket(InetAddress.getLocalHost(), 4942);
|
||||
// this.connectionSocket = new Socket("livedata.americascup.com",4941);
|
||||
//connectionSocket = new Socket(InetAddress.getLocalHost(), 4942);
|
||||
this.connectionSocket = new Socket("livedata.americascup.com",4941);
|
||||
|
||||
this.course = course;
|
||||
this.boatLocation = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user