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
.stateprovider
;
15 import org
.eclipse
.core
.runtime
.IPath
;
16 import org
.eclipse
.jdt
.annotation
.NonNull
;
17 import org
.eclipse
.linuxtools
.tmf
.analysis
.xml
.core
.module
.IXmlModuleMetadata
;
18 import org
.eclipse
.linuxtools
.tmf
.analysis
.xml
.core
.module
.XmlHeadInfo
;
19 import org
.eclipse
.linuxtools
.tmf
.core
.statesystem
.ITmfStateProvider
;
20 import org
.eclipse
.linuxtools
.tmf
.core
.statesystem
.TmfStateSystemAnalysisModule
;
23 * Analysis module for the data-driven state systems, defined in XML.
25 * @author Geneviève Bastien
28 public class XmlStateSystemModule
extends TmfStateSystemAnalysisModule
29 implements IXmlModuleMetadata
{
31 private IPath fXmlFile
;
32 private XmlHeadInfo fHeadInfo
= null;
35 protected StateSystemBackendType
getBackendType() {
36 return StateSystemBackendType
.FULL
;
41 protected ITmfStateProvider
createStateProvider() {
42 return new XmlStateProvider(getTrace(), getId(), fXmlFile
);
46 public String
getName() {
47 String name
= fHeadInfo
.getName();
55 * Sets the file path of the XML file containing the state provider
58 * The full path to the XML file
60 public void setXmlFile(IPath file
) {
65 public void setHeadInfo(XmlHeadInfo headInfo
) {
70 * Get the path to the XML file containing this state provider definition.
72 * @return XML file path
74 public IPath
getXmlFile() {