]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.network.ontology/graph/DistrictNetworkDiagramSettings.pgraph
eb2416e96f6589f08cd5c1077ca3b9e8de71c7cd
[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
13 // ----------------------------------------------------------------------------
14
15 DN.EdgeThicknessPropertyParameterType <T SEL.GenericParameterType
16     @L0.assert SEL.HasDisplayValue
17         _ : SEL.DisplayValue
18             SEL.HasEnumerationValues DN.Functions.edgeThicknessPropertyEnumerationValues : L0.Function
19             SEL.HasCustomModifier DN.Functions.edgeThicknessPropertyModifier : L0.Function
20
21 DN.VertexScalePropertyParameterType <T SEL.GenericParameterType
22     @L0.assert SEL.HasDisplayValue
23         _ : SEL.DisplayValue
24             SEL.HasEnumerationValues DN.Functions.nodeScalePropertyEnumerationValues : L0.Function
25             SEL.HasCustomModifier DN.Functions.nodeScalePropertyModifier : L0.Function
26
27 DN.Edge.ThicknessProperty <T L0.Value
28     @L0.assert L0.ConvertsToValueWith DN.Functions.convertToValue
29     >-- DN.Edge.ThicknessProperty.value ==> "Resource -> <ReadGraph> Maybe Double" <R L0.HasProperty : SEL.GenericParameterType
30         L0.readOnly true
31     >-- DN.Edge.ThicknessProperty.gain --> L0.Double <R L0.HasProperty : SEL.GenericParameterType
32         L0.readOnly true
33     >-- DN.Edge.ThicknessProperty.bias --> L0.Double <R L0.HasProperty : SEL.GenericParameterType
34         L0.readOnly true
35     @L0.assert DN.Edge.ThicknessProperty.gain 1.0
36     @L0.assert DN.Edge.ThicknessProperty.bias 0.0
37
38 DN.Vertex.ScaleProperty <T L0.Value
39     @L0.assert L0.ConvertsToValueWith DN.Functions.convertToValue
40     >-- DN.Vertex.ScaleProperty.value ==> "Resource -> <ReadGraph> Maybe Double" <R L0.HasProperty : SEL.GenericParameterType
41         L0.readOnly true
42     >-- DN.Vertex.ScaleProperty.gain ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
43         L0.readOnly true
44     >-- DN.Vertex.ScaleProperty.bias ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
45         L0.readOnly true
46     @L0.assert DN.Vertex.ScaleProperty.gain 1.0
47     @L0.assert DN.Vertex.ScaleProperty.bias 0.0
48
49 DN.Diagram
50     >-- DN.Diagram.elementColoringGradientHue ==> "Float" <R L0.HasProperty : SEL.GenericParameterType
51         L0.HasLabel "Element Color Hue"
52         L0.HasDescription "HSV/HSB color space hue value used for element coloring in degrees (0-360)"
53         L0X.HasUnit "deg"
54         L0X.RequiresDataType $(Float(unit="deg",range=[0..360]))
55         SEL.HasDisplayValue _ : SEL.DisplayValue
56             L0.Literal.HasInputValidator DN.Functions.hueValidator : L0.Function
57     >-- DN.Diagram.elementColoringGradientSaturation ==> "Float" <R L0.HasProperty : SEL.GenericParameterType
58         L0.HasLabel "Element Color Saturation"
59         L0.HasDescription "HSV/HSB color space saturation value used for element coloring in % (0-100)"
60         L0X.HasUnit "%"
61         L0X.RequiresDataType $(Float(unit="%",range=[0..100]))
62         SEL.HasDisplayValue _ : SEL.DisplayValue
63             L0.Literal.HasInputValidator DN.Functions.saturationValidator : L0.Function
64     >-- DN.Diagram.elementColoringFunction --> L0.String ==> "Resource -> <ReadGraph> Double" <R L0.HasProperty : SEL.GenericParameterType
65         L0.HasLabel "Element Color Brightness Function"
66         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."
67         SEL.HasDisplayValue _ : SEL.DisplayValue
68             L0.Literal.HasInputValidator DN.Functions.brightnessValidator : L0.Function
69     >-- DN.Diagram.edgeThicknessGain ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
70         L0.HasLabel "Edge Thickness Gain"
71     >-- DN.Diagram.edgeThicknessBias ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
72         L0.HasLabel "Edge Thickness Bias"
73     >-- DN.Diagram.edgeThicknessProperty --> DN.Edge.ThicknessProperty <R L0.HasProperty : DN.EdgeThicknessPropertyParameterType
74         L0.HasLabel "Edge Thickness Property"
75     >-- DN.Diagram.nodeScaleGain ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
76         L0.HasLabel "Node Scale Gain"
77     >-- DN.Diagram.nodeScaleBias ==> "Double" <R L0.HasProperty : SEL.GenericParameterType
78         L0.HasLabel "Node Scale Bias"
79     >-- DN.Diagram.nodeScaleProperty --> DN.Vertex.ScaleProperty <R L0.HasProperty : DN.VertexScalePropertyParameterType
80         L0.HasLabel "Node Scale Property"
81     >-- DN.Diagram.backgroundColor ==> "String" <R L0.HasProperty : SEL.GenericParameterType
82         L0.HasLabel "Diagram Background Color"
83     >-- DN.Diagram.drawMapEnabled ==> "Boolean" <R L0.HasProperty : SEL.GenericParameterType
84         L0.HasLabel "Draw Map"
85     @L0.assert DN.Diagram.elementColoringGradientHue
86         0.0 : L0.Float
87             L0.HasDataType $(Float(unit="deg",range=[0..360]))
88     @L0.assert DN.Diagram.elementColoringGradientSaturation
89         100.0 : L0.Float
90             L0.HasDataType $(Float(unit="%",range=[0..100]))
91     @MOD.sclAssertion DN.Diagram.elementColoringFunction "\r -> 1.0" "Resource -> <ReadGraph> Double"
92     @L0.assert DN.Diagram.edgeThicknessGain 1.0
93     @L0.assert DN.Diagram.edgeThicknessBias 0.0
94     @L0.assert DN.Diagram.edgeThicknessProperty DN.Edge.ThicknessProperty.Diameter
95     @L0.assert DN.Diagram.nodeScaleGain 1.0
96     @L0.assert DN.Diagram.nodeScaleBias 0.0
97     @L0.assert DN.Diagram.nodeScaleProperty DN.Vertex.ScaleProperty.NominalSupplyPressure
98     @L0.assert DN.Diagram.drawMapEnabled true
99
100 // ----------------------------------------------------------------------------
101 // Built-in enumerated ScaleProperty & ThicknessProperty instances
102
103 DN.Functions.constantOne : L0.Function
104     L0.HasValueType "Resource -> <ReadGraph> Maybe Double"
105
106 DN.Edge.ThicknessProperty.OnlyGainAndBias: DN.Edge.ThicknessProperty
107     L0.HasLabel "Only Gain and Bias"
108     DN.Edge.ThicknessProperty.value
109         DN.Functions.constantOne
110
111 DN.Edge.ThicknessProperty.Diameter : DN.Edge.ThicknessProperty
112     L0.HasLabel "Diameter"
113     DN.Edge.ThicknessProperty.value
114         DN.Functions.hasDiameterValue : L0.Function
115             L0.HasValueType "Resource -> <ReadGraph> Maybe Double"
116     DN.Edge.ThicknessProperty.gain 0.001
117
118
119 DN.Vertex.ScaleProperty.OnlyGainAndBias: DN.Vertex.ScaleProperty
120     L0.HasLabel "Only Gain and Bias"
121     DN.Vertex.ScaleProperty.value
122         DN.Functions.constantOne
123
124 DN.Vertex.ScaleProperty.NominalSupplyPressure : DN.Vertex.ScaleProperty
125     L0.HasLabel "Nominal Supply Pressure"
126     DN.Vertex.ScaleProperty.value
127         DN.Functions.hasNominalSupplyPressure : L0.Function
128             L0.HasValueType "Resource -> <ReadGraph> Maybe Double"
129     DN.Vertex.ScaleProperty.gain 0.001
130
131 DN.Vertex.ScaleProperty.Elevation : DN.Vertex.ScaleProperty
132     L0.HasLabel "Elevation"
133     DN.Vertex.ScaleProperty.value
134         DN.Functions.hasElevation : L0.Function
135             L0.HasValueType "Resource -> <ReadGraph> Maybe Double"
136     DN.Vertex.ScaleProperty.gain 0.1
137     DN.Vertex.ScaleProperty.bias 0.001