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
.tracecompass
.tmf
.analysis
.xml
.core
.model
.readonly
;
15 import static org
.eclipse
.tracecompass
.common
.core
.NonNullUtils
.checkNotNull
;
17 import java
.util
.Collections
;
18 import java
.util
.List
;
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
;
26 * Implements a state value is a read only mode. See {@link TmfXmlStateValue}
27 * for the syntax of the state value.
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
33 * @author Geneviève Bastien
35 public class TmfXmlReadOnlyStateValue
extends TmfXmlStateValue
{
38 * Constructor where the path to the value is a list of state attributes
41 * The factory used to create XML model elements
43 * The state value XML element
45 * The state system container this state value belongs to
47 * The attributes representing the path to this value
49 public TmfXmlReadOnlyStateValue(TmfXmlReadOnlyModelFactory modelFactory
, Element node
,
50 IXmlStateSystemContainer container
, List
<ITmfXmlStateAttribute
> attributes
) {
51 super(modelFactory
, node
, container
, attributes
, null);
55 * Constructor where the path to the value is an event field
58 * The factory used to create XML model elements
60 * The state value XML element
62 * The state system container this state value belongs to
64 * The event field where to get the value
66 public TmfXmlReadOnlyStateValue(TmfXmlReadOnlyModelFactory modelFactory
, Element node
,
67 IXmlStateSystemContainer container
, String eventField
) {
68 super(modelFactory
, node
, container
, checkNotNull(Collections
.EMPTY_LIST
), eventField
);