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