Changed the boatType attribute from all around the place from String lit to enum

#story[1274]
This commit is contained in:
William Muir
2017-09-22 21:00:28 +12:00
parent da8c91f5c1
commit 22fdf1e4ac
13 changed files with 28 additions and 38 deletions
@@ -18,6 +18,7 @@ import seng302.model.stream.xml.parser.RaceXMLData;
import seng302.model.stream.xml.parser.RegattaXMLData;
import seng302.model.token.Token;
import seng302.model.token.TokenType;
import seng302.visualiser.fxObjects.assets_3D.BoatMeshType;
/**
* Utilities for parsing XML documents
@@ -139,7 +140,7 @@ public class XMLParser {
if (currentBoat.getNodeName().equals("Boat")) {
// Boat boat = new Boat(currentBoat);
ClientYacht yacht = new ClientYacht(
XMLParser.getNodeAttributeString(currentBoat, "Type"),
BoatMeshType.valueOf(XMLParser.getNodeAttributeString(currentBoat, "Type")),
XMLParser.getNodeAttributeInt(currentBoat, "SourceID"),
XMLParser.getNodeAttributeString(currentBoat, "HullNum"),
XMLParser.getNodeAttributeString(currentBoat, "ShortName"),