99f3f8d04115e65812dd6cf2ed698eb647a6a98c
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.analysis.xml.core / src / org / eclipse / linuxtools / tmf / analysis / xml / core / model / readonly / TmfXmlReadOnlyStateValue.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.readonly;
14
15 import java.util.Collections;
16 import java.util.List;
17
18 import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlStateAttribute;
19 import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlStateValue;
20 import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
21 import org.w3c.dom.Element;
22
23 /**
24 * Implements a state value is a read only mode. See {@link TmfXmlStateValue}
25 * for the syntax of the state value.
26 *
27 * In read mode, a state value will typically be used to find a path to a value,
28 * so the value is known and there is a path of attributes that should lead to
29 * it.
30 *
31 * @author Geneviève Bastien
32 */
33 public class TmfXmlReadOnlyStateValue extends TmfXmlStateValue {
34
35 /**
36 * Constructor where the path to the value is a list of state attributes
37 *
38 * @param modelFactory
39 * The factory used to create XML model elements
40 * @param node
41 * The state value XML element
42 * @param container
43 * The state system container this state value belongs to
44 * @param attributes
45 * The attributes representing the path to this value
46 */
47 public TmfXmlReadOnlyStateValue(TmfXmlReadOnlyModelFactory modelFactory, Element node,
48 IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes) {
49 super(modelFactory, node, container, attributes, null);
50 }
51
52 /**
53 * Constructor where the path to the value is an event field
54 *
55 * @param modelFactory
56 * The factory used to create XML model elements
57 * @param node
58 * The state value XML element
59 * @param container
60 * The state system container this state value belongs to
61 * @param eventField
62 * The event field where to get the value
63 */
64 public TmfXmlReadOnlyStateValue(TmfXmlReadOnlyModelFactory modelFactory, Element node,
65 IXmlStateSystemContainer container, String eventField) {
66 super(modelFactory, node, container, Collections.EMPTY_LIST, eventField);
67 }
68
69 }
This page took 0.042109 seconds and 4 git commands to generate.