tmf.xml: Add mapping group to XML description
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core / src / org / eclipse / tracecompass / internal / tmf / analysis / xml / core / model / ITmfXmlModelFactory.java
1 /*******************************************************************************
2 * Copyright (c) 2014 École Polytechnique de Montréal
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Geneviève Bastien - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.internal.tmf.analysis.xml.core.model;
14
15 import java.util.List;
16
17 import org.eclipse.jdt.annotation.Nullable;
18 import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
19 import org.w3c.dom.Element;
20
21 /**
22 * Interface to create XML model elements in different contexts. This allows to
23 * reuse the same XML syntax and parsers, but use the elements differently
24 * depending on the what is intended to be done with them.
25 *
26 * @author Geneviève Bastien
27 */
28 public interface ITmfXmlModelFactory {
29
30 /**
31 * Create a new XML state attribute
32 *
33 * @param attribute
34 * XML element of the attribute
35 * @param container
36 * The state system container this state attribute belongs to
37 * @return The new state attribute
38 */
39 ITmfXmlStateAttribute createStateAttribute(Element attribute, IXmlStateSystemContainer container);
40
41 /**
42 * Create a new state value where the value corresponds to a path of
43 * {@link ITmfXmlStateAttribute}
44 *
45 * @param node
46 * The state value XML element
47 * @param container
48 * The state system container this state value belongs to
49 * @param attributes
50 * The attributes representing the path to this value
51 * @return The new state value
52 */
53 ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes);
54
55 /**
56 * Create a new state value where the value corresponds to a field in an
57 * event
58 *
59 * @param node
60 * The state value XML element
61 * @param container
62 * The state system container this state value belongs to
63 * @param eventField
64 * The event field where to get the value
65 * @return The new state value
66 */
67 ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, String eventField);
68
69 /**
70 * Create a new XML condition
71 *
72 * @param node
73 * The XML root of this condition
74 * @param container
75 * The state system container this condition belongs to
76 * @return The new XML condition
77 */
78 TmfXmlCondition createCondition(Element node, IXmlStateSystemContainer container);
79
80 /**
81 * Create a new XML event handler
82 *
83 * @param node
84 * The XML event handler element
85 * @param container
86 * The state system container this state value belongs to
87 * @return The new XML event handler
88 */
89 TmfXmlEventHandler createEventHandler(Element node, IXmlStateSystemContainer container);
90
91 /**
92 * Create a new XML state change
93 *
94 * @param node
95 * The XML state change element
96 * @param container
97 * The state system container this state change belongs to
98 * @return The new XML state change
99 */
100 TmfXmlStateChange createStateChange(Element node, IXmlStateSystemContainer container);
101
102 /**
103 * Create a new XML location
104 *
105 * @param node
106 * The XML location element
107 * @param container
108 * The state system container this location belongs to
109 * @return The new XML location
110 */
111 TmfXmlLocation createLocation(Element node, IXmlStateSystemContainer container);
112
113 /**
114 * Create a new XML pattern event handler
115 *
116 * @param node
117 * The XML pattern event handler element
118 * @param container
119 * The state system container this pattern event handler belongs to
120 * @return The new XML pattern event handler
121 */
122 TmfXmlPatternEventHandler createPatternEventHandler(Element node, IXmlStateSystemContainer container);
123
124 /**
125 * Create a new XML transition validator
126 *
127 * @param node
128 * The XML test element
129 * @param container
130 * The state system container this test belongs to
131 * @return The new {@link TmfXmlTransitionValidator}
132 */
133 TmfXmlTransitionValidator createTransitionValidator(Element node, IXmlStateSystemContainer container);
134
135 /**
136 * Create a new XML action
137 *
138 * @param node
139 * The XML action element
140 * @param container
141 * The state system container this action belongs to
142 * @return The new {@link TmfXmlAction}
143 */
144 TmfXmlAction createAction(Element node, IXmlStateSystemContainer container);
145
146 /**
147 * Create a new XML FSM
148 *
149 * @param node
150 * The XML FSM element
151 * @param container
152 * The state system container this FSM belongs to
153 * @return The new {@link TmfXmlFsm}
154 */
155 TmfXmlFsm createFsm(Element node, IXmlStateSystemContainer container);
156
157 /**
158 * Create a new XML state
159 *
160 * @param node
161 * The XML state element
162 * @param container
163 * The state system container this state belongs to
164 * @param parent
165 * The parent state
166 * @return The new {@link TmfXmlState}
167 */
168 TmfXmlState createState(Element node, IXmlStateSystemContainer container, @Nullable TmfXmlState parent);
169
170 /**
171 * Create a new XML state transition
172 *
173 * @param node
174 * The XML state transition element
175 * @param container
176 * The state system container this state transition belongs to
177 * @return The new XML {@link TmfXmlStateTransition}
178 */
179 TmfXmlStateTransition createStateTransition(Element node, IXmlStateSystemContainer container);
180
181 /**
182 * Create a new XML timestamp condition
183 *
184 * @param node
185 * The XML timestamp condition element
186 * @param container
187 * The state system container this timestamp condition belongs to
188 * @return The new {@link TmfXmlTimestampCondition}
189 */
190 TmfXmlTimestampCondition createTimestampsCondition(Element node, IXmlStateSystemContainer container);
191
192 /**
193 * Create a new pattern segment builder
194 *
195 * @param node
196 * The XML pattern segment builder
197 * @param container
198 * The state system container this pattern segment builder belongs to
199 * @return The new {@link TmfXmlPatternSegmentBuilder}
200 */
201 TmfXmlPatternSegmentBuilder createPatternSegmentBuilder(Element node, IXmlStateSystemContainer container);
202
203 /**
204 * Create a new pattern map entry
205 *
206 * @param node
207 * The XML map entry element
208 * @param container
209 * The state system container this state value handler belongs to
210 * @return The new {@link TmfXmlMapEntry}
211 */
212 TmfXmlMapEntry createMapEntry(Element node, IXmlStateSystemContainer container);
213 }
This page took 0.039619 seconds and 5 git commands to generate.