Changeset 44 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures/Location_Info.java
- Timestamp:
- 08/07/2017 03:09:15 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/structures/Location_Info.java
r39 r44 5 5 * @author Bryan McGuffin 6 6 */ 7 class Location_Info 7 class Location_Info implements I_XML_Writable 8 8 { 9 9 10 public String Location_ID = ""; 10 11 11 12 public String Route = ""; 12 13 13 14 public String Direction = ""; 14 15 15 16 public String Postmile = ""; 16 17 17 18 public String Location_type = ""; 19 20 @Override 21 public String toXML() 22 { 23 String output = openTag(ELEMENT.LOCATION_INFO.tag + " ID=\"" + Location_ID + "\""); 24 25 output += openTag(ELEMENT.Route.tag); 26 output += Route; 27 output += closeTag(ELEMENT.Route.tag); 28 29 output += openTag(ELEMENT.Direction.tag); 30 output += Direction; 31 output += closeTag(ELEMENT.Direction.tag); 32 33 output += openTag(ELEMENT.Postmile.tag); 34 output += Postmile; 35 output += closeTag(ELEMENT.Postmile.tag); 36 37 output += openTag(ELEMENT.Location_type.tag); 38 output += Location_type; 39 output += closeTag(ELEMENT.Location_type.tag); 40 41 output += closeTag(ELEMENT.LOCATION_INFO.tag); 42 43 return output; 44 } 45 46 @Override 47 public String openTag(String s) 48 { 49 return "<" + s + ">"; 50 } 51 52 @Override 53 public String closeTag(String s) 54 { 55 return "</" + s + ">\n"; 56 } 57 58 @Override 59 public String emptyTag(String s) 60 { 61 return "<" + s + "/>\n"; 62 } 18 63 }
Note: See TracChangeset
for help on using the changeset viewer.
