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

source: tmcsimulator-scriptbuilder/trunk/src/scriptbuilder/structures/ELEMENT.java @ 19

Revision 19, 2.5 KB checked in by bmcguffin, 9 years ago (diff)

Moved enum of XML elements to its own file.

RevLine 
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;
7
8/**
9 * Enumeration of every element which appears in the DTD as of 2017/07/01. They
10 * are in alphabetical order and broken up into 3 major sections.
11 *
12 * @author Bryan McGuffin
13 */
14public enum ELEMENT
15{
16    //These elements are the ones that have sub-elements in the DTD.
17    //They may or may not have character data attached.
18
19    TMC_SCRIPT,
20    ACTIVITY_LOG_EVALUATION,//EVENT
21    ADDITIONAL_INFO,
22    ATMS_EVALUATION,//EVENT
23    CAD_DATA,
24    CAD_EVALUATION,//EVENT
25    CAD_INCIDENT_EVENT,//EVENT
26    CARDFILE,
27    CHP_RADIO,//EVENT
28    CMS_EVALUATION,//EVENT
29    DIALOG,
30    FACILITATOR_EVALUATION,//EVENT
31    GENERAL,
32    GENERAL_INFO,
33    HEADER_INFO,
34    LOCATION,
35    LOCATION_INFO,
36    NEW_UNIT,
37    PARAMICS,//EVENT
38    RADIO_EVALUATION,
39    SAMPLE_MESSAGE,
40    SCRIPT_DATA,
41    SCRIPT_EVENT,
42    TELEPHONE,//EVENT
43    //These elements have no sub-elements, but all have character data.
44    ADDRESS,
45    AGY,
46    ALIAS,
47    AREA,
48    BADGE_NUM,
49    BEAT,
50    Beat,
51    CCTV_INFO,
52    CITY,
53    CMS_LINE,
54    COMMENT,
55    CURR_LOC,
56    DESTINATION,
57    DETAIL,
58    Direction,
59    EMS,
60    EXPECTED_ACTION,
61    FAX,
62    FIRE,
63    FullLoc,
64    ID,
65    INCIDENT,
66    Incident_type,
67    INSTRUCTOR,
68    Lane_number,
69    LAW,
70    LINE,
71    LOC,
72    Location_type,
73    MASTER_INC_NUM,
74    MAINTENANCE_RADIO,//EVENT
75    MISC_INFO,
76    NAME,
77    OFFICE,
78    OFFICER,
79    OOS,
80    P,
81    PHONE,
82    Postmile,
83    PRIMARY,
84    Route,
85    SERVICE,
86    STACK,
87    STATE,
88    STATUS,
89    Status,
90    STUDENT,
91    TEXT,
92    TIMER,
93    TIME_INDEX,
94    TITLE,
95    TMT_RADIO,//EVENT
96    TruncLoc,
97    TYPE,
98    Type,
99    TYPE_CODE,
100    UNIT_STATUS,
101    ZIP,
102    //These elements have no sub-elements or character data.
103    //They do have attributes.
104    AUDIO,//EVENT
105    TOW,//EVENT
106    UNIT,//EVENT
107    WITNESS;//EVENT
108
109    public String tag;
110
111    private ELEMENT()
112    {
113        this.tag = this.name();
114    }
115
116    /**
117     * Look up an element by its name.
118     *
119     * @param name the name of the element
120     * @return the element which has that name as its nametag, or null if none
121     * does
122     */
123    public static ELEMENT byName(String name)
124    {
125        for (ELEMENT e : ELEMENT.values())
126        {
127            if (e.tag.equals(name))
128            {
129                return e;
130            }
131        }
132        return null;
133    }
134}
Note: See TracBrowser for help on using the repository browser.