| Revision 203,
1.1 KB
checked in by jdalbey, 6 years ago
(diff) |
|
XMLWriter.java name changed to XMLBuilder. Add pretty printing methods (ticket #237).
|
| 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 | import scriptbuilder.structures.XMLBuilder; |
|---|
| 12 | |
|---|
| 13 | /** |
|---|
| 14 | * Data model for a witness event. A witness has a name, a phone number, and a |
|---|
| 15 | * street address. |
|---|
| 16 | * |
|---|
| 17 | * @author Bryan McGuffin |
|---|
| 18 | */ |
|---|
| 19 | public class WitnessEvent extends ScriptEvent implements I_XML_Writable |
|---|
| 20 | { |
|---|
| 21 | |
|---|
| 22 | /** |
|---|
| 23 | * Constructor. Generate a new script event that has a witness event icon. |
|---|
| 24 | */ |
|---|
| 25 | public WitnessEvent() |
|---|
| 26 | { |
|---|
| 27 | super(ScriptEventType.WITNESS_EVENT); |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | public String witnessAddress = ""; |
|---|
| 31 | |
|---|
| 32 | public String witnessName = ""; |
|---|
| 33 | |
|---|
| 34 | public String witnessNum = ""; |
|---|
| 35 | |
|---|
| 36 | @Override |
|---|
| 37 | public String toXML() |
|---|
| 38 | { |
|---|
| 39 | return XMLBuilder.emptyTag(ELEMENT.WITNESS.tag + " Name=\"" + witnessName + "\" Address=\"" |
|---|
| 40 | + witnessAddress + "\" PhoneNum=\"" + witnessNum + "\""); |
|---|
| 41 | } |
|---|
| 42 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.