]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.network.ontology/graph/DistrictNetworkDiagramSettings.pgraph
2e259ef7bee17e801e45266cd05cb0fc46f3a0f9
[simantics/district.git] / org.simantics.district.network.ontology / graph / DistrictNetworkDiagramSettings.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 L0X = <http://www.simantics.org/Layer0X-1.1>
3 DIA = <http://www.simantics.org/Diagram-2.2>
4 STR = <http://www.simantics.org/Structural-1.2>
5 MOD = <http://www.simantics.org/Modeling-1.2>
6 VP = <http://www.simantics.org/Viewpoint-1.2>
7 IMAGE = <http://www.simantics.org/Image2-1.2>
8 SEL = <http://www.simantics.org/SelectionView-1.2>
9 SEL_UI = <http://www.simantics.org/SelectionViewUI-1.1>
10 G2D = <http://www.simantics.org/G2D-1.1>
11 DN = <http://www.simantics.org/DistrictNetwork-1.0>
12 DATATYPES = <http://www.simantics.org/Datatypes-1.1>
13
14 // ----------------------------------------------------------------------------
15
16 DN.EdgeThicknessPropertyParameterType <T SEL.GenericParameterType
17     @L0.assert SEL.HasDisplayValue
18         _ : SEL.DisplayValue
19             SEL.HasEnumerationValues DN.Functions.edgeThicknessPropertyEnumerationValues : L0.Function
20             SEL.HasCustomModifier DN.Functions.edgeThicknessPropertyModifier : L0.Function
21
22 DN.ArrowLengthPropertyParameterType <T SEL.GenericParameterType
23     @L0.assert SEL.HasDisplayValue
24         _ : SEL.DisplayValue
25             SEL.HasEnumerationValues DN.Functions.arrowLengthPropertyEnumerationValues : L0.Function
26             SEL.HasCustomModifier DN.Functions.arrowLengthPropertyModifier : L0.Function
27
28 DN.VertexScalePropertyParameterType <T SEL.GenericParameterType
29     @L0.assert SEL.HasDisplayValue
30         _ : SEL.DisplayValue
31             SEL.HasEnumerationValues DN.Functions.nodeScalePropertyEnumerationValues : L0.Function
32             SEL.HasCustomModifier DN.Functions.nodeScalePropertyModifier : L0.Function
33
34 DN.Edge.ThicknessProperty <T L0.Value
35     @L0.assert L0.ConvertsToValueWith DN.Functions.convertToValue
36     >-- DN.Edge.ThicknessProperty.value ==> "Resource -> <ReadGraph> Maybe Double" <R L0.HasProperty : SEL.GenericParameterType
37         L0.readOnly true
38     >-- DN.Edge.ThicknessProperty.gain --> L0.Double <R L0.HasProperty : SEL.GenericParameterType
39         L0.readOnly true
40     >-- DN.Edge.ThicknessProperty.bias --> L0.Double <R L0.HasProperty : SEL.GenericParameterType
41         L0.readOnly true
42     @L0.assert DN.Edge.ThicknessProperty.gain 1.0
43     @L0.assert DN.Edge.ThicknessProperty.bias 0.0
44
45 DN.Edge.ArrowLengthProperty <T L0.Value
46     @L0.assert L0.ConvertsToValueWith DN.Functions.convertToValue
47     >-- DN.Edge.ArrowLengthProperty.value ==> "Resource -> <ReadGraph> Maybe Double" <R L0.HasProperty : SEL.GenericParameterType
48         L0.readOnly true
49     >-- DN.Edge.ArrowLengthProperty.gain --> L0.Double <R L0.HasProperty : SEL.GenericParameterType
50         L0.readOnly true
51     >-- DN.Edge.ArrowLengthProperty.bias --> L0.Double <R L0.HasProperty : SEL.GenericParameterType
52         L0.readOnly true
53     @L0.assert DN.Edge.ArrowLengthProperty.gain 1.0
54     @L0.assert DN.Edge.ArrowLengthProperty.bias 0.0
55
56 DN.Vertex.ScaleProperty <T L0.Value
57     @L0.assert L0.ConvertsToValueWith DN.Functions.convertToValue
58     >-- DN.Vertex.ScaleProperty.value ==> "Resource -> <ReadGraph> Maybe Double" <R L0.HasProperty : SEL.GenericParameterType
59         L0.readOnly true
60     >-- DN.Vertex.ScaleProperty.gain ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
61         L0.readOnly true
62     >-- DN.Vertex.ScaleProperty.bias ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
63         L0.readOnly true
64     @L0.assert DN.Vertex.ScaleProperty.gain 1.0
65     @L0.assert DN.Vertex.ScaleProperty.bias 0.0
66
67 DN.Diagram
68     >-- DN.Diagram.elementColoringGradientHue ==> "Float" <R L0.HasProperty : SEL.GenericParameterType
69         L0.HasLabel "Element Color Hue"
70         L0.HasDescription "HSV/HSB color space hue value used for element coloring in degrees (0-360)"
71         L0X.HasUnit "deg"
72         L0X.RequiresDataType $(Float(unit="deg",range=[0..360]))
73         SEL.HasDisplayValue _ : SEL.DisplayValue
74             L0.Literal.HasInputValidator DN.Functions.hueValidator : L0.Function
75     >-- DN.Diagram.elementColoringGradientSaturation ==> "Float" <R L0.HasProperty : SEL.GenericParameterType
76         L0.HasLabel "Element Color Saturation"
77         L0.HasDescription "HSV/HSB color space saturation value used for element coloring in % (0-100)"
78         L0X.HasUnit "%"
79         L0X.RequiresDataType $(Float(unit="%",range=[0..100]))
80         SEL.HasDisplayValue _ : SEL.DisplayValue
81             L0.Literal.HasInputValidator DN.Functions.saturationValidator : L0.Function
82     >-- DN.Diagram.elementColoringFunction --> L0.String ==> "Resource -> <ReadGraph> Double" <R L0.HasProperty : SEL.GenericParameterType
83         L0.HasLabel "Element Color Brightness Function"
84         L0.HasDescription "Defines HSV/HSB color space brightness function whose value is cut off to fit [0,1]. Together with hue and saturation this defines the element color."
85         SEL.HasDisplayValue _ : SEL.DisplayValue
86             L0.Literal.HasInputValidator DN.Functions.brightnessValidator : L0.Function
87     >-- DN.Diagram.edgeThicknessGain ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
88         L0.HasLabel "Edge Thickness Gain"
89     >-- DN.Diagram.edgeThicknessBias ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
90         L0.HasLabel "Edge Thickness Bias"
91     >-- DN.Diagram.edgeThicknessProperty --> DN.Edge.ThicknessProperty <R L0.HasProperty : DN.EdgeThicknessPropertyParameterType
92         L0.HasLabel "Edge Thickness Property"
93     >-- DN.Diagram.arrowLengthGain ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
94         L0.HasLabel "Arrow Length Gain"
95     >-- DN.Diagram.arrowLengthBias ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
96         L0.HasLabel "Arrow Length Bias"
97     >-- DN.Diagram.arrowLengthProperty --> DN.Edge.ArrowLengthProperty <R L0.HasProperty : DN.ArrowLengthPropertyParameterType
98         L0.HasLabel "Arrow Length Property"
99     >-- DN.Diagram.nodeScaleGain ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
100         L0.HasLabel "Node Scale Gain"
101     >-- DN.Diagram.nodeScaleBias ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
102         L0.HasLabel "Node Scale Bias"
103     >-- DN.Diagram.nodeScaleProperty --> DN.Vertex.ScaleProperty <R L0.HasProperty : DN.VertexScalePropertyParameterType
104         L0.HasLabel "Node Scale Property"
105     >-- DN.Diagram.backgroundColor --> DATATYPES.RGB.Integer <R L0.HasProperty : SEL.ColorParameterType
106         L0.HasLabel "Diagram Background Color"
107     >-- DN.Diagram.drawMapEnabled ==> "Boolean" <R L0.HasProperty : SEL.GenericParameterType
108         L0.HasLabel "Draw Map"
109     >-- DN.Diagram.hasVisualisation --> DN.Diagram.Visualisations <R L0.HasProperty
110         L0.HasLabel "Visualisation"
111     >-- DN.Diagram.hasActiveVisualisation --> DN.Diagram.Visualisations <R L0.HasProperty
112     >-- DN.Diagram.profileUpdateInterval ==> "Long" <R L0.HasProperty : SEL.GenericParameterType
113         L0.HasLabel "Profile update interval"
114     @L0.assert DN.Diagram.elementColoringGradientHue
115         0.0 : L0.Float
116             L0.HasDataType $(Float(unit="deg",range=[0..360]))
117     @L0.assert DN.Diagram.elementColoringGradientSaturation
118         100.0 : L0.Float
119             L0.HasDataType $(Float(unit="%",range=[0..100]))
120     @MOD.sclAssertion DN.Diagram.elementColoringFunction "\r -> 1.0" "Resource -> <ReadGraph> Double"
121     @L0.assert DN.Diagram.edgeThicknessGain 1.0
122     @L0.assert DN.Diagram.edgeThicknessBias 0.0
123     @L0.assert DN.Diagram.edgeThicknessProperty DN.Edge.ThicknessProperty.Diameter
124     @L0.assert DN.Diagram.arrowLengthGain 1.0
125     @L0.assert DN.Diagram.arrowLengthBias 0.0
126     @L0.assert DN.Diagram.arrowLengthProperty DN.Edge.ArrowLengthProperty.FlowRate
127     @L0.assert DN.Diagram.nodeScaleGain 1.0
128     @L0.assert DN.Diagram.nodeScaleBias 0.0
129     @L0.assert DN.Diagram.nodeScaleProperty DN.Vertex.ScaleProperty.NominalSupplyPressure
130     @L0.assert DN.Diagram.drawMapEnabled true
131     @L0.assert DN.Diagram.profileUpdateInterval
132         2000 : L0.Long
133     @L0.assert DN.Diagram.DefaultPipeTechTypeId 0
134
135 // ----------------------------------------------------------------------------
136 // Built-in enumerated ScaleProperty & ThicknessProperty instances
137
138 DN.Functions.constantOne : L0.Function
139     L0.HasValueType "Resource -> <ReadGraph> Maybe Double"
140
141 DN.Functions.hasNominalMassFlowValue : L0.Function
142     L0.HasValueType "Resource -> <ReadGraph> Maybe Double"
143
144 DN.Edge.ThicknessProperty.OnlyGainAndBias: DN.Edge.ThicknessProperty
145     L0.HasLabel "Only Gain and Bias"
146     DN.Edge.ThicknessProperty.value
147         DN.Functions.constantOne
148
149 DN.Edge.ThicknessProperty.Diameter : DN.Edge.ThicknessProperty
150     L0.HasLabel "Diameter"
151     DN.Edge.ThicknessProperty.value
152         DN.Functions.hasDiameterValue : L0.Function
153             L0.HasValueType "Resource -> <ReadGraph> Maybe Double"
154     DN.Edge.ThicknessProperty.gain 0.001
155
156 DN.Edge.ThicknessProperty.FlowRate : DN.Edge.ThicknessProperty
157     L0.HasLabel "Nominal Mass Flow"
158     DN.Edge.ThicknessProperty.value
159         DN.Functions.hasNominalMassFlowValue
160     DN.Edge.ThicknessProperty.gain 0.1
161
162 DN.Edge.ArrowLengthProperty.FlowRate : DN.Edge.ArrowLengthProperty
163     L0.HasLabel "Nominal Mass Flow"
164     DN.Edge.ArrowLengthProperty.value
165         DN.Functions.hasNominalMassFlowValue
166     DN.Edge.ArrowLengthProperty.gain 1.0
167
168 DN.Vertex.ScaleProperty.OnlyGainAndBias: DN.Vertex.ScaleProperty
169     L0.HasLabel "Only Gain and Bias"
170     DN.Vertex.ScaleProperty.value
171         DN.Functions.constantOne
172
173 DN.Vertex.ScaleProperty.NominalSupplyPressure : DN.Vertex.ScaleProperty
174     L0.HasLabel "Nominal Supply Pressure"
175     DN.Vertex.ScaleProperty.value
176         DN.Functions.hasNominalSupplyPressure : L0.Function
177             L0.HasValueType "Resource -> <ReadGraph> Maybe Double"
178     DN.Vertex.ScaleProperty.gain 0.001
179
180 DN.Vertex.ScaleProperty.Elevation : DN.Vertex.ScaleProperty
181     L0.HasLabel "Elevation"
182     DN.Vertex.ScaleProperty.value
183         DN.Functions.hasElevation : L0.Function
184             L0.HasValueType "Resource -> <ReadGraph> Maybe Double"
185     DN.Vertex.ScaleProperty.gain 0.1
186     DN.Vertex.ScaleProperty.bias 0.001