source: tmcsimulator-scriptbuilder/trunk/src/scriptbuilder/structures/events/TowEvent.java @ 203

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 */
6package scriptbuilder.structures.events;
7
8import scriptbuilder.structures.ELEMENT;
9import scriptbuilder.structures.I_XML_Writable;
10import scriptbuilder.structures.ScriptEvent;
11import scriptbuilder.structures.XMLBuilder;
12
13/**
14 * Data model for a Tow event. A tow truck has a beat and a company, and two
15 * phone numbers: one public, and one for confirmation.
16 *
17 * @author Bryan McGuffin
18 */
19public class TowEvent extends ScriptEvent implements I_XML_Writable
20{
21
22    /**
23     * Constructor.
24     */
25    public TowEvent()
26    {
27        super(ScriptEventType.TOW_EVENT);
28    }
29
30    public String towBeat = "";
31
32    public String towCompany = "";
33
34    public String towConfNum = "";
35
36    public String towPubNum = "";
37
38    @Override
39    public String toXML()
40    {
41        return XMLBuilder.emptyTag(ELEMENT.TOW.tag + " Company=\"" + towCompany + "\" ConfNum=\""
42                + towConfNum + "\" PubNum=\"" + towPubNum + "\" Beat=\"" + towBeat + "\"");
43    }
44}
Note: See TracBrowser for help on using the repository browser.