tmf : Add pattern analysis behavior
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core / src / org / eclipse / tracecompass / tmf / analysis / xml / core / model / ITmfXmlModelFactory.java
CommitLineData
1d7e62f9
GB
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
2bdf0193 13package org.eclipse.tracecompass.tmf.analysis.xml.core.model;
1d7e62f9
GB
14
15import java.util.List;
16
3a5f73a1 17import org.eclipse.jdt.annotation.Nullable;
2bdf0193 18import org.eclipse.tracecompass.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
1d7e62f9
GB
19import 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 */
28public 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
3a5f73a1
JCK
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 * @since 2.0
122 */
123 TmfXmlPatternEventHandler createPatternEventHandler(Element node, IXmlStateSystemContainer container);
124
125 /**
126 * Create a new XML transition validator
127 *
128 * @param node
129 * The XML test element
130 * @param container
131 * The state system container this test belongs to
132 * @return The new {@link TmfXmlTransitionValidator}
133 * @since 2.0
134 */
135 TmfXmlTransitionValidator createTransitionValidator(Element node, IXmlStateSystemContainer container);
136
137 /**
138 * Create a new XML action
139 *
140 * @param node
141 * The XML action element
142 * @param container
143 * The state system container this action belongs to
144 * @return The new {@link TmfXmlAction}
145 * @since 2.0
146 */
147 TmfXmlAction createAction(Element node, IXmlStateSystemContainer container);
148
149 /**
150 * Create a new XML FSM
151 *
152 * @param node
153 * The XML FSM element
154 * @param container
155 * The state system container this FSM belongs to
156 * @return The new {@link TmfXmlFsm}
157 * @since 2.0
158 */
159 TmfXmlFsm createFsm(Element node, IXmlStateSystemContainer container);
160
161 /**
162 * Create a new XML state
163 *
164 * @param node
165 * The XML state element
166 * @param container
167 * The state system container this state belongs to
168 * @param parent
169 * The parent state
170 * @return The new {@link TmfXmlState}
171 * @since 2.0
172 */
173 TmfXmlState createState(Element node, IXmlStateSystemContainer container, @Nullable TmfXmlState parent);
174
175 /**
176 * Create a new XML state transition
177 *
178 * @param node
179 * The XML state transition element
180 * @param container
181 * The state system container this state transition belongs to
182 * @return The new XML {@link TmfXmlStateTransition}
183 * @since 2.0
184 */
185 TmfXmlStateTransition createStateTransition(Element node, IXmlStateSystemContainer container);
186
187 /**
188 * Create a new XML timestamp condition
189 *
190 * @param node
191 * The XML timestamp condition element
192 * @param container
193 * The state system container this timestamp condition belongs to
194 * @return The new {@link TmfXmlTimestampCondition}
195 * @since 2.0
196 */
197 TmfXmlTimestampCondition createTimestampsCondition(Element node, IXmlStateSystemContainer container);
198
199 /**
200 * Create a new pattern segment builder
201 *
202 * @param node
203 * The XML pattern segment builder
204 * @param container
205 * The state system container this pattern segment builder belongs to
206 * @return The new {@link TmfXmlPatternSegmentBuilder}
207 * @since 2.0
208 */
209 TmfXmlPatternSegmentBuilder createPatternSegmentBuilder(Element node, IXmlStateSystemContainer container);
1d7e62f9 210}
This page took 0.077275 seconds and 5 git commands to generate.