XML: Add multi-analyses views
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core / src / org / eclipse / tracecompass / tmf / analysis / xml / core / module / xmlView.xsd
CommitLineData
6b5218d0
FW
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- ***************************************************************************
3 * Copyright (c) 2014 École Polytechnique de Montréal
4 *
5 * All rights reserved. This program and the accompanying materials are
6 * made available under the terms of the Eclipse Public License v1.0 which
7 * accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
9 *
10 * Contributors:
11 * Florian Wininger - Initial API and implementation
12 *************************************************************************** -->
13<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
14 attributeFormDefault="unqualified" elementFormDefault="qualified">
15
1a23419e 16 <xs:complexType name="timeGraphView">
85aa7575
GB
17 <xs:annotation>
18 <xs:documentation>Declares a data-driven time graph view, which defines how the view will display the results of an analysis. For now, only state system analysis are supported by this view.</xs:documentation></xs:annotation>
6b5218d0 19 <xs:sequence>
85aa7575
GB
20 <xs:element maxOccurs="1" minOccurs="0" name="head" type="headOutput" >
21 <xs:annotation>
22 <xs:documentation>Provider meta-information on this view, like labels and analysis it applies to.</xs:documentation></xs:annotation></xs:element>
23 <xs:element maxOccurs="unbounded" minOccurs="0" name="definedValue" type="definedValue" >
24 <xs:annotation>
25 <xs:documentation>Define a mapping between a human-readable text and the value used in the analysis. The "definedValue"'s optional "color" attribute is the color with which this value will be displayed.</xs:documentation></xs:annotation></xs:element>
26 <xs:element maxOccurs="unbounded" minOccurs="0" name="entry" type="viewEntry" >
27 <xs:annotation>
28 <xs:documentation>Define how to determine the entries (lines) to show on the time graph view. An entry may have children entry elements defined as children, where children are sub-elements of this one (for example, child attributes in the state system). A parent/child relationship may be defined for entries of the same level. See the viewEntry element documentation for more details.</xs:documentation></xs:annotation></xs:element>
6b5218d0 29 </xs:sequence>
85aa7575
GB
30 <xs:attribute name="id" type="xs:string" use="required" >
31 <xs:annotation>
32 <xs:documentation>The unique identifier of this view element. It will be used by the framework to identify this view.</xs:documentation></xs:annotation></xs:attribute>
6b5218d0
FW
33 </xs:complexType>
34
87c5447c
GB
35 <xs:complexType name="xyView">
36 <xs:annotation>
37 <xs:documentation>Declares a data-driven XY chart view, which defines how the view will display the results of an analysis. For now, only state system analyses are supported by this view.</xs:documentation></xs:annotation>
38 <xs:sequence>
39 <xs:element maxOccurs="1" minOccurs="0" name="head" type="headOutput" >
40 <xs:annotation>
41 <xs:documentation>Provider meta-information on this view, like labels and analyses it applies to.</xs:documentation></xs:annotation></xs:element>
42 <xs:element maxOccurs="1" minOccurs="1" name="entry" type="xyViewEntry" >
43 <xs:annotation>
44 <xs:documentation>Define how to determine the entries (series) to show on the XY view. See the xyViewEntry element documentation for more details.</xs:documentation></xs:annotation></xs:element>
45 </xs:sequence>
46 <xs:attribute name="id" type="xs:string" use="required" >
47 <xs:annotation>
48 <xs:documentation>The unique identifier of this view element. It will be used by the framework to identify this view.</xs:documentation></xs:annotation></xs:attribute>
49 </xs:complexType>
50
6b5218d0 51 <xs:complexType name="headOutput">
85aa7575
GB
52 <xs:annotation>
53 <xs:documentation>Declares the meta-information that can be defined for an XML time graph view.</xs:documentation></xs:annotation>
6b5218d0
FW
54 <xs:sequence>
55 <xs:element maxOccurs="unbounded" minOccurs="0" name="analysis">
85aa7575
GB
56 <xs:annotation>
57 <xs:documentation>Indicate that the view applies to the analysis identified with the given ID. To have a view apply to an XML-defined state system analysis, you'd use the state provider ID in the "stateProvider" element.</xs:documentation></xs:annotation>
6b5218d0 58 <xs:complexType>
85aa7575
GB
59 <xs:attribute name="id" type="xs:string" use="required" >
60 <xs:annotation>
61 <xs:documentation>The ID of the analysis this view applies to.</xs:documentation></xs:annotation></xs:attribute>
62 <xs:attribute name="ssid" type="xs:string" use="optional" >
63 <xs:annotation>
64 <xs:documentation>The ID of the state system this view applies to. The attribute is used only if the analysis contains more than one state system.</xs:documentation></xs:annotation></xs:attribute>
6b5218d0
FW
65 </xs:complexType>
66 </xs:element>
67 <xs:element maxOccurs="1" minOccurs="0" name="label">
85aa7575
GB
68 <xs:annotation>
69 <xs:documentation>Add a label to the time graph view. If provided, this text will be displayed to the user to identify this view, otherwise, the view's ID will be used.</xs:documentation></xs:annotation>
6b5218d0 70 <xs:complexType>
85aa7575
GB
71 <xs:attribute name="value" use="required" >
72 <xs:annotation>
73 <xs:documentation>The text used as a name for this time graph view.</xs:documentation></xs:annotation></xs:attribute>
6b5218d0
FW
74 </xs:complexType>
75 </xs:element>
76 </xs:sequence>
77 </xs:complexType>
78
79 <xs:complexType name="viewEntry">
85aa7575
GB
80 <xs:annotation>
81 <xs:documentation>Define a path to entries in the view. If this element is at the top level, the base path to reach the entry is the root of the state system. Otherwise, it will use the parent element's corresponding attribute as the base. Each view entry element corresponds to a time graph view entry that will actually be displayed.</xs:documentation></xs:annotation>
6b5218d0 82 <xs:sequence>
85aa7575
GB
83 <xs:element maxOccurs="1" minOccurs="0" name="display" type="viewStateAttribute" >
84 <xs:annotation>
85 <xs:documentation>Indicate the attribute whose value will be displayed in the time graph (the value that changes over time). If this element is not specified, no entry will be created for this element, and all other elements will be ignored.</xs:documentation></xs:annotation></xs:element>
86 <xs:element maxOccurs="1" minOccurs="0" name="id" type="viewStateAttribute" >
87 <xs:annotation>
88 <xs:documentation>Specify which attribute to use as ID for this entry. This ID will be used in the ID column in the view, and will also be used to build the tree if a parent element is specified. If this element is not present, the display attribute's name will be used as ID.</xs:documentation></xs:annotation></xs:element>
89 <xs:element maxOccurs="1" minOccurs="0" name="parent" type="viewStateAttribute" >
90 <xs:annotation>
91 <xs:documentation>Specify how to find the parent's ID of this entry. By default, the parent/child hierarchy is the same as defined in the timeGraphView element of the XML file. This element will add to this default parent/child relationship so that elements at the same XML-defined level can still have a relationship.</xs:documentation></xs:annotation></xs:element>
92 <xs:element maxOccurs="1" minOccurs="0" name="name" type="viewStateAttribute" >
93 <xs:annotation>
94 <xs:documentation>Specify how to find the name of this entry. Typically, the name will be human-readable. If not specified, the display attribute's name will be used as the name.</xs:documentation></xs:annotation></xs:element>
95 <xs:element maxOccurs="unbounded" minOccurs="0" name="entry" type="viewEntry" >
96 <xs:annotation>
97 <xs:documentation>Define child entries for this entry. Child entries will be shown as children of this entry (with or without additional parent/child relationship defined through the viewEntry element's "parent" element).</xs:documentation></xs:annotation></xs:element>
6b5218d0 98 </xs:sequence>
85aa7575
GB
99 <xs:attribute name="path" type="xs:string" use="required" >
100 <xs:annotation>
c54d7207
GB
101 <xs:documentation>The path of the entry in the state system. Wildcards '*' may be used. For example, to display entries from all CPUs, the path could be "CPUs/*" and one entry will be created for each sub-attribute of the "CPUs" attribute. Each entry will be used as the base for all child elements, unless specified otherwise. Child entries can use place holders for any previous wildcard, with '$1' being the first wildcard encountered.</xs:documentation></xs:annotation></xs:attribute>
102 <xs:attribute name="analysisId" type="xs:string" use="optional" >
103 <xs:annotation>
104 <xs:documentation>The ID of an analysis different from the one defined in the output and from which this entry will be taken. In this case, the corresponding path is always absolute and any entry underneath will refer to this analysis ID.</xs:documentation></xs:annotation></xs:attribute>
6b5218d0
FW
105 </xs:complexType>
106
87c5447c
GB
107 <xs:complexType name="xyViewEntry">
108 <xs:annotation>
109 <xs:documentation>Define a path to entries in the view. If this element is at the top level, the base path to reach the entry is the root of the state system. Otherwise, it will use the parent element's corresponding attribute as the base. Each XY view entry element corresponds to a series in the resulting view.</xs:documentation></xs:annotation>
110 <xs:sequence>
111 <xs:element maxOccurs="1" minOccurs="0" name="display" type="viewStateAttribute" >
112 <xs:annotation>
113 <xs:documentation>Indicate the attribute whose value will be displayed in the time graph (the value that changes over time). If this element is not specified, no entry will be created for this element, and all other elements will be ignored.</xs:documentation></xs:annotation></xs:element>
114 <xs:element maxOccurs="1" minOccurs="0" name="name" type="viewStateAttribute" >
115 <xs:annotation>
116 <xs:documentation>Specify how to find the name of this entry. Typically, the name will be human-readable. If not specified, the display attribute's name will be used as the name.</xs:documentation></xs:annotation></xs:element>
117 </xs:sequence>
118 <xs:attribute name="path" type="xs:string" use="required" >
119 <xs:annotation>
120 <xs:documentation>The path of the entry in the state system. Wildcards '*' may be used. For example, to display entries from all CPUs, the path could be "CPUs/*" and one series will be created for each sub-attribute of the "CPUs" attribute. Each entry will be used as the base for all child elements, unless specified otherwise.</xs:documentation></xs:annotation></xs:attribute>
e2ea8484
GB
121 <xs:attribute name="displayType" use="optional" default="absolute" >
122 <xs:annotation>
123 <xs:documentation>Indicate how to display the value, compared with preceding values.</xs:documentation></xs:annotation>
124 <xs:simpleType>
125 <xs:restriction base="xs:string">
126 <xs:enumeration value="absolute" >
127 <xs:annotation>
128 <xs:documentation>The value is shown as is.</xs:documentation></xs:annotation></xs:enumeration>
129 <xs:enumeration value="delta" >
130 <xs:annotation>
131 <xs:documentation>The value is the difference between the value at current timestamp and the value at the preceding timestamp.</xs:documentation></xs:annotation></xs:enumeration>
132 </xs:restriction>
133 </xs:simpleType>
134 </xs:attribute>
87c5447c
GB
135 </xs:complexType>
136
6b5218d0
FW
137 <xs:complexType name="viewStateAttribute">
138 <xs:sequence>
85aa7575
GB
139 <xs:element maxOccurs="unbounded" minOccurs="0" name="stateAttribute" type="viewStateAttribute" >
140 <xs:annotation>
141 <xs:documentation>If the type is a "query", those stateAttribute elements describe the elements of the query.</xs:documentation></xs:annotation></xs:element>
6b5218d0
FW
142 </xs:sequence>
143 <xs:attribute name="type" use="required">
85aa7575
GB
144 <xs:annotation>
145 <xs:documentation>The type of path to this attribute. The value of the other attributes will depend on the selected type.</xs:documentation></xs:annotation>
6b5218d0
FW
146 <xs:simpleType>
147 <xs:restriction base="xs:string">
85aa7575
GB
148 <xs:enumeration value="constant" >
149 <xs:annotation>
150 <xs:documentation>This type identifies the state system attribute by a constant string. For instance, if the state system attribute to display is "Status", it would be a constant type with value "Status".</xs:documentation></xs:annotation></xs:enumeration>
151 <xs:enumeration value="location" >
152 <xs:annotation>
153 <xs:documentation>This type indicates that the path to the attribute is at the specified location. A location avoids having to write the full path to an attribute every time it is being used. The location itself is a sequence of stateAttribute elements. For example, if we previously defined a location named "Procname" for path "Threads/tid/Procname", we can use a stateAttribute of type location with "Procname" value.</xs:documentation></xs:annotation></xs:enumeration>
154 <xs:enumeration value="query" >
155 <xs:annotation>
156 <xs:documentation>This type indicates that the path to the attribute is the result of a query. If this type is selected, a sequence of stateAttribute elements needs to be specified for this viewStateAttribute. The result of the query is the attribute name of the current element. For example, if the attribute we want is the PID of the current process on CPU 0, that PID can be found through the query "CPUs/0/CurrentThread". The value of this attribute would be for example 1234, which is the attribute we are looking for.</xs:documentation></xs:annotation></xs:enumeration>
157 <xs:enumeration value="self" >
158 <xs:annotation>
159 <xs:documentation>This type indicates that the requested attribute is the attribute itself. For this attribute, the reference is always relative (setting it to absolute will be ignored).</xs:documentation></xs:annotation></xs:enumeration>
6b5218d0
FW
160 </xs:restriction>
161 </xs:simpleType>
162 </xs:attribute>
85aa7575
GB
163 <xs:attribute name="value" type="xs:string" >
164 <xs:annotation>
165 <xs:documentation>The value of this state attribute. A value should be specified if the type is "constant" or "location".</xs:documentation></xs:annotation></xs:attribute>
6b5218d0 166 <xs:attribute name="reference" use="optional" default="relative">
85aa7575
GB
167 <xs:annotation>
168 <xs:documentation>Specify which state system attribute to use as the base to reach this path. It is either absolute or relative. By default, it is relative to the current entry.</xs:documentation></xs:annotation>
6b5218d0
FW
169 <xs:simpleType>
170 <xs:restriction base="xs:string">
85aa7575
GB
171 <xs:enumeration value="relative" >
172 <xs:annotation>
173 <xs:documentation>The path will be calculated starting from the entry under which this viewStateAttribute element is defined.</xs:documentation></xs:annotation></xs:enumeration>
174 <xs:enumeration value="absolute" >
175 <xs:annotation>
176 <xs:documentation>The path will be calculated starting from the root of the state system. That means that if the entry itself is one of "CPUs/*", we could reach another attribute from the root of the state system, like "Threads/tid".</xs:documentation></xs:annotation></xs:enumeration>
6b5218d0
FW
177 </xs:restriction>
178 </xs:simpleType>
179 </xs:attribute>
180 </xs:complexType>
85aa7575 181</xs:schema>
This page took 0.082532 seconds and 5 git commands to generate.