bf7bdde065570721e7734790cbe96b9e25cf98b7
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.analysis.xml.core / src / org / eclipse / linuxtools / 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.linuxtools.tmf.analysis.xml.core.model;
14
15 import java.util.List;
16
17 import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
18 import org.w3c.dom.Element;
19
20 /**
21 * Interface to create XML model elements in different contexts. This allows to
22 * reuse the same XML syntax and parsers, but use the elements differently
23 * depending on the what is intended to be done with them.
24 *
25 * @author Geneviève Bastien
26 */
27 public interface ITmfXmlModelFactory {
28
29 /**
30 * Create a new XML state attribute
31 *
32 * @param attribute
33 * XML element of the attribute
34 * @param container
35 * The state system container this state attribute belongs to
36 * @return The new state attribute
37 */
38 ITmfXmlStateAttribute createStateAttribute(Element attribute, IXmlStateSystemContainer container);
39
40 /**
41 * Create a new state value where the value corresponds to a path of
42 * {@link ITmfXmlStateAttribute}
43 *
44 * @param node
45 * The state value XML element
46 * @param container
47 * The state system container this state value belongs to
48 * @param attributes
49 * The attributes representing the path to this value
50 * @return The new state value
51 */
52 ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes);
53
54 /**
55 * Create a new state value where the value corresponds to a field in an
56 * event
57 *
58 * @param node
59 * The state value XML element
60 * @param container
61 * The state system container this state value belongs to
62 * @param eventField
63 * The event field where to get the value
64 * @return The new state value
65 */
66 ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, String eventField);
67
68 /**
69 * Create a new XML condition
70 *
71 * @param node
72 * The XML root of this condition
73 * @param container
74 * The state system container this condition belongs to
75 * @return The new XML condition
76 */
77 TmfXmlCondition createCondition(Element node, IXmlStateSystemContainer container);
78
79 /**
80 * Create a new XML event handler
81 *
82 * @param node
83 * The XML event handler element
84 * @param container
85 * The state system container this state value belongs to
86 * @return The new XML event handler
87 */
88 TmfXmlEventHandler createEventHandler(Element node, IXmlStateSystemContainer container);
89
90 /**
91 * Create a new XML state change
92 *
93 * @param node
94 * The XML state change element
95 * @param container
96 * The state system container this state change belongs to
97 * @return The new XML state change
98 */
99 TmfXmlStateChange createStateChange(Element node, IXmlStateSystemContainer container);
100
101 /**
102 * Create a new XML location
103 *
104 * @param node
105 * The XML location element
106 * @param container
107 * The state system container this location belongs to
108 * @return The new XML location
109 */
110 TmfXmlLocation createLocation(Element node, IXmlStateSystemContainer container);
111
112 }
This page took 0.033398 seconds and 4 git commands to generate.