summaryrefslogtreecommitdiffstats
path: root/winery/documentation/TOSCA specification/TOSCA-v1.0-os-class-diagram.plantuml
blob: d1860783e5abeb747acabe1937a11b8c36bcb8ee (plain)
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
/***********************************************************************
 * Copyright (c) 2013-2014 University of Stuttgart.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * and Apache License v2.0 which accompanies this distribution.
 * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 * and the Apache License v2.0 is available at
 * http://www.opensource.org/licenses/apache2.0.php.
 * You may elect to redistribute this code under either of these licenses.
 * Contributors:
 *    Oliver Kopp - initial implementation
 *************************************************************************

This model describes the XSD of TOSCA-v1.0.xsd as released by TOSCA v1.0 cos01.
URL: http://docs.oasis-open.org/tosca/TOSCA/v1.0/os/schemas/TOSCA-v1.0.xsd
Specification: http://docs.oasis-open.org/tosca/TOSCA/v1.0/TOSCA-v1.0.html

@startuml

'skinparam monochrome true
'Chooses LightGray as background color
'We're better off with manual setting

skinparam class {
	BackgroundColor White
	ArrowColor Black
	BorderColor Black
	LegendBackgroundColor White
}

skinparam stereotypeCBackgroundColor LightGray

skinparam noteBackgroundColor White
skinparam noteBorderColor Black

'required for SVG
skinparam defaultFontName sans-serif


Title <size:33>TOSCA v1.0 as UML class diagram. This is not an official OASIS document. No warranty. (c) University of Stuttgart. Dual-licensed under EPL and ASLv2. Version 2014-01-29.

legend right
== Note on the model
The model stays close to the XSD with following exceptions:
* Containers such as tTags are ignored: A class is then wired using a 1:n relation to the elements nested in the container
* Relations to TOSCA artifacts are encoded.
** E.g., a QName modelling a substitutable Node Type is modeled as reference to a Node Type
** *Ref elements are not modeled, the association is drawn directly
*** E.g., tCapabilityRef is not contained in the model
* xsd types are presented more relaxed. E.g., xsd:string becomes String

== Conventions
* green: required (+ prefix)
* all others: optional
endlegend



'OS line 19
class tExtensibleElements {
  documentation
  contents of other namespaces
}

'OS line 26
tExtensibleElements <|-- tImport
class tImport {
  anyURI namespace
  anyURI location
  +(anyURI) importType
}

'OS line 42
tExtensibleElements <|-- tDefinitions
class tDefinitions {
  +ID id
  String name
  anyURI targetNamespace
  List<Object> Types
}
tDefinitions *-- "*" tExtension
tDefinitions *-- "*" tImport

'OS line 61
tDefinitions *-- "*" tServiceTemplate
tDefinitions *-- "*" tNodeType
tDefinitions *-- "*" tNodeTypeImplementation
tDefinitions *-- "*" tRelationshipType
tDefinitions *-- "*" tRelationshipTypeImplementation
tDefinitions *-- "*" tCapabilityType
tDefinitions *-- "*" tArtifactType
tDefinitions *-- "*" tArtifactTemplate
tDefinitions *-- "*" tPolicyType
tDefinitions *-- "*" tPolicyTemplate

'OS line 81
tExtensibleElements <|-- tServiceTemplate
class tServiceTemplate {
  +ID id
  String name
  anyURI targetNamespace
}
tServiceTemplate *-- "*" tTag
tServiceTemplate *-- "*" tBoundaryDefinitions
tServiceTemplate *-- tTopologyTemplate
tServiceTemplate *-- "*" tPlan
tServiceTemplate --> "0..1" tNodeType : substitutable

'OS line 102
class tTag {
  +String name
  +String value
}

'OS line 106
class tBoundaryDefinitions {
  Properties
}
tBoundaryDefinitions *-- "*" tPropertyMapping
tBoundaryDefinitions *-- "*" tPropertyConstraint
tBoundaryDefinitions --> "*" tRequirement
tBoundaryDefinitions --> "*" tCapability
tBoundaryDefinitions *-- "*" tPolicy
tBoundaryDefinitions *-- "*" tExportedInterface

'OS line 159
class tPropertyMapping {
 +String serviceTemplatePropertyRef
 +String targetPropertyRef
}
tPropertyMapping --> "0..1" tNodeTemplate
tPropertyMapping --> "0..1" tRelationshipTemplate
tPropertyMapping --> "0..1" tRequirement
tPropertyMapping --> "0..1" tCapability

'OS lines 164 to 171 define tRequiermentRef and tCapabilityRef
'to enable referencing requirements and capabilities
'We directly point to the elements

'OS line 172
abstract class tEntityType
tExtensibleElements <|-- tEntityType
class tEntityType {
'  DerivedFrom is rendered as self-association in all subclasses
'  DerivedFrom
  PropertiesDefinition
  +NCName name
  Boolean abstract [no]
  Boolean final [no]
  anyURI targetNamespace
}
tEntityType *-- "*" tTag

'OS line 196
abstract class tEntityTemplate
tExtensibleElements <|-- tEntityTemplate
class tEntityTemplate {
  Properties
  +xs:ID id
  +QName type
}
tEntityTemplate *-- "*" tPropertyConstraint

'OS line 219
tEntityTemplate <|-- tNodeTemplate
class tNodeTemplate #DDDDDD/EEEEEE {
  String name
  int minInstances [1]
  int|unbounded maxInstances [1]
}
tNodeTemplate *-- "*" tRequirement
tNodeTemplate *-- "*" tCapability
tNodeTemplate *-- "*" tPolicy
tNodeTemplate *-- "*" tDeploymentArtifact
'due to the subclassing of tEntityTemplate
'There, the type attribute references the parent class
tNodeTemplate --> tNodeType : type

'OS line 268
tExtensibleElements <|-- tTopologyTemplate
class tTopologyTemplate
'no attributes exist
tTopologyTemplate *-- "*" tNodeTemplate
tTopologyTemplate *-- "*" tRelationshipTemplate

'OS line 278
tEntityType <|-- tRelationshipType
class tRelationshipType #DDDDDD/EEEEEE
'no attributes
'InstanceStates
tRelationshipType *-- "*" tTopologyElementInstanceState
'SourceInterfaces
tRelationshipType *-- "*" tInterface : SourceInterface
'TargetInterfaces 
tRelationshipType *-- "*" tInterface : TargetInterface
'ValidSource
tRelationshipType --> "0..1" tNodeType : ValidSource
tRelationshipType --> "0..1" tRequirementType : ValidSource
'ValidTarget
tRelationshipType --> "0..1" tNodeType : ValidTarget
tRelationshipType --> "0..1" tCapabilityType : ValidTarget
'DerivedFrom
tRelationshipType --> "0..1" tRelationshipType : DerivedFrom


'OS line 311
tExtensibleElements <|-- tRelationshipTypeImplementation
class tRelationshipTypeImplementation {
   +NCName name
   anyURI targetNamespace
   Boolean abstract
   Boolean final
}
tRelationshipTypeImplementation --> tRelationshipType
tRelationshipTypeImplementation *-- "*" tTag
tRelationshipTypeImplementation --> "0..1" tRelationshipTypeImplementation : DerivedFrom
tRelationshipTypeImplementation *-- "*" tRequiredContainerFeature
tRelationshipTypeImplementation *-- "*" tImplementationArtifact

'OS line 332
tEntityTemplate <|-- tRelationshipTemplate
class tRelationshipTemplate #DDDDDD/EEEEEE {
  String name
}
'SourceElement
tRelationshipTemplate --> "0..1" tNodeTemplate : SourceElement
tRelationshipTemplate --> "0..1" tRequirement : SourceElement
'TargetElement
tRelationshipTemplate --> "0..1" tNodeTemplate : TargetElement
tRelationshipTemplate --> "0..1" tCapability : TargetElement
'
tRelationshipTemplate *-- "*" tRelationshipConstraint
'due to the subclassing of tEntityTemplate
tRelationshipTemplate --> tRelationshipType

'OS line 349
'not modeled as t, but directly nested in tRelationshipTemplate
'We model it as t to be consistent with the other definitions
class tRelationshipConstraint {
  +anyURI constraintType
}

'OS line 365
tEntityType <|-- tNodeType
class tNodeType #DDDDDD/EEEEEE
'No new attributes
'
tNodeType *-- "*" tRequirementDefinition
tNodeType *-- "*" tCapabilityDefinition
tNodeType *-- "*" tTopologyElementInstanceState
tNodeType *-- "*" tInterface
'DerivedFrom
tNodeType --> "0..1" tNodeType : DerivedFrom

'OS line 395
tExtensibleElements <|-- tNodeTypeImplementation
class tNodeTypeImplementation {
  +NCname name
  anyURI targetNamespace
  Boolean abstract
  Boolean final
}
tNodeTypeImplementation --> tNodeType
tNodeTypeImplementation *-- "*" tTag
tNodeTypeImplementation --> "0..1" tNodeTypeImplementation : DerivedFrom
tNodeTypeImplementation *-- "*" tRequiredContainerFeature
tNodeTypeImplementation *-- "*" tDeploymentArtifact
tNodeTypeImplementation *-- "*" tImplementationArtifact

'OS line 417
tEntityType <|-- tRequirementType
class tRequirementType
tRequirementType --> "0..1" tCapabilityType : requiredCapabilityType
'DerivedFrom
tRequirementType --> "0..1" tRequirementType : DerivedFrom

'OS line 424
tExtensibleElements <|-- tRequirementDefinition
class tRequirementDefinition {
  +String name
  int lowerBound [1]
  int|unbounded upperBound [1]
}
tRequirementDefinition *-- "*" tConstraint
tRequirementDefinition --> tRequirementType

'OS line 458
tEntityTemplate <|-- tRequirement
class tRequirement {
  +String name
}
'"name" is also used to point to tRequirementDefinition
tRequirement --> tRequirementDefinition : name
'due to the subclassing of tEntityTemplate
tRequirement --> tRequirementType

'OS line 465
tEntityType <|-- tCapabilityType
'DerivedFrom
tCapabilityType --> "0..1" tCapabilityType : DerivedFrom

'OS line 470
tExtensibleElements <|-- tCapabilityDefinition
class tCapabilityDefinition {
  +String name
  int lowerBound [1]
  int|unbounded upperBound [1]
}
tCapabilityDefinition *-- "*" tConstraint
tCapabilityDefinition --> tCapabilityType

'OS line 504
tEntityTemplate <|-- tCapability
class tCapability {
  +String name
}
'"name" is also used to point to tCapabilityDefinition
tCapability --> tCapabilityDefinition : name
'due to the subclassing of tEntityTemplate
tCapability --> tCapabilityType

'OS line 511
tEntityType <|-- tArtifactType
tArtifactType --> "0..1" tArtifactType : DerivedFrom

'OS line 516
tEntityTemplate <|-- tArtifactTemplate
'PDF line 2607
class tArtifactTemplate {
  String name
}
tArtifactTemplate *-- "*" tArtifactReference
'due to the subclassing of tEntityTemplate
tArtifactTemplate --> tArtifactType

'OS line 537
tExtensibleElements <|-- tDeploymentArtifact
class tDeploymentArtifact {
  +String Name
}
tDeploymentArtifact --> tArtifactType
tDeploymentArtifact --> "0..1" tArtifactTemplate

'OS line 557
tExtensibleElements <|-- tImplementationArtifact
class tImplementationArtifact {
  anyURI interfaceName
  String operationName
}
tImplementationArtifact --> tArtifactType
tImplementationArtifact --> "0..1" tArtifactTemplate

'OS line 573
tExtensibleElements <|-- tPlan
class tPlan {
  +ID id
  String name
  +anyURI planType
  +anyURI languageUsed
  PlanModel | PlanModelReference
}
tPlan *-- "0..1" tCondition : Precondition
tPlan *-- "*" tParameter : InputParamter
tPlan *-- "*" tParameter : OutputParamter

'OS line 614
tEntityType <|-- tPolicyType
class tPolicyType {
  anyURI policyLanguage
}
'AppliesTo/NodeTypeReference: CS02 line 631
tPolicyType --> "*" tNodeType : tAppliesTo/NodeTypeReference
'DerivedFrom
tPolicyType --> "0..1" tPolicyType : DerivedFrom

'OS line 624
tEntityTemplate <|-- tPolicyTemplate
class tPolicyTemplate {
  String name
}
'due to inheritance of tEntityTemplate
tPolicyTemplate --> tPolicyType

'OS line 640
tExtensibleElements <|-- tPolicy
class tPolicy {
  String name
}
tPolicy --> tPolicyType
tPolicy --> "0..1" tPolicyTemplate

'OS line 649
class tConstraint {
  +anyURI constraintType
}

'OS line 655
tConstraint <|-- tPropertyConstraint
class tPropertyConstraint {
  +String property
}

'OS line 671
tExtensibleElements <|-- tExtension
class tExtension {
  +anyURI namespace
  Boolean mustUnderstand [yes]
}

'OS line 679
class tParameter {
  +String name
  +String type
  Boolean required [yes]
}

'OS line 684
class tInterface {
  +anyURI name 'NCName is a subset of anyURI
}
tInterface *-- tOperation

'OS line 690
class tExportedInterface {
  +anyURI name
}
tExportedInterface --> "1..*" tExportedOperation

'OS line 696
tExtensibleElements <|-- tOperation
class tOperation {
  +NCName name
}
tOperation *-- "*" tParameter : InputParameters
tOperation *-- "*" tParameter : OutputParamters

'OS line 719
class tExportedOperation {
  +NCName name
  +anyURI interfaceName
  +NCName operationName
}
tExportedOperation --> "0..1" tNodeTemplate
tExportedOperation --> "0..1" tRelationshipTemplate
tExportedOperation --> "0..1" tPlan


'OS line 743
class tCondition {
  +anyURI expressionLanguage
}

'OS line 751
'tTopologyElementInstanceState does not exist directly, but to be consistent with the others, we introduce it
class tTopologyElementInstanceState {
  anyURI state
}

'OS line 758
class tArtifactReference {
  Include
  Exclude
  +anyURI reference
}

'OS line 773
class tRequiredContainerFeature {
  +anyURI feature
}
@enduml