]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram.ontology/graph/Diagram.pgraph
Merge "Improvements to styling of connection lines"
[simantics/platform.git] / bundles / org.simantics.diagram.ontology / graph / Diagram.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 L0X = <http://www.simantics.org/Layer0X-1.1>
3 G2D = <http://www.simantics.org/G2D-1.1>
4 STR = <http://www.simantics.org/Structural-1.2>
5 DATA = <http://www.simantics.org/Datatypes-1.1>
6 SEL = <http://www.simantics.org/SelectionView-1.2>
7
8 DIA = <http://www.simantics.org/Diagram-2.2> : L0.Ontology
9     @L0.new
10     L0.HasResourceClass "org.simantics.diagram.stubs.DiagramResource"
11
12 DIA.SCLMain : L0.SCLModule
13     L0.SCLModule.definition """
14         include "Simantics/Diagram/Internal/DiagramOntologyEntryPoint"
15         """
16
17 //// Import / Export
18
19 DIA.DiagramSubgraphExtent : L0X.SubgraphExtent
20
21 //// Objects and types
22
23 DIA.ElementClass <T STR.ComponentType
24     L0.HasDescription """Abstract element that has a position on diagram"""
25     @L0.tag L0.Abstract
26     //TODO [STR.IsDefinedBy all Element]
27
28 DIA.Element <T STR.Component : DIA.ElementClass
29     @L0.property L0.HasNext
30     @L0.property L0.HasPrevious
31     @L0.tag L0.Abstract 
32     >-- DIA.HasTransform
33     @L0.assert DIA.HasDynamicTransform
34         DIA.Functions.modelledTransform : L0.Function
35     @L0.assert DIA.Element.profileMonitorOffset
36         (0.0,0.0) : DATA.Vec2d
37     @L0.assert DIA.Element.profileMonitorSpacing 0.0
38     @L0.assert DIA.Element.hideProfileMonitors false
39     @L0.assert DIA.Element.upProfileMonitors true
40     >-- DIA.Element.profileMonitorOffset --> DATA.Vec2d <R L0.HasProperty : L0.FunctionalRelation  : SEL.GenericParameterType
41       L0.HasLabel "Profile Monitor Offset"
42       SEL.HasDisplayValue ""
43     >-- DIA.Element.profileMonitorSpacing --> L0.Double <R L0.HasProperty : L0.FunctionalRelation  : SEL.GenericParameterType
44       L0.HasLabel "Profile Monitor Spacing"
45     >-- DIA.Element.hideProfileMonitors --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation  : SEL.GenericParameterType
46       L0.HasLabel "Hide Profile Monitors?"
47     >-- DIA.Element.upProfileMonitors --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
48       L0.HasLabel "Grow Profile Monitors Upward?"
49     
50 DIA.symbolFunction <R L0.HasProperty : L0.FunctionalRelation
51
52 DIA.DiagramContainer <T L0.Entity
53     @L0.singleProperty L0.HasName
54     @L0.property L0.ConsistsOf
55
56 DIA.Composite <T STR.OrderedComposite <T DIA.Element
57     L0.HasDescription """A diagram composite is z-ordered. First elements in the list are drawn first."""
58     //TODO [L0.OrderedSetElements all Element]
59
60 DIA.IOTableRename <T L0.Entity
61     >-- DIA.IOTableRename.From --> L0.String <R L0.HasProperty : L0.FunctionalRelation
62     >-- DIA.IOTableRename.To --> L0.String <R L0.HasProperty : L0.FunctionalRelation
63     @L0.assert DIA.IOTableRename.From
64         "" : L0.String
65     @L0.assert DIA.IOTableRename.To
66         "" : L0.String
67
68 DIA.Diagram <T DIA.Composite
69     >-- DIA.Diagram.IOTableRenaming --> DIA.IOTableRename <T L0.DependsOn 
70     @L0.optionalProperty DIA.HasModCount
71     @L0.assert DIA.ConnectionCrossingStyle ""
72     @L0.assert DIA.ConnectionCrossingStyle.Width 0.0
73     @L0.assert DIA.ConnectionCrossingStyle.HasType DIA.ConnectionCrossingStyle.Type.None
74
75 DIA.HasModCount <R L0.HasProperty : L0.FunctionalRelation
76     L0.HasLabel "Modification Counter"
77     L0.HasDescription "A counter for modifications performed on the property owner resource. Used for naming elements with running number IDs."
78     L0.HasDomain DIA.Composite
79     L0.HasRange L0.Long
80
81 DIA.Terminal <T DIA.Element
82     @L0.singleProperty DIA.HasConnectionPoint
83     @L0.tag L0.Abstract
84     >-- DIA.Terminal.AllowedDirections --> L0.Integer <R L0.HasProperty : L0.FunctionalRelation
85         L0.HasDescription """Used to describe allowed terminal exit/enter directions for incoming/outgoing connections.
86 The integer value is a bit mask with the following meanings:
87 bit  meaning
88 0    right (1,0)
89 1    down  (0,1)
90 2    left  (-1,0)
91 3    up    (0,-1)
92 """
93
94 DIA.DefinedElement <T DIA.Element
95     @L0.tag L0.Abstract
96     @L0.singleProperty STR.IsDefinedBy
97
98 DIA.HasTransform <R G2D.HasTransform   : SEL.GenericParameterType
99     L0.HasLabel "Transform"
100     L0.InverseOf DIA.IsTransformOf
101     L0.HasDomain DIA.Element
102     L0.HasRange G2D.Transform
103     L0.HasRange L0.DoubleArray
104     ==> "Vector Double"
105     SEL.HasDisplayValue ""
106
107 DIA.HasDynamicTransform <R L0.HasProperty : L0.FunctionalRelation
108     L0.HasDomain DIA.Element
109     L0.HasRange L0.Value
110
111 DIA.HasConnectionPoint <R L0.DependsOn
112     L0.HasDomain DIA.Element
113     L0.HasRange STR.ConnectionRelation
114
115 DIA.Functions : L0.Library
116
117 DIA.Functions.availableProfiles : L0.Function
118     L0.HasValueType "[(String, Resource)]"
119 DIA.Functions.selectedProfile : L0.Function
120     L0.HasValueType "String"
121 DIA.Functions.activeProfileModifier : L0.Function
122     L0.HasValueType "String -> String"
123 DIA.Functions.diagramElementIssuePath : L0.Function
124
125 DIA.DefinedElement.Parameter <T L0.PropertyRelation <T L0.FunctionalRelation
126
127 DIA.DefinedElement
128   // RequiresValueType ]is omitted during transition period.
129   // Used to be ==> "[String]" but DIA.symbolCode now returns either "[String]" or "[G2DNodeModification]" directly
130   >-- DIA.symbolCode <R L0.HasProperty : L0.FunctionalRelation
131   >-- DIA.symbolDropHandler ==> "[WorkbenchSelectionElement] -> <WriteGraph,Proc> ()" <R L0.HasProperty : L0.FunctionalRelation
132   // Parameters are id of edited element and new text.
133   >-- DIA.DefinedElement.textEditor ==> "SVGMeasurementContext -> String -> String -> <Proc> ()" <R L0.HasProperty : DIA.DefinedElement.Parameter
134   // This function gives initial text for the text editor. Parameter is the id of the edited element.
135   >-- DIA.DefinedElement.textEditorFullText ==> "String -> <Proc> String" <R L0.HasProperty : DIA.DefinedElement.Parameter 
136
137 DIA.DiagramActivityCondition <T L0.Entity
138   --> DIA.DiagramActivityCondition.test ==> "Resource -> <ReadGraph> String" <R L0.HasProperty : L0.FunctionalRelation 
139
140 DIA.diagramActivityCondition : L0.Template
141     @template %subject %expression
142         %subject : DIA.DiagramActivityCondition
143             DIA.DiagramActivityCondition.test _ : STR.SCLValue
144                 L0.SCLValue.expression %expression
145                 L0.HasValueType "Resource -> <ReadGraph> String"
146
147 DIA.ProfileEntryContribution <T L0.Entity
148   --> DIA.ProfileEntryContribution.HasEntry --> DIA.ProfileEntry <R L0.IsRelatedTo  
149
150 DIA.ConnectionCrossingStyle <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
151     L0.HasLabel "Connection Crossing Style"
152     SEL.HasDisplayValue ""
153     L0.readOnly true
154     SEL.canBeLifted false
155
156 DIA.ConnectionCrossingStyle.Width <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
157     L0.HasLabel "Width"
158     L0.HasDescription "Width of connection crossings."
159     L0.HasDomain DIA.Diagram
160     L0.HasRange L0.Double
161     SEL.IsShownUnder DIA.ConnectionCrossingStyle
162
163 DIA.ConnectionCrossingStyle.HasType <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
164     L0.HasLabel "Type"
165     L0.HasDescription "Type of connection crossings."
166     L0.HasDomain DIA.Diagram
167     L0.HasRange DIA.ConnectionCrossingStyle.Type
168     SEL.IsShownUnder DIA.ConnectionCrossingStyle
169
170 DIA.ConnectionCrossingStyle.Type <T L0.Value
171     @L0.tag L0.Enumeration
172
173 DIA.ConnectionCrossingStyle.Type.Arc : DIA.ConnectionCrossingStyle.Type
174 DIA.ConnectionCrossingStyle.Type.Square : DIA.ConnectionCrossingStyle.Type
175 DIA.ConnectionCrossingStyle.Type.Gap : DIA.ConnectionCrossingStyle.Type
176 DIA.ConnectionCrossingStyle.Type.None : DIA.ConnectionCrossingStyle.Type
177
178 DIA.ConnectionStyle <T L0.Entity
179 DIA.ConnectionLineStyle <T L0.Entity
180
181 DIA.HasConnectionStyle <R L0.IsRelatedTo : L0.FunctionalRelation
182     L0.HasRange DIA.ConnectionStyle