]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.base.ontology/graph/Elements.pgraph
Dynamic terminals and connections
[simantics/platform.git] / bundles / org.simantics.document.base.ontology / graph / Elements.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 STR = <http://www.simantics.org/Structural-1.2>
3 DIA = <http://www.simantics.org/Diagram-2.2>
4 G2D = <http://www.simantics.org/G2D-1.1>
5 MOD = <http://www.simantics.org/Modeling-1.2>
6 DOC = <http://www.simantics.org/Documentation-1.2>
7 IMAGE = <http://www.simantics.org/Image2-1.2>
8 RELATIONS = <http://www.simantics.org/Documentation-1.2/Relations>
9 FUNCTIONS = <http://www.simantics.org/Documentation-1.2/Functions>
10 COMPONENTS = <http://www.simantics.org/Documentation-1.2/Components>
11
12
13 /*** DIAGRAM ***/
14 DOC.DocumentDiagram <T DIA.Diagram
15     @L0.assert STR.HasModelingRules DOC.DiagramModelingRules
16     @L0.assert DIA.HasGridSize 1.0
17     @L0.assert DIA.HasPageDescription
18       DOC.A3 : DIA.PageDescription
19         DIA.PageDescription.Size [297.0,420.0]
20         DIA.PageDescription.Orientation DIA.Orientation.Portrait
21         DIA.PageDescription.Margins _ : DIA.Margins
22           DIA.PageDescription.Margins.Bottom 12.0
23           DIA.PageDescription.Margins.Top 12.0
24           DIA.PageDescription.Margins.Left 12.0
25           DIA.PageDescription.Margins.Right 12.0
26
27 DOC.DiagramModelingRules : MOD.MappedModelingRules
28     MOD.HasBaseRules STR.StandardModelingRules            
29                
30
31 /*** Relations ***/ 
32 DOC.DiagramRelations : L0.Library
33
34 DIAGRAMRELATIONS = DOC.DiagramRelations
35
36 terminalRelation : L0.Template
37     @template %subject %target
38         %subject <R STR.IsConnectedTo
39             MOD.DiagramConnectionRelationToConnectionRelation %target
40
41 DIAGRAMRELATIONS.ParentRelation
42     @terminalRelation RELATIONS.parent
43
44 DIAGRAMRELATIONS.Child1
45     @terminalRelation RELATIONS.part1
46     
47 DIAGRAMRELATIONS.Child2
48     @terminalRelation RELATIONS.part2
49     
50 DIAGRAMRELATIONS.Child3
51     @terminalRelation RELATIONS.part3        
52
53 DIAGRAMRELATIONS.Child4
54     @terminalRelation RELATIONS.part4
55     
56 DIAGRAMRELATIONS.Child5
57     @terminalRelation RELATIONS.part5
58     
59 DIAGRAMRELATIONS.Child6
60     @terminalRelation RELATIONS.part6
61     
62 DIAGRAMRELATIONS.Child7
63     @terminalRelation RELATIONS.part7
64     
65 DIAGRAMRELATIONS.Child8
66     @terminalRelation RELATIONS.part8
67     
68 DIAGRAMRELATIONS.Child9
69     @terminalRelation RELATIONS.part9
70     
71 DIAGRAMRELATIONS.Child10
72     @terminalRelation RELATIONS.part10
73
74 DIAGRAMRELATIONS.Child11
75     @terminalRelation RELATIONS.part11
76
77 DIAGRAMRELATIONS.Child12
78     @terminalRelation RELATIONS.part12
79
80 DIAGRAMRELATIONS.Child13
81     @terminalRelation RELATIONS.part13
82
83 DIAGRAMRELATIONS.Child14
84     @terminalRelation RELATIONS.part14
85
86 DIAGRAMRELATIONS.Child15
87     @terminalRelation RELATIONS.part15
88
89 DIAGRAMRELATIONS.Child16
90     @terminalRelation RELATIONS.part16
91
92 DIAGRAMRELATIONS.Child17
93     @terminalRelation RELATIONS.part17
94
95 DIAGRAMRELATIONS.Child18
96     @terminalRelation RELATIONS.part18
97
98 DIAGRAMRELATIONS.Child19
99     @terminalRelation RELATIONS.part19
100
101 DIAGRAMRELATIONS.Child20
102     @terminalRelation RELATIONS.part20
103     
104 DIAGRAMRELATIONS.Child21
105     @terminalRelation RELATIONS.part21
106
107 DIAGRAMRELATIONS.Child22
108     @terminalRelation RELATIONS.part22
109
110 DIAGRAMRELATIONS.Child23
111     @terminalRelation RELATIONS.part23
112
113 DIAGRAMRELATIONS.Child24
114     @terminalRelation RELATIONS.part24
115
116 DIAGRAMRELATIONS.Child25
117     @terminalRelation RELATIONS.part25
118
119 DIAGRAMRELATIONS.Child26
120     @terminalRelation RELATIONS.part26
121
122 DIAGRAMRELATIONS.Child27
123     @terminalRelation RELATIONS.part27
124
125 DIAGRAMRELATIONS.Child28
126     @terminalRelation RELATIONS.part28
127
128 DIAGRAMRELATIONS.Child29
129     @terminalRelation RELATIONS.part29
130
131 DIAGRAMRELATIONS.Child30
132     @terminalRelation RELATIONS.part30
133
134 DIAGRAMRELATIONS.ChildN
135     @terminalRelation RELATIONS.partN
136
137 DIAGRAMRELATIONS.click
138     @terminalRelation RELATIONS.click    
139
140 DIAGRAMRELATIONS.edit
141     @terminalRelation RELATIONS.edit    
142
143 DIAGRAMRELATIONS.load
144     @terminalRelation RELATIONS.load    
145     
146 DIAGRAMRELATIONS.select
147     @terminalRelation RELATIONS.select    
148
149 DIAGRAMRELATIONS.valueChanged
150     @terminalRelation RELATIONS.valueChanged    
151     
152 DIAGRAMRELATIONS.trigger
153     @terminalRelation RELATIONS.trigger    
154
155 DIAGRAMRELATIONS.triggerTrue
156     @terminalRelation RELATIONS.triggerTrue    
157     
158 DIAGRAMRELATIONS.triggerFalse
159     @terminalRelation RELATIONS.triggerFalse    
160         
161 DIAGRAMRELATIONS.open
162     @terminalRelation RELATIONS.open     
163         
164 DIAGRAMRELATIONS.close
165     @terminalRelation RELATIONS.close 
166
167 DIAGRAMRELATIONS.closed
168     @terminalRelation RELATIONS.closed 
169     
170 DIAGRAMRELATIONS.uploaded
171     @terminalRelation RELATIONS.uploaded   
172         
173 DIAGRAMRELATIONS.submit
174     @terminalRelation RELATIONS.submit
175     
176 DIAGRAMRELATIONS.enter
177     @terminalRelation RELATIONS.enter
178     
179 DIAGRAMRELATIONS.data1
180     @terminalRelation RELATIONS.data1
181     
182 DIAGRAMRELATIONS.data2
183     @terminalRelation RELATIONS.data2
184     
185 DIAGRAMRELATIONS.data3
186     @terminalRelation RELATIONS.data3        
187
188 DIAGRAMRELATIONS.data4
189     @terminalRelation RELATIONS.data4
190     
191 DIAGRAMRELATIONS.data5
192     @terminalRelation RELATIONS.data5
193     
194 DIAGRAMRELATIONS.data6
195     @terminalRelation RELATIONS.data6
196     
197 DIAGRAMRELATIONS.data7
198     @terminalRelation RELATIONS.data7
199     
200 DIAGRAMRELATIONS.data8
201     @terminalRelation RELATIONS.data8
202     
203 DIAGRAMRELATIONS.data9
204     @terminalRelation RELATIONS.data9
205     
206 DIAGRAMRELATIONS.data10
207     @terminalRelation RELATIONS.data10
208     
209 DIAGRAMRELATIONS.dataOut
210     @terminalRelation RELATIONS.dataOut
211
212 DIAGRAMRELATIONS.dataIn
213     @terminalRelation RELATIONS.dataIn
214     
215 DIAGRAMRELATIONS.arrayDataIn
216     @terminalRelation RELATIONS.arrayDataIn
217     
218 DIAGRAMRELATIONS.dataIn1
219     @terminalRelation RELATIONS.dataIn1
220     
221 DIAGRAMRELATIONS.dataIn2
222     @terminalRelation RELATIONS.dataIn2
223     
224 DIAGRAMRELATIONS.dataIn3
225     @terminalRelation RELATIONS.dataIn3        
226
227 DIAGRAMRELATIONS.dataIn4
228     @terminalRelation RELATIONS.dataIn4
229     
230 DIAGRAMRELATIONS.dataIn5
231     @terminalRelation RELATIONS.dataIn5
232     
233 DIAGRAMRELATIONS.dataIn6
234     @terminalRelation RELATIONS.dataIn6
235     
236 DIAGRAMRELATIONS.dataIn7
237     @terminalRelation RELATIONS.dataIn7
238     
239 DIAGRAMRELATIONS.dataIn8
240     @terminalRelation RELATIONS.dataIn8
241     
242 DIAGRAMRELATIONS.dataIn9
243     @terminalRelation RELATIONS.dataIn9
244     
245 DIAGRAMRELATIONS.dataIn10
246     @terminalRelation RELATIONS.dataIn10
247     
248 DIAGRAMRELATIONS.dataDefinition
249     @terminalRelation RELATIONS.dataDefinition        
250     
251 DIAGRAMRELATIONS.event
252     @terminalRelation RELATIONS.event    
253     
254     
255 DIAGRAMRELATIONS.sequenceTrigger
256     @terminalRelation RELATIONS.sequenceTrigger  
257         
258 DIAGRAMRELATIONS.sequence1
259     @terminalRelation RELATIONS.sequence1
260     
261 DIAGRAMRELATIONS.sequence2
262     @terminalRelation RELATIONS.sequence2
263     
264 DIAGRAMRELATIONS.sequence3
265     @terminalRelation RELATIONS.sequence3        
266
267 DIAGRAMRELATIONS.sequence4
268     @terminalRelation RELATIONS.sequence4
269     
270 DIAGRAMRELATIONS.sequence5
271     @terminalRelation RELATIONS.sequence5
272     
273 DIAGRAMRELATIONS.sequence6
274     @terminalRelation RELATIONS.sequence6
275     
276 DIAGRAMRELATIONS.sequence7
277     @terminalRelation RELATIONS.sequence7
278     
279 DIAGRAMRELATIONS.sequence8
280     @terminalRelation RELATIONS.sequence8
281     
282 DIAGRAMRELATIONS.sequence9
283     @terminalRelation RELATIONS.sequence9
284     
285 DIAGRAMRELATIONS.sequence10
286     @terminalRelation RELATIONS.sequence10
287     
288 DIAGRAMRELATIONS.broadcast
289     @terminalRelation RELATIONS.broadcast
290       
291 DIAGRAMRELATIONS.broadcasted
292     @terminalRelation RELATIONS.broadcasted
293
294 DIAGRAMRELATIONS.eventIn
295     @terminalRelation RELATIONS.eventIn  
296         
297 DIAGRAMRELATIONS.eventOut
298     @terminalRelation RELATIONS.eventOut
299             
300 /*** Terminals ***/
301 TERMINALS = DOC.Terminals : L0.Library 
302
303 TERMINALS.ParentTerminal /* @ "Connection point to parent" */ <T DIA.DefinedElement <T DIA.Terminal
304     STR.IsDefinedBy _ : DIA.Composite
305         @L0.orderedSet
306             _ : DIA.SVGElement
307                 G2D.HasSVGDocument """<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" overflow="visible" version="1.1"><g transform="translate(-0.0,-0.0)"><rect x="-0.5" y="-0.5" width="1.0" height="1.0" fill="rgb(0,163,204)" stroke="black" stroke-width="0.1"/></g></svg>""" : L0.String
308                 
309                 
310 TERMINALS.ChildTerminal /* @ "Connection point to a child element" */ <T DIA.DefinedElement <T DIA.Terminal
311     STR.IsDefinedBy _ : DIA.Composite
312         @L0.orderedSet
313             _ : DIA.SVGElement
314                 G2D.HasSVGDocument """<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" overflow="visible" version="1.1"><g transform="translate(-0.0,-0.0)"><ellipse cx="0.0" cy="0.0" rx="0.5" ry="0.5" fill="rgb(0,163,204)" stroke="black" stroke-width="0.1"/></g></svg>""" : L0.String
315
316 TERMINALS.TargetedDynamicTerminal /* @ "Connection point to a child element" */ <T DIA.DefinedElement <T DIA.Terminal
317     STR.IsDefinedBy _ : DIA.Composite
318         @L0.orderedSet
319             _ : DIA.SVGElement
320                 G2D.HasSVGDocument """<svg display="none"><g display="none"></g></svg>""" : L0.String
321
322 TERMINALS.CommandTerminal /* @ "Command termina" */ <T DIA.DefinedElement <T DIA.Terminal
323     STR.IsDefinedBy _ : DIA.Composite
324         @L0.orderedSet
325             _ : DIA.SVGElement
326                 G2D.HasSVGDocument """<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" overflow="visible" version="1.1"><g transform="translate(-0.0,-0.0)"><rect x="-0.5" y="-0.5" width="1.0" height="1.0" fill="rgb(255,0,255)" stroke="black" stroke-width="0.1"/></g></svg>""" : L0.String
327                 
328 TERMINALS.CommandExecutorTerminal /* @ "Command executor terminal" */ <T DIA.DefinedElement <T DIA.Terminal
329     STR.IsDefinedBy _ : DIA.Composite
330         @L0.orderedSet
331             _ : DIA.SVGElement
332                 G2D.HasSVGDocument """<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" overflow="visible" version="1.1"><g transform="translate(-0.0,-0.0)"><ellipse cx="0.0" cy="0.0" rx="0.5" ry="0.5" fill="rgb(255,0,255)" stroke="black" stroke-width="0.1"/></g></svg>""" : L0.String
333
334 TERMINALS.BroadcastTerminal /* @ "Command broadcast terminal" */ <T DIA.DefinedElement <T DIA.Terminal
335     STR.IsDefinedBy _ : DIA.Composite
336         @L0.orderedSet
337             _ : DIA.SVGElement
338                 G2D.HasSVGDocument """<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" overflow="visible" version="1.1"><g transform="translate(-0.0,-0.0)"><ellipse cx="0.0" cy="0.0" rx="0.5" ry="0.5" fill="rgb(215,0,215)" stroke="black" stroke-width="0.1"/></g></svg>""" : L0.String
339                 
340 TERMINALS.BroadcastedTerminal /* @ "Command broadcasted terminal" */ <T DIA.DefinedElement <T DIA.Terminal
341     STR.IsDefinedBy _ : DIA.Composite
342         @L0.orderedSet
343             _ : DIA.SVGElement
344                 G2D.HasSVGDocument """<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" overflow="visible" version="1.1"><g transform="translate(-0.0,-0.0)"><rect x="-0.5" y="-0.5" width="1.0" height="1.0" fill="rgb(215,0,215)" stroke="black" stroke-width="0.1"/></g></svg>""" : L0.String
345
346 TERMINALS.DataConsumerTerminal /* @ "Data consumer, using data from a provider" */ <T DIA.DefinedElement <T DIA.Terminal
347     STR.IsDefinedBy _ : DIA.Composite
348         @L0.orderedSet
349             _ : DIA.SVGElement
350                 G2D.HasSVGDocument """<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" overflow="visible" version="1.1"><g transform="translate(-0.0,-0.0)"><ellipse cx="0.0" cy="0.0" rx="0.5" ry="0.5" fill="rgb(255,166,0)" stroke="black" stroke-width="0.1"/></g></svg>""" : L0.String
351                 
352 TERMINALS.DataProviderTerminal /* @ "Provides data to a consumer" */ <T DIA.DefinedElement <T DIA.Terminal
353     STR.IsDefinedBy _ : DIA.Composite
354         @L0.orderedSet
355             _ : DIA.SVGElement
356                 G2D.HasSVGDocument """<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" overflow="visible" version="1.1"><g transform="translate(-0.0,-0.0)"><ellipse cx="0.0" cy="0.0" rx="0.5" ry="0.5" fill="rgb(255,166,0)" stroke="black" stroke-width="0.1"/></g></svg>""" : L0.String
357
358