-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeployment_model.xsd
210 lines (193 loc) · 18.5 KB
/
deployment_model.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="model">
<xs:complexType>
<xs:sequence>
<xs:element name="modelDescription" minOccurs="0" type="modelDescriptionType" />
<xs:element name="components" type="componentsType" />
<xs:element name="channels" minOccurs="0" type="channelsType" />
<xs:element name="eventChannels" minOccurs="0" type="eventChannelsType" />
<!-- Grouping -->
<xs:element name="groups" minOccurs="0" maxOccurs="1" type="groupsType" />
<xs:element name="modelGUI" minOccurs="0" maxOccurs="1" type="modelGUIType" />
</xs:sequence>
<xs:attribute name="modelName" type="xs:string" use="required"/>
<xs:attribute name="version" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<!-- Start of Custom Types -->
<xs:complexType name ="modelDescriptionType">
<xs:sequence>
<xs:element name="shortDescription" minOccurs="1" maxOccurs="1" type="xs:string"/>
<xs:element name="requirements" minOccurs="1" maxOccurs="1" type="xs:string"/>
<xs:element name="description" minOccurs="1" maxOccurs="1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="componentsType">
<xs:sequence>
<xs:element name="component" minOccurs="0" maxOccurs="unbounded" type="componentType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="channelsType">
<xs:sequence>
<xs:element name="channel" minOccurs="0" maxOccurs="unbounded" type="channel"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="eventChannelsType">
<xs:sequence>
<xs:element name="eventChannel" minOccurs="1" maxOccurs="unbounded" type="eventChannel"/>
</xs:sequence>
</xs:complexType>
<!-- Grouping -->
<xs:complexType name="groupsType">
<xs:sequence>
<xs:element name="group" minOccurs="0" maxOccurs="unbounded" type="group"/>
</xs:sequence>
</xs:complexType>
<!-- Start of Custom Sub Types -->
<xs:complexType name="componentType">
<xs:sequence>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="ports" minOccurs="0" maxOccurs="1" type="portsType" />
<xs:element name="properties" minOccurs="0" type="propertiesType"/>
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="layoutType"/> <!-- layout should be mandatory -->
<xs:element name="gui" minOccurs="0" maxOccurs="1" type="guiType"/>
</xs:sequence>
<xs:attribute name="type_id" type="xs:string" use="required"/>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="channel">
<xs:sequence>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="source" type="bindingEdge"/>
<xs:element name="target" type="bindingEdge"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="eventChannel">
<xs:sequence>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="sources" type="eventChannelSourcesType" /> <!-- why do we need "sources" AND "source", although there is never more than 1 source? (if changed, changes need to be applied in model.js saveModel())-->
<xs:element name="targets" type="eventChannelTargetsType" /><!-- why do we need "targets" AND "target", although there is never more than 1 target? if changed, changes need to be applied in model.js saveModel())-->
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<!-- Grouping -->
<xs:complexType name="group">
<xs:sequence>
<xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="componentId" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="portAlias" type="portAlias" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<!-- Model GUI -->
<xs:complexType name ="modelGUIType">
<xs:sequence>
<xs:element name="Decoration" minOccurs="1" maxOccurs="1" type="xs:boolean"/>
<xs:element name="Fullscreen" minOccurs="1" maxOccurs="1" type="xs:boolean"/>
<xs:element name="AlwaysOnTop" minOccurs="1" maxOccurs="1" type="xs:boolean"/>
<xs:element name="ToSystemTray" minOccurs="1" maxOccurs="1" type="xs:boolean"/>
<xs:element name="ShopControlPanel" minOccurs="1" maxOccurs="1" type="xs:boolean"/> <!-- typo: it should be "showControlPanel" - needs correcting -->
<xs:element name="AREGUIWindow" minOccurs="1" maxOccurs="1" type="guiType"/>
</xs:sequence>
</xs:complexType>
<!-- End of Custom Sub Types -->
<!-- Start of Custom 2Sub Types -->
<xs:complexType name="portsType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="inputPort" minOccurs="0" maxOccurs="unbounded" type="inputPortType"/>
<xs:element name="outputPort" minOccurs="0" maxOccurs="unbounded" type="outputPortType"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="propertiesType">
<xs:sequence>
<xs:element name="property" minOccurs="0" maxOccurs="unbounded" type="propertyType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="layoutType">
<xs:sequence>
<!-- posX and poxY should DEFINITELY be mandatory -->
<xs:element name="posX" minOccurs="0" maxOccurs="1" type="xs:integer"/>
<xs:element name="posY" minOccurs="0" maxOccurs="1" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="guiType">
<xs:sequence>
<xs:element name="posX" minOccurs="1" maxOccurs="1" type="xs:integer"/>
<xs:element name="posY" minOccurs="1" maxOccurs="1" type="xs:integer"/>
<xs:element name="width" minOccurs="1" maxOccurs="1" type="xs:integer"/>
<xs:element name="height" minOccurs="1" maxOccurs="1" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="bindingEdge">
<xs:sequence>
<xs:element name="component" type="bindingEdgeComponentType" />
<xs:element name="port" type="bindingEdgePortType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="eventChannelSourcesType">
<xs:sequence>
<xs:element name="source" type="eventEdge" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="eventChannelTargetsType">
<xs:sequence>
<xs:element name="target" type="eventEdge" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<!-- Grouping -->
<xs:complexType name="portAlias">
<xs:attribute name="portId" type="xs:string" use="required"/>
<xs:attribute name="portAlias" type="xs:string" use="required"/>
</xs:complexType>
<!-- End of Custom 2Sub Types -->
<!-- Start of Custom 3Sub Types -->
<xs:complexType name="inputPortType">
<xs:sequence>
<xs:element name="properties" minOccurs="0" type="propertiesType"/>
<xs:element name="refs" type="refType" minOccurs="0"/> <!-- probably can be removed -->
</xs:sequence>
<xs:attribute name="portTypeID" type="xs:string" use="required"/>
<xs:attribute name="sync" type="xs:boolean" use="optional"/> <!-- Sync -->
</xs:complexType>
<xs:complexType name="outputPortType">
<xs:sequence>
<xs:element name="properties" minOccurs="0" type="propertiesType"/>
<xs:element name="refs" type="refType" minOccurs="0"/> <!-- probably can be removed -->
</xs:sequence>
<xs:attribute name="portTypeID" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="eventEdge">
<xs:sequence>
<xs:element name="component" type="eventEdgeComponentType" />
<xs:element name="eventPort" type="eventEdgeEventPortType" />
<xs:element name="refs" type="refType" minOccurs="0"/> <!-- probably can be removed -->
</xs:sequence>
</xs:complexType>
<xs:complexType name="propertyType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="bindingEdgeComponentType">
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="bindingEdgePortType">
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<!-- End of Custom 3Sub Types -->
<!-- Start of Custom 4Sub Types -->
<xs:complexType name="eventEdgeComponentType">
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="eventEdgeEventPortType">
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="refType">
<xs:sequence>
<xs:element name="componentID" minOccurs="1" maxOccurs="1" type="xs:string"/>
<xs:element name="portID" minOccurs="1" maxOccurs="1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<!-- End of Custom Types -->
</xs:schema>