]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.base.ontology/graph/ConnectionPoints.pgraph
d069d127aafd17ce55b3eaa2517abd6b06459d3f
[simantics/platform.git] / bundles / org.simantics.document.base.ontology / graph / ConnectionPoints.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 STR = <http://www.simantics.org/Structural-1.2>
3 DOC = <http://www.simantics.org/Documentation-1.2>
4 RELATIONS = <http://www.simantics.org/Documentation-1.2/Relations>
5 G2D = <http://www.simantics.org/G2D-1.1>
6 DIA = <http://www.simantics.org/Diagram-2.2>
7 MOD = <http://www.simantics.org/Modeling-1.2>
8
9
10 /*** Structure connections ***/
11 DOC.Document.ChildRelation <T STR.ConnectionRelation
12     >-- DOC.Document.ChildRelation.ordinal --> L0.String <R L0.HasProperty
13
14 DOC.Document.IsConnectedToChild <R STR.IsConnectedTo : DOC.Document.ChildRelation
15
16 DOC.ConnectionType : STR.ConnectionType
17     G2D.HasColor [0.8,0.64,0.0] : G2D.Color
18     G2D.HasStrokeType G2D.StrokeType.Scaling
19     G2D.HasStroke _ : G2D.Stroke
20         G2D.HasStrokeWidth 0.2 : L0.Float
21         G2D.HasLineCap G2D.LineCap.ButtCap
22         G2D.HasLineJoin G2D.LineJoin.MiterJoin
23     G2D.HasRounding 3.0
24     STR.HasConnectionConstraint
25         DOC.ParentToChildConstraint : DOC.RelationTypeConstraint
26             DOC.RelationTypeConstraint.Type1 RELATIONS.parentRelation
27             DOC.RelationTypeConstraint.Type2 RELATIONS.childRelation
28         DOC.NoSelfConnectionConstraint
29
30 DOC.RelationTypeConstraint <T STR.ConnectionConstraint
31     L0.HasDescription """Ensures that connections are type1-type2 or type2-type1."""
32     >-- DOC.RelationTypeConstraint.Type1 --> STR.ConnectionRelation <R L0.HasProperty : L0.FunctionalRelation
33     >-- DOC.RelationTypeConstraint.Type2 --> STR.ConnectionRelation <R L0.HasProperty : L0.FunctionalRelation
34
35 DOC.NoSelfConnectionConstraint : STR.ConnectionConstraint
36     L0.HasDescription """Ensures that elements cannot connect to themselves"""    
37
38
39 defChildConnectionPoint : L0.Template
40     @template %subject %ordinal
41         %subject <R DOC.Document.IsConnectedToChild
42             DOC.Document.ChildRelation.ordinal %ordinal
43             
44 RELATIONS.parentRelation <T L0.FunctionalRelation <T STR.ConnectionRelation
45     @L0.assert STR.AllowsConnectionType DOC.ConnectionType
46     @L0.assert MOD.ConnectionRelationToTerminal DOC.Terminals.ParentTerminal
47     @L0.assert STR.HasAttachmentRelation DIA.HasPlainConnector
48                 
49 RELATIONS.childRelation <T STR.ConnectionRelation
50     @L0.assert STR.AllowsConnectionType DOC.ConnectionType
51     @L0.assert MOD.ConnectionRelationToTerminal DOC.Terminals.ChildTerminal
52     @L0.assert STR.HasAttachmentRelation DIA.HasArrowConnector
53
54 RELATIONS.functionalChildRelation <T RELATIONS.childRelation <T L0.FunctionalRelation
55
56 RELATIONS.parent : RELATIONS.parentRelation <R STR.IsConnectedTo
57
58 RELATIONS.part1 : RELATIONS.functionalChildRelation
59     @defChildConnectionPoint "1"
60 RELATIONS.part2 : RELATIONS.functionalChildRelation
61     @defChildConnectionPoint "2"
62 RELATIONS.part3 : RELATIONS.functionalChildRelation
63     @defChildConnectionPoint "3"
64 RELATIONS.part4 : RELATIONS.functionalChildRelation
65     @defChildConnectionPoint "4"    
66 RELATIONS.part5 : RELATIONS.functionalChildRelation
67     @defChildConnectionPoint "5"  
68 RELATIONS.part6 : RELATIONS.functionalChildRelation
69     @defChildConnectionPoint "6"  
70 RELATIONS.part7 : RELATIONS.functionalChildRelation
71     @defChildConnectionPoint "7"  
72 RELATIONS.part8 : RELATIONS.functionalChildRelation
73     @defChildConnectionPoint "8"
74 RELATIONS.part9 : RELATIONS.functionalChildRelation
75     @defChildConnectionPoint "9"
76 RELATIONS.part10 : RELATIONS.functionalChildRelation
77     @defChildConnectionPoint "10"
78
79 RELATIONS.part11 : RELATIONS.functionalChildRelation
80     @defChildConnectionPoint "11"
81 RELATIONS.part12 : RELATIONS.functionalChildRelation
82     @defChildConnectionPoint "12"
83 RELATIONS.part13 : RELATIONS.functionalChildRelation
84     @defChildConnectionPoint "13"
85 RELATIONS.part14 : RELATIONS.functionalChildRelation
86     @defChildConnectionPoint "14"
87 RELATIONS.part15 : RELATIONS.functionalChildRelation
88     @defChildConnectionPoint "15"
89 RELATIONS.part16 : RELATIONS.functionalChildRelation
90     @defChildConnectionPoint "16"
91 RELATIONS.part17 : RELATIONS.functionalChildRelation
92     @defChildConnectionPoint "17"
93 RELATIONS.part18 : RELATIONS.functionalChildRelation
94     @defChildConnectionPoint "18"
95 RELATIONS.part19 : RELATIONS.functionalChildRelation
96     @defChildConnectionPoint "19"
97 RELATIONS.part20 : RELATIONS.functionalChildRelation
98     @defChildConnectionPoint "20"
99 RELATIONS.part21 : RELATIONS.functionalChildRelation
100     @defChildConnectionPoint "21"
101 RELATIONS.part22 : RELATIONS.functionalChildRelation
102     @defChildConnectionPoint "22"
103 RELATIONS.part23 : RELATIONS.functionalChildRelation
104     @defChildConnectionPoint "23"
105 RELATIONS.part24 : RELATIONS.functionalChildRelation
106     @defChildConnectionPoint "24"
107 RELATIONS.part25 : RELATIONS.functionalChildRelation
108     @defChildConnectionPoint "25"
109 RELATIONS.part26 : RELATIONS.functionalChildRelation
110     @defChildConnectionPoint "26"
111 RELATIONS.part27 : RELATIONS.functionalChildRelation
112     @defChildConnectionPoint "27"
113 RELATIONS.part28 : RELATIONS.functionalChildRelation
114     @defChildConnectionPoint "28"
115 RELATIONS.part29 : RELATIONS.functionalChildRelation
116     @defChildConnectionPoint "29"
117 RELATIONS.part30 : RELATIONS.functionalChildRelation
118     @defChildConnectionPoint "30"
119 RELATIONS.part31 : RELATIONS.functionalChildRelation
120     @defChildConnectionPoint "31"
121 RELATIONS.part32 : RELATIONS.functionalChildRelation
122     @defChildConnectionPoint "32"
123 RELATIONS.part33 : RELATIONS.functionalChildRelation
124     @defChildConnectionPoint "33"
125 RELATIONS.part34 : RELATIONS.functionalChildRelation
126     @defChildConnectionPoint "34"
127 RELATIONS.part35 : RELATIONS.functionalChildRelation
128     @defChildConnectionPoint "35"
129 RELATIONS.part36 : RELATIONS.functionalChildRelation
130     @defChildConnectionPoint "36"
131 RELATIONS.part37 : RELATIONS.functionalChildRelation
132     @defChildConnectionPoint "37"
133 RELATIONS.part38 : RELATIONS.functionalChildRelation
134     @defChildConnectionPoint "38"
135 RELATIONS.part39 : RELATIONS.functionalChildRelation
136     @defChildConnectionPoint "39"
137 RELATIONS.part40 : RELATIONS.functionalChildRelation
138     @defChildConnectionPoint "40"
139 RELATIONS.part41 : RELATIONS.functionalChildRelation
140     @defChildConnectionPoint "41"
141 RELATIONS.part42 : RELATIONS.functionalChildRelation
142     @defChildConnectionPoint "42"
143 RELATIONS.part43 : RELATIONS.functionalChildRelation
144     @defChildConnectionPoint "43"
145 RELATIONS.part44 : RELATIONS.functionalChildRelation
146     @defChildConnectionPoint "44"
147 RELATIONS.part45 : RELATIONS.functionalChildRelation
148     @defChildConnectionPoint "45"
149 RELATIONS.part46 : RELATIONS.functionalChildRelation
150     @defChildConnectionPoint "46"
151 RELATIONS.part47 : RELATIONS.functionalChildRelation
152     @defChildConnectionPoint "47"
153 RELATIONS.part48 : RELATIONS.functionalChildRelation
154     @defChildConnectionPoint "48"
155 RELATIONS.part49 : RELATIONS.functionalChildRelation
156     @defChildConnectionPoint "49"
157 RELATIONS.part50 : RELATIONS.functionalChildRelation
158     @defChildConnectionPoint "50"
159
160 RELATIONS.partN <R STR.IsConnectedTo : RELATIONS.childRelation
161     
162 /*** Command connections ***/
163 DOC.Document.CommandRelation <T STR.ConnectionRelation
164     >-- DOC.Document.CommandRelation.ordinal --> L0.String <R L0.HasProperty
165
166 DOC.Document.IsConnectedToCommand <R STR.IsConnectedTo : DOC.Document.CommandRelation
167
168 DOC.CommandConnectionType : STR.ConnectionType
169     G2D.HasColor [1.0,0.0,1.0] : G2D.Color
170     G2D.HasStrokeType G2D.StrokeType.Scaling
171     G2D.HasStroke _ : G2D.Stroke
172         G2D.HasStrokeWidth 0.2 : L0.Float
173         G2D.HasLineCap G2D.LineCap.ButtCap
174         G2D.HasLineJoin G2D.LineJoin.MiterJoin
175     G2D.HasRounding 3.0
176     STR.HasConnectionConstraint
177         DOC.CommandToCommandExecutorConstraint : DOC.RelationTypeConstraint
178             DOC.RelationTypeConstraint.Type1 RELATIONS.commandExecutorRelation
179             DOC.RelationTypeConstraint.Type2 RELATIONS.commandRelation        
180         DOC.NoSelfConnectionConstraint
181
182 defCommandExecutorConnectionPoint : L0.Template
183     @template %subject
184         %subject <R STR.IsConnectedTo
185
186 defCommandConnectionPoint : L0.Template
187     @template %subject %ordinal
188         %subject <R DOC.Document.IsConnectedToCommand
189             DOC.Document.CommandRelation.ordinal %ordinal
190             
191 RELATIONS.commandExecutorRelation <T STR.ConnectionRelation
192     @L0.assert STR.AllowsConnectionType DOC.CommandConnectionType
193     @L0.assert MOD.ConnectionRelationToTerminal DOC.Terminals.CommandExecutorTerminal
194     @L0.assert STR.HasAttachmentRelation DIA.HasArrowConnector
195     >-- RELATIONS.commandExecutorRelation.propagate --> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
196     @L0.assert RELATIONS.commandExecutorRelation.propagate false 
197                 
198 RELATIONS.commandRelation <T L0.FunctionalRelation <T STR.ConnectionRelation
199     @L0.assert STR.AllowsConnectionType DOC.CommandConnectionType
200     @L0.assert MOD.ConnectionRelationToTerminal DOC.Terminals.CommandTerminal
201     @L0.assert STR.HasAttachmentRelation DIA.HasPlainConnector
202             
203 RELATIONS.click : RELATIONS.commandRelation
204     @defCommandConnectionPoint "1"
205     
206 RELATIONS.edit : RELATIONS.commandRelation
207     @defCommandConnectionPoint "2"
208
209 RELATIONS.load : RELATIONS.commandRelation
210     @defCommandConnectionPoint "3"
211
212 RELATIONS.trigger : RELATIONS.commandRelation
213     @defCommandConnectionPoint "4"
214
215 RELATIONS.select : RELATIONS.commandRelation
216     @defCommandConnectionPoint "5"    
217     
218 RELATIONS.valueChanged : RELATIONS.commandRelation
219     @defCommandConnectionPoint "6"
220     
221 RELATIONS.triggerTrue : RELATIONS.commandRelation
222     @defCommandConnectionPoint "7"       
223     
224 RELATIONS.triggerFalse : RELATIONS.commandRelation
225     @defCommandConnectionPoint "8"
226     
227 RELATIONS.uploaded : RELATIONS.commandRelation
228     @defCommandConnectionPoint "9"
229
230 RELATIONS.closed : RELATIONS.commandRelation
231     @defCommandConnectionPoint "10"
232
233 RELATIONS.enter : RELATIONS.commandRelation
234     @defCommandConnectionPoint "11"
235
236 RELATIONS.submit : RELATIONS.commandExecutorRelation
237     @defCommandExecutorConnectionPoint
238
239 RELATIONS.event : RELATIONS.commandExecutorRelation
240     @defCommandExecutorConnectionPoint
241     
242 RELATIONS.open : RELATIONS.commandExecutorRelation
243     @defCommandExecutorConnectionPoint
244
245 RELATIONS.close : RELATIONS.commandExecutorRelation
246     @defCommandExecutorConnectionPoint
247     
248 RELATIONS.sequenceTrigger : RELATIONS.commandExecutorRelation
249     @defCommandExecutorConnectionPoint
250     RELATIONS.commandExecutorRelation.propagate true    
251
252 RELATIONS.broadcast : RELATIONS.commandExecutorRelation
253     @defCommandExecutorConnectionPoint
254
255 RELATIONS.sequence1 : RELATIONS.commandRelation
256     @defCommandConnectionPoint "1"     
257
258 RELATIONS.sequence2 : RELATIONS.commandRelation
259     @defCommandConnectionPoint "2"
260
261 RELATIONS.sequence3 : RELATIONS.commandRelation
262     @defCommandConnectionPoint "3"
263
264 RELATIONS.sequence4 : RELATIONS.commandRelation
265     @defCommandConnectionPoint "4"
266
267 RELATIONS.sequence5 : RELATIONS.commandRelation
268     @defCommandConnectionPoint "5"
269
270 RELATIONS.sequence6 : RELATIONS.commandRelation
271     @defCommandConnectionPoint "6"
272
273 RELATIONS.sequence7 : RELATIONS.commandRelation
274     @defCommandConnectionPoint "7"
275
276 RELATIONS.sequence8 : RELATIONS.commandRelation
277     @defCommandConnectionPoint "8"
278
279 RELATIONS.sequence9 : RELATIONS.commandRelation
280     @defCommandConnectionPoint "9"
281
282 RELATIONS.sequence10 : RELATIONS.commandRelation
283     @defCommandConnectionPoint "10"
284
285 RELATIONS.broadcasted : RELATIONS.commandRelation
286     @defCommandConnectionPoint "1"
287
288 RELATIONS.eventIn : RELATIONS.commandExecutorRelation
289     @defCommandExecutorConnectionPoint
290
291 RELATIONS.eventOut : RELATIONS.commandRelation
292     @defCommandConnectionPoint "1"
293     
294 /*** Data connections ***/
295 DOC.Document.DataRelation <T STR.ConnectionRelation
296 DOC.Document.IsConnectedToData <R STR.IsConnectedTo : DOC.Document.DataRelation
297
298 DOC.DataStroke : G2D.Stroke
299     G2D.HasDashArray [1.0, 0.5] : L0.FloatArray
300     G2D.HasStrokeWidth 0.2 : L0.Float
301     G2D.HasLineCap G2D.LineCap.ButtCap
302     G2D.HasLineJoin G2D.LineJoin.MiterJoin
303
304 DOC.DataConnectionType : STR.ConnectionType
305     G2D.HasColor [0,0.65,1.0] : G2D.Color
306     G2D.HasStrokeType G2D.StrokeType.Scaling
307     G2D.HasStroke DOC.DataStroke
308     G2D.HasRounding 3.0
309     STR.HasConnectionConstraint
310         DOC.DataProviderToDataConsumerConstraint : DOC.RelationTypeConstraint
311             DOC.RelationTypeConstraint.Type1 RELATIONS.dataProviderRelation
312             DOC.RelationTypeConstraint.Type2 RELATIONS.dataConsumerRelation  
313         DOC.NoSelfConnectionConstraint
314             
315 defDataProviderConnectionPoint : L0.Template
316     @template %subject
317         %subject <R STR.IsConnectedTo
318
319 defDataConsumerConnectionPoint : L0.Template
320     @template %subject
321         %subject <R DOC.Document.IsConnectedToData
322             
323 RELATIONS.dataProviderRelation <T STR.ConnectionRelation
324     @L0.assert STR.AllowsConnectionType DOC.DataConnectionType
325     @L0.assert MOD.ConnectionRelationToTerminal DOC.Terminals.DataProviderTerminal
326     @L0.assert STR.HasAttachmentRelation DIA.HasPlainConnector
327                 
328 RELATIONS.dataConsumerRelation <T STR.ConnectionRelation
329     @L0.assert STR.AllowsConnectionType DOC.DataConnectionType
330     @L0.assert MOD.ConnectionRelationToTerminal DOC.Terminals.DataConsumerTerminal
331     @L0.assert STR.HasAttachmentRelation DIA.HasArrowConnector
332
333 RELATIONS.singleDataConsumerRelation <T L0.FunctionalRelation <T RELATIONS.dataConsumerRelation
334             
335 RELATIONS.dataIn : RELATIONS.singleDataConsumerRelation 
336     @defDataConsumerConnectionPoint
337
338 RELATIONS.arrayDataIn : RELATIONS.dataConsumerRelation 
339     @defDataConsumerConnectionPoint
340
341 RELATIONS.dataOut : RELATIONS.dataProviderRelation
342     @defDataProviderConnectionPoint
343     
344 RELATIONS.dataIn1 : RELATIONS.singleDataConsumerRelation 
345     @defDataConsumerConnectionPoint
346     
347 RELATIONS.dataIn2 : RELATIONS.singleDataConsumerRelation 
348     @defDataConsumerConnectionPoint
349
350 RELATIONS.dataIn3 : RELATIONS.singleDataConsumerRelation 
351     @defDataConsumerConnectionPoint
352     
353 RELATIONS.dataIn4 : RELATIONS.singleDataConsumerRelation 
354     @defDataConsumerConnectionPoint
355     
356 RELATIONS.dataIn5 : RELATIONS.singleDataConsumerRelation 
357     @defDataConsumerConnectionPoint
358     
359 RELATIONS.dataIn6 : RELATIONS.singleDataConsumerRelation 
360     @defDataConsumerConnectionPoint
361     
362 RELATIONS.dataIn7 : RELATIONS.singleDataConsumerRelation 
363     @defDataConsumerConnectionPoint
364     
365 RELATIONS.dataIn8 : RELATIONS.singleDataConsumerRelation 
366     @defDataConsumerConnectionPoint
367     
368 RELATIONS.dataIn9 : RELATIONS.singleDataConsumerRelation 
369     @defDataConsumerConnectionPoint
370     
371 RELATIONS.dataIn10 : RELATIONS.singleDataConsumerRelation 
372     @defDataConsumerConnectionPoint
373
374 /*** Data definition connections ***/
375 DOC.Document.DataDefinitionRelation <T STR.ConnectionRelation
376 DOC.Document.IsConnectedToDataDefinition <R STR.IsConnectedTo : DOC.Document.DataDefinitionRelation
377
378 DOC.DataDefinitionConnectionType : STR.ConnectionType
379     G2D.HasColor [0,0.65,1.0] : G2D.Color
380     G2D.HasStrokeType G2D.StrokeType.Scaling
381     G2D.HasStroke DOC.DataStroke
382     G2D.HasRounding 3.0
383     STR.HasConnectionConstraint
384         DOC.DataDefinitionToDataDefinitionConsumerConstraint : DOC.RelationTypeConstraint
385             DOC.RelationTypeConstraint.Type1 RELATIONS.dataDefinitionRelation
386             DOC.RelationTypeConstraint.Type2 RELATIONS.dataDefinitionConsumerRelation     
387         DOC.NoSelfConnectionConstraint 
388
389 defDataDefinitionConnectionPoint : L0.Template
390     @template %subject
391         %subject <R STR.IsConnectedTo
392
393 defDataDefinitionConsumerConnectionPoint : L0.Template
394     @template %subject
395         %subject <R DOC.Document.IsConnectedToDataDefinition
396             
397 RELATIONS.dataDefinitionRelation <T STR.ConnectionRelation
398     @L0.assert STR.AllowsConnectionType DOC.DataDefinitionConnectionType
399     @L0.assert MOD.ConnectionRelationToTerminal DOC.Terminals.DataProviderTerminal
400     @L0.assert STR.HasAttachmentRelation DIA.HasPlainConnector
401
402 RELATIONS.singleDataDefinitionRelation <T RELATIONS.dataDefinitionRelation <T L0.FunctionalRelation
403
404 RELATIONS.dataDefinitionConsumerRelation <T STR.ConnectionRelation
405     @L0.assert STR.AllowsConnectionType DOC.DataDefinitionConnectionType
406     @L0.assert MOD.ConnectionRelationToTerminal DOC.Terminals.DataConsumerTerminal
407     @L0.assert STR.HasAttachmentRelation DIA.HasArrowConnector               
408             
409 RELATIONS.data1 : RELATIONS.dataDefinitionConsumerRelation
410     @defDataDefinitionConsumerConnectionPoint
411
412 RELATIONS.data2 : RELATIONS.dataDefinitionConsumerRelation : L0.FunctionalRelation
413     @defDataDefinitionConsumerConnectionPoint
414     
415 RELATIONS.data3 : RELATIONS.dataDefinitionConsumerRelation : L0.FunctionalRelation
416     @defDataDefinitionConsumerConnectionPoint
417     
418 RELATIONS.data4 : RELATIONS.dataDefinitionConsumerRelation : L0.FunctionalRelation
419     @defDataDefinitionConsumerConnectionPoint
420
421 RELATIONS.data5 : RELATIONS.dataDefinitionConsumerRelation : L0.FunctionalRelation
422     @defDataDefinitionConsumerConnectionPoint
423
424 RELATIONS.data6 : RELATIONS.dataDefinitionConsumerRelation : L0.FunctionalRelation
425     @defDataDefinitionConsumerConnectionPoint
426
427 RELATIONS.data7 : RELATIONS.dataDefinitionConsumerRelation : L0.FunctionalRelation
428     @defDataDefinitionConsumerConnectionPoint
429
430 RELATIONS.data8 : RELATIONS.dataDefinitionConsumerRelation : L0.FunctionalRelation
431     @defDataDefinitionConsumerConnectionPoint
432
433 RELATIONS.data9 : RELATIONS.dataDefinitionConsumerRelation : L0.FunctionalRelation
434     @defDataDefinitionConsumerConnectionPoint
435
436 RELATIONS.data10 : RELATIONS.dataDefinitionConsumerRelation : L0.FunctionalRelation
437     @defDataDefinitionConsumerConnectionPoint
438
439 RELATIONS.dataDefinition : RELATIONS.dataDefinitionRelation
440     @defDataDefinitionConnectionPoint
441