1 /*******************************************************************************
2 * Copyright (c) 2014 École Polytechnique de Montréal
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
10 * Geneviève Bastien - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.analysis
.xml
.core
.model
;
15 import java
.util
.List
;
17 import org
.eclipse
.linuxtools
.tmf
.analysis
.xml
.core
.module
.IXmlStateSystemContainer
;
18 import org
.w3c
.dom
.Element
;
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.
25 * @author Geneviève Bastien
27 public interface ITmfXmlModelFactory
{
30 * Create a new XML state attribute
33 * XML element of the attribute
35 * The state system container this state attribute belongs to
36 * @return The new state attribute
38 ITmfXmlStateAttribute
createStateAttribute(Element attribute
, IXmlStateSystemContainer container
);
41 * Create a new state value where the value corresponds to a path of
42 * {@link ITmfXmlStateAttribute}
45 * The state value XML element
47 * The state system container this state value belongs to
49 * The attributes representing the path to this value
50 * @return The new state value
52 ITmfXmlStateValue
createStateValue(Element node
, IXmlStateSystemContainer container
, List
<ITmfXmlStateAttribute
> attributes
);
55 * Create a new state value where the value corresponds to a field in an
59 * The state value XML element
61 * The state system container this state value belongs to
63 * The event field where to get the value
64 * @return The new state value
66 ITmfXmlStateValue
createStateValue(Element node
, IXmlStateSystemContainer container
, String eventField
);
69 * Create a new XML condition
72 * The XML root of this condition
74 * The state system container this condition belongs to
75 * @return The new XML condition
77 TmfXmlCondition
createCondition(Element node
, IXmlStateSystemContainer container
);
80 * Create a new XML event handler
83 * The XML event handler element
85 * The state system container this state value belongs to
86 * @return The new XML event handler
88 TmfXmlEventHandler
createEventHandler(Element node
, IXmlStateSystemContainer container
);
91 * Create a new XML state change
94 * The XML state change element
96 * The state system container this state change belongs to
97 * @return The new XML state change
99 TmfXmlStateChange
createStateChange(Element node
, IXmlStateSystemContainer container
);
102 * Create a new XML location
105 * The XML location element
107 * The state system container this location belongs to
108 * @return The new XML location
110 TmfXmlLocation
createLocation(Element node
, IXmlStateSystemContainer container
);