Merge branch 'master' into story_64_sails

This commit is contained in:
Joseph Gardner
2017-08-17 16:25:40 +12:00
3 changed files with 10 additions and 5 deletions
@@ -87,6 +87,7 @@ public class Event {
//Read XML files.
try {
this.raceXML = RaceXMLCreator.alterRaceToWind(raceXMLFile, 90);
//this.raceXML = XMLReader.readXMLFileToString(raceXMLFile, StandardCharsets.UTF_8);
this.boatXML = XMLReader.readXMLFileToString(boatsXMLFile, StandardCharsets.UTF_8);
this.regattaXML = XMLReader.readXMLFileToString(regattaXMLFile, StandardCharsets.UTF_8);
@@ -77,7 +77,7 @@ public class RaceXMLCreator {
public static String alterRaceToWind(String s, double degrees) throws XMLReaderException, InvalidRaceDataException, JAXBException, IOException, SAXException, ParserConfigurationException {
RaceXMLReader reader = new RaceXMLReader(s, XMLFileType.ResourcePath);
XMLRace race = (XMLRace) XMLUtilities.xmlToClass(new File(RaceXMLCreator.class.getClassLoader().getResource(s).getFile()),
XMLRace race = (XMLRace) XMLUtilities.xmlToClass(RaceXMLCreator.class.getClassLoader().getResourceAsStream(s),
RaceXMLCreator.class.getClassLoader().getResource("mock/mockXML/schema/raceSchema.xsd"),
XMLRace.class);