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