]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram.ontology/graph/DiagramElements.pgraph
7fb684aefb49b564b31f8436d901e6338c573019
[simantics/platform.git] / bundles / org.simantics.diagram.ontology / graph / DiagramElements.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 DIA = <http://www.simantics.org/Diagram-2.2>
5
6 // SHAPE ELEMENT (NOT USED, DEPRECATE?)
7
8 DIA.Shape <T DIA.Element <T G2D.Shape
9
10 //// RASTER ELEMENT
11
12 DIA.RasterElement <T DIA.Element
13     @L0.singleProperty G2D.HasSVGDocument
14
15 //// SVG ELEMENT
16
17 DIA.SVGElement <T DIA.Element
18     @L0.singleProperty G2D.HasSVGDocument
19       // Parameters are id of edited element and new text.
20     >-- DIA.SVGElement.enableEditing ==> "Boolean" <R L0.HasProperty : DIA.DefinedElement.Parameter
21
22 //// ANIMATED SVG ELEMENT
23
24 DIA.AnimatedSVGElement <T DIA.Element
25     @L0.singleProperty G2D.HasSVGDocument
26     @L0.singleProperty G2D.HasSVGScript
27
28 //// TEXT ELEMENT
29
30 DIA.TextElement <T DIA.Element <T DIA.ColorProvider <T DIA.FontProvider
31     @L0.singleProperty DIA.HasText
32     @L0.optionalProperty DIA.FixedWidth
33     @L0.optionalProperty DIA.TextFieldName
34     @L0.singleProperty G2D.HasHorizontalAlignment
35     @L0.singleProperty G2D.HasVerticalAlignment
36     @L0.singleProperty G2D.HasStrokeWidth
37     @L0.assert DIA.TextFieldName ""
38     @L0.assert G2D.HasHorizontalAlignment G2D.Alignment.Leading
39     @L0.assert G2D.HasVerticalAlignment G2D.Alignment.Baseline
40     @L0.assert G2D.HasStrokeWidth
41         0 : L0.Float
42
43 DIA.HasText <R L0.HasProperty : L0.FunctionalRelation
44     L0.HasLabel "Text"
45     --> L0.String
46 DIA.FixedWidth <R L0.HasProperty : L0.FunctionalRelation
47     L0.HasLabel "Fixed Width"
48     --> L0.Double
49 DIA.TextFieldName <R L0.HasProperty : L0.FunctionalRelation 
50     L0.HasLabel "Text Field Name"
51     L0.HasDescription "A name used for identifying fields in PDF outputs."
52     --> L0.String
53
54 //// LINK
55
56 DIA.Link <T DIA.SVGElement
57     L0.HasDescription "Links are used on diagrams for navigating to other diagrams."
58
59 DIA.HasLinkTarget <R L0.IsRelatedTo
60     L0.HasDomain DIA.Link
61
62 DIA.UpwardLink <T DIA.SVGElement
63     L0.HasDescription "This link navigates upward the structural path."
64
65 //// MONITOR
66
67 DIA.Monitor <T DIA.Element
68     L0.HasDescription "Monitors display data from various sources e.g. model configuration or simulation state."
69     >-- DIA.Monitor.gain --> L0.Double <R L0.HasProperty : L0.FunctionalRelation
70         L0.HasLabel "Gain"
71     >-- DIA.Monitor.bias --> L0.Double <R L0.HasProperty : L0.FunctionalRelation
72         L0.HasLabel "Bias"
73     @L0.optionalProperty L0.HasLabel
74     @L0.optionalProperty DIA.HasDirection
75     @L0.optionalProperty DIA.HasFormat
76     @L0.optionalProperty G2D.HasHorizontalAlignment
77     @L0.optionalProperty G2D.HasVerticalAlignment
78     @L0.optionalProperty G2D.HasFont
79     @L0.optionalProperty G2D.HasBounds
80     @L0.optionalProperty DIA.HasMonitorComponent
81     @L0.optionalProperty DIA.HasMonitorSuffix
82     @L0.optionalProperty DIA.TextFieldName
83     // Enable to show these properties to users once MonitorClassFactory2 gets support for gain/bias.
84     //@L0.assert DIA.Monitor.gain 1.0
85     //@L0.assert DIA.Monitor.bias 0.0
86     L0.Asserts _ : L0.Assertion
87       L0.HasPredicate DIA.HasFont
88       L0.HasObject _ : DIA.ObtainedFont
89     L0.Asserts _ : L0.Assertion
90       L0.HasPredicate DIA.HasColor
91       L0.HasObject _ : DIA.ObtainedColor
92     L0.Asserts _ : L0.Assertion
93       L0.HasPredicate DIA.HasFormatter
94       L0.HasObject _ : DIA.ObtainedFormatter
95     L0.Asserts _ : L0.Assertion
96       L0.HasPredicate L0X.HasExpression
97       L0.HasObject _ : DIA.ObtainedMonitorExpression
98     @L0.assert DIA.TextFieldName ""
99     @L0.assert DIA.FixedWidth 0.0
100     @L0.assert G2D.HasHorizontalAlignment G2D.Alignment.Center
101     @L0.assert G2D.HasVerticalAlignment G2D.Alignment.Center
102
103 DIA.HasDirection <R L0.HasProperty
104     L0.HasLabel "Direction"
105     L0.HasDescription "An angular direction in degrees"
106     --> L0.Double
107
108 DIA.SymbolMonitor <T DIA.Element
109     L0.HasDescription "Symbol monitors are embedded configurable monitors in symbols."
110
111 DIA.HasMonitorComponent <R L0.IsWeaklyRelatedTo
112     <-- DIA.Monitor 
113     L0.InverseOf DIA.HasMonitorComponent.Inverse <R L0.IsWeaklyRelatedTo
114         --> DIA.Monitor 
115 DIA.HasMonitorSuffix <R L0.HasProperty
116     --> L0.String
117
118 //// TREND
119
120 DIA.Trend <T DIA.Element
121     L0.HasDescription "Trends display data from various sources e.g. model configuration or simulation state."
122     @L0.optionalProperty L0.HasLabel
123
124 DIA.HasTrendTitle <R L0.HasProperty : L0.FunctionalRelation
125     L0.HasLabel "Title"
126     --> L0.String
127 DIA.HasXAxisLabel <R L0.HasProperty : L0.FunctionalRelation
128     L0.HasLabel "X-Axis Label"
129     --> L0.String
130 DIA.HasYAxisLabel <R L0.HasProperty : L0.FunctionalRelation
131     L0.HasLabel "Y-Axis Label"
132     --> L0.String
133
134 //// SLIDER
135
136 DIA.Slider <T DIA.Element <T DIA.ColorProvider <T DIA.FontProvider <T DIA.FormatProvider
137     L0.HasDescription "Sliders can be used to alter input value."
138     @L0.optionalProperty L0.HasLabel
139     @L0.optionalProperty DIA.HasDirection
140     @L0.optionalProperty DIA.HasFormat
141     @L0.optionalProperty G2D.HasBounds
142
143 DIA.HasSliderComponent <R L0.IsRelatedTo
144 DIA.HasSliderSuffix <R L0.HasProperty : L0.FunctionalRelation
145     L0.HasLabel "Suffix" : L0.String
146     --> L0.String
147 DIA.HasSliderMinValue <R L0.HasProperty : L0.FunctionalRelation
148     L0.HasLabel "Min Value" : L0.String
149     --> L0.Double
150 DIA.HasSliderMaxValue <R L0.HasProperty : L0.FunctionalRelation
151     L0.HasLabel "Max Value" : L0.String
152     --> L0.Double
153 DIA.HasSliderMajorTickSpacing <R L0.HasProperty : L0.FunctionalRelation
154     L0.HasLabel "Major Tick Spacing" : L0.String
155     --> L0.Integer
156 DIA.HasSliderMinorTickSpacing <R L0.HasProperty : L0.FunctionalRelation
157     L0.HasLabel "Minor Tick Spacing" : L0.String
158     --> L0.Integer
159 DIA.SliderPaintLabels <R L0.HasProperty : L0.FunctionalRelation
160     L0.HasLabel "Paint Labels" : L0.String
161     --> L0.Boolean
162 DIA.SliderPaintTicks <R L0.HasProperty : L0.FunctionalRelation
163     L0.HasLabel "Paint Ticks" : L0.String
164     --> L0.Boolean
165 DIA.SliderSnapToTicks <R L0.HasProperty : L0.FunctionalRelation
166     L0.HasLabel "Snap To Ticks" : L0.String
167     --> L0.Boolean
168 DIA.SliderPaintTrack <R L0.HasProperty : L0.FunctionalRelation
169     L0.HasLabel "Paint Track" : L0.String
170     --> L0.Boolean
171 DIA.SliderInverted <R L0.HasProperty : L0.FunctionalRelation
172     L0.HasLabel "Inverted" : L0.String
173     --> L0.Boolean
174 DIA.HasSliderValueExtent <R L0.HasProperty : L0.FunctionalRelation
175     L0.HasLabel "Value Extent" : L0.String
176     --> L0.Integer