| Revision 38,
1.2 KB
checked in by bmcguffin, 9 years ago
(diff) |
|
Removed the newLine at the end of each openTag method.
|
| Rev | 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 CAD incident event. CAD events have a string description of |
|---|
| 14 | * what is occurring at that time, and may or may not have sub-events. |
|---|
| 15 | * |
|---|
| 16 | * @author Bryan McGuffin |
|---|
| 17 | */ |
|---|
| 18 | public class CADEvent extends ScriptEvent implements I_XML_Writable |
|---|
| 19 | { |
|---|
| 20 | |
|---|
| 21 | public CADEvent() |
|---|
| 22 | { |
|---|
| 23 | super(ScriptEventType.CAD_EVENT); |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | public boolean hasSubEvents = false; |
|---|
| 27 | |
|---|
| 28 | public String detail = ""; |
|---|
| 29 | |
|---|
| 30 | @Override |
|---|
| 31 | public String toXML() |
|---|
| 32 | { |
|---|
| 33 | String output = openTag(ELEMENT.DETAIL.tag); |
|---|
| 34 | output += detail; |
|---|
| 35 | output += closeTag(ELEMENT.DETAIL.tag); |
|---|
| 36 | return output; |
|---|
| 37 | } |
|---|
| 38 | |
|---|
| 39 | @Override |
|---|
| 40 | public String openTag(String s) |
|---|
| 41 | { |
|---|
| 42 | return "<" + s + ">"; |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | @Override |
|---|
| 46 | public String closeTag(String s) |
|---|
| 47 | { |
|---|
| 48 | return "</" + s + ">\n"; |
|---|
| 49 | } |
|---|
| 50 | |
|---|
| 51 | @Override |
|---|
| 52 | public String emptyTag(String s) |
|---|
| 53 | { |
|---|
| 54 | return "<" + s + "/>\n"; |
|---|
| 55 | } |
|---|
| 56 | |
|---|
| 57 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.