| Revision 38,
1.3 KB
checked in by bmcguffin, 9 years ago
(diff) |
|
Removed the newLine at the end of each openTag method.
|
| Line | |
|---|
| 1 | /* |
|---|
| 2 | * To change this license header, choose License Headers in Project Properties. |
|---|
| 3 | * To change this template file, choose Tools | Templates |
|---|
| 4 | * and open the template in the editor. |
|---|
| 5 | */ |
|---|
| 6 | package scriptbuilder.structures.events; |
|---|
| 7 | |
|---|
| 8 | import scriptbuilder.structures.ELEMENT; |
|---|
| 9 | import scriptbuilder.structures.I_XML_Writable; |
|---|
| 10 | import scriptbuilder.structures.ScriptEvent; |
|---|
| 11 | |
|---|
| 12 | /** |
|---|
| 13 | * Data model for a Tow event. A tow truck has a beat and a company, and two |
|---|
| 14 | * phone numbers: one public, and one for confirmation. |
|---|
| 15 | * |
|---|
| 16 | * @author Bryan McGuffin |
|---|
| 17 | */ |
|---|
| 18 | public class TowEvent extends ScriptEvent implements I_XML_Writable |
|---|
| 19 | { |
|---|
| 20 | |
|---|
| 21 | public TowEvent() |
|---|
| 22 | { |
|---|
| 23 | super(ScriptEventType.TOW_EVENT); |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | public String towBeat = ""; |
|---|
| 27 | |
|---|
| 28 | public String towCompany = ""; |
|---|
| 29 | |
|---|
| 30 | public String towConfNum = ""; |
|---|
| 31 | |
|---|
| 32 | public String towPubNum = ""; |
|---|
| 33 | |
|---|
| 34 | @Override |
|---|
| 35 | public String openTag(String s) |
|---|
| 36 | { |
|---|
| 37 | return "<" + s + ">"; |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | @Override |
|---|
| 41 | public String closeTag(String s) |
|---|
| 42 | { |
|---|
| 43 | return "</" + s + ">\n"; |
|---|
| 44 | } |
|---|
| 45 | |
|---|
| 46 | @Override |
|---|
| 47 | public String emptyTag(String s) |
|---|
| 48 | { |
|---|
| 49 | return "<" + s + "/>\n"; |
|---|
| 50 | } |
|---|
| 51 | |
|---|
| 52 | @Override |
|---|
| 53 | public String toXML() |
|---|
| 54 | { |
|---|
| 55 | return emptyTag(ELEMENT.TOW.tag + " Company=\"" + towCompany + "\" ConfNum=\"" |
|---|
| 56 | + towConfNum + "\" PubNum=\"" + towPubNum + "\" Beat=\"" + towBeat + "\""); |
|---|
| 57 | } |
|---|
| 58 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.