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

source: tmcsimulator/trunk/src/tmcsim/cadmodels/IncidentEditLog.java @ 2

Revision 2, 2.0 KB checked in by jdalbey, 10 years ago (diff)

Initial Import of project files

RevLine 
1package tmcsim.cadmodels;
2
3import java.io.Serializable;
4
5/**
6 * This class is a further subdivision of Incident to hold data.
7 * @author Vincent
8 *
9 */
10public class IncidentEditLog implements Serializable
11{
12    private String edit;
13    private String reason;
14    private String changeBy;
15    private String terminal;
16   
17    private static enum EDIT_LOG_ENUMS
18    {
19        EDIT     ("EDIT"),
20        REASON  ("REASON"),
21        CHANGE_BY   ("CHANGE_BY"), 
22        TERMINAL   ("TERMINAL");
23       
24        public String tag;
25       
26        private EDIT_LOG_ENUMS(String t)
27        {
28            tag = t;
29        }
30    }
31   
32    /*
33     * Constructor. Initializes all objects to avoid null pointers.
34     */
35    public IncidentEditLog(){
36        edit = "";
37        reason = "";
38        changeBy = "";
39        terminal = "";
40    }
41   
42    public String getEdit() {
43        return edit;
44    }
45   
46    public void setEdit(String edit) {
47        this.edit = edit;
48    }
49
50    public String getReason() {
51        return reason;
52    }
53
54    public void setReason(String reason) {
55        this.reason = reason;
56    }
57
58    public String getChangeBy() {
59        return changeBy;
60    }
61
62    public void setChangeBy(String changeBy) {
63        this.changeBy = changeBy;
64    }
65
66    public String getTerminal() {
67        return terminal;
68    }
69
70    public void setTerminal(String terminal) {
71        this.terminal = terminal;
72    }
73   
74    /*
75     * Called from the tmc.simulator.cadclient.data.Incident.java. Handles storing data based on script tag.
76     */
77    public void readXMLNode(String tag_name, String value) {
78        if(tag_name.equals(EDIT_LOG_ENUMS.EDIT.tag))
79        {
80            setEdit(value);
81        }
82        else if(tag_name.equals(EDIT_LOG_ENUMS.REASON.tag))
83        {
84            setReason(value);
85        }
86        else if(tag_name.equals(EDIT_LOG_ENUMS.CHANGE_BY.tag))
87        {
88            setChangeBy(value);
89        }
90        else if(tag_name.equals(EDIT_LOG_ENUMS.TERMINAL.tag))
91        {
92            setTerminal(value);
93        }
94    }
95}
Note: See TracBrowser for help on using the repository browser.