Warning: Can't use blame annotator:
svn blame failed on trunk/src/tmcsim/client/cadclientgui/data/IncidentResponse.java: ("Can't find a temporary directory: Internal error", 20014)

source: tmcsimulator/trunk/src/tmcsim/client/cadclientgui/data/IncidentResponse.java @ 3

Revision 3, 1.5 KB checked in by jdalbey, 10 years ago (diff)

Initial Import of project files - cadclientgui

RevLine 
1package tmcsim.client.cadclientgui.data;
2
3import java.io.Serializable;
4
5import tmcsim.client.cadclientgui.enums.CADDataEnums;
6
7/**
8 * This class is a further subdivision of Incident to hold data.
9 *
10 * @author Vincent
11 *
12 */
13public class IncidentResponse implements Serializable {
14   
15    /* The init variables are set only from the XML script (readXMLNode method)
16     * and are only used for resetCADDataSimulation purposes
17     */
18    private String init_plan = "";
19    private String init_area = "";
20   
21    private String plan;
22    private String area;
23
24    /*
25     * Constructor. Initializes all objects to avoid null pointers.
26     */
27    public IncidentResponse() {
28        plan = "";
29        area = "";
30    }
31
32    public void resetCADDataSimulation(){
33        plan = init_plan;
34        area = init_area;
35    }
36   
37    public String getPlan() {
38        return plan;
39    }
40
41    public void setPlan(String plan) {
42        this.plan = plan;
43    }
44
45    public String getArea() {
46        return area;
47    }
48
49    public void setArea(String area) {
50        this.area = area;
51    }
52
53    /*
54     * Called from the tmc.simulator.cadclient.data.Incident.java. Handles
55     * storing data based on script tag.
56     */
57    public void readXMLNode(String tag_name, String value) {
58        if (tag_name.equals(CADDataEnums.INC_RESP.PLAN.tag)) {
59            init_plan = value;
60            setPlan(value);
61        } else if (tag_name.equals(CADDataEnums.INC_RESP.AREA.tag)) {
62            init_area = value;
63            setArea(value);
64        }
65
66    }
67
68}
Note: See TracBrowser for help on using the repository browser.