]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph
Updates to Simantics district CSV import
[simantics/district.git] / org.simantics.district.network.ontology / graph / DistrictNetwork.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 DIA = <http://www.simantics.org/Diagram-2.2>
3 STR = <http://www.simantics.org/Structural-1.2>
4 MOD = <http://www.simantics.org/Modeling-1.2>
5 VP = <http://www.simantics.org/Viewpoint-1.2>
6 IMAGE = <http://www.simantics.org/Image2-1.2>
7 SEL = <http://www.simantics.org/SelectionView-1.2>
8 SEL_UI = <http://www.simantics.org/SelectionViewUI-1.1>
9
10 DN = <http://www.simantics.org/DistrictNetwork-1.0> : L0.Ontology
11     @L0.new
12     L0.Ontology.global true
13     L0.HasResourceClass "org.simantics.district.network.ontology.DistrictNetworkResource"
14
15 DN.Layer <T DIA.Layer
16
17 DN.Edge <T DIA.Element : L0.Type
18     @L0.assert DN.Edge.HasDiameter 0.1
19     @L0.assert DN.Edge.HasOuterDiameter 0.11
20
21 DN.Vertex <T DIA.Element : L0.Type
22     @L0.assert DN.Vertex.HasElevation 0.0
23
24 DN.EdgeDefaultMapping <R L0.HasProperty : DN.EdgeMappingParameterType
25     L0.HasLabel "Default Edge mapping"
26
27 DN.VertexDefaultMapping <R L0.HasProperty : DN.VertexMappingParameterType
28     L0.HasLabel "Default Vertex mapping"
29
30 DN.Functions : L0.Library
31
32 DN.VertexMappingParameterType <T SEL.GenericParameterType
33   @L0.assert SEL.HasDisplayValue
34     _ : SEL.DisplayValue
35       SEL.HasEnumerationValues DN.Functions.enumerationValues : L0.Function
36       SEL.HasCustomModifier DN.Functions.defaultVertexMappingModifier : L0.Function
37
38 DN.EdgeMappingParameterType <T SEL.GenericParameterType
39   @L0.assert SEL.HasDisplayValue
40     _ : SEL.DisplayValue
41       SEL.HasEnumerationValues DN.Functions.enumerationValues
42       SEL.HasCustomModifier DN.Functions.defaultEdgeMappingModifier : L0.Function
43
44 DN.MappingParameterType <T SEL.GenericParameterType
45   @L0.assert SEL.HasDisplayValue
46     _ : SEL.DisplayValue
47       SEL.HasEnumerationValues DN.Functions.enumerationValues
48       SEL.HasCustomModifier DN.Functions.mappingModifier : L0.Function
49
50 DN.HasMapping <R L0.HasProperty : DN.MappingParameterType
51     L0.HasLabel "Mapping"
52
53 DN.Edge.HasLength <R L0.HasProperty : SEL.GenericParameterType
54     L0.HasLabel "Length"
55     L0.HasRange L0.Double
56     L0.readOnly true
57
58 DN.Edge.HasDiameter <R L0.HasProperty : SEL.GenericParameterType
59     L0.HasLabel "Diameter"
60     L0.HasRange L0.Double
61     L0.readOnly false
62
63 DN.Vertex.HasElevation <R L0.HasProperty : SEL.GenericParameterType
64     L0.HasLabel "Elevation"
65     L0.HasRange L0.Double
66     L0.readOnly false
67
68 DN.Vertex.HasTemperature <R L0.HasProperty : SEL.GenericParameterType
69     L0.HasLabel "Temperature"
70     L0.HasRange L0.Double
71     L0.readOnly false
72
73 DN.Vertex.HasPressure <R L0.HasProperty : SEL.GenericParameterType
74     L0.HasLabel "Pressure"
75     L0.HasRange L0.Double
76     L0.readOnly false
77
78 DN.Edge.HasOuterDiameter <R L0.HasProperty : SEL.GenericParameterType
79     L0.HasLabel "Outer Diameter"
80     L0.HasRange L0.Double
81     L0.readOnly false
82
83 DN.Edge.HasNominalMassFlow <R L0.HasProperty : SEL.GenericParameterType
84     L0.HasLabel "Nominal Mass Flow"
85     L0.HasRange L0.Double
86     L0.readOnly false
87
88
89 DN.InLayer
90     @L0.defTag 
91     @L0.tag L0.Abstract
92
93 DN.HasInLayerTag <R L0.HasProperty
94     L0.HasRange L0.Tag
95
96 DN.Connection <T DIA.Connection
97
98 DN.Diagram.MappedDiagram <R L0.IsWeaklyRelatedTo
99 DN.MappedComponent <R L0.IsWeaklyRelatedTo
100
101 DN.Diagram <T DIA.Diagram
102
103 DN.AddLayerToDNDiagramTemplate <T L0.Template
104
105 DN.EPSG_4326 : DN.SpatialRefSystem
106     L0.HasLabel "EPSG:4326"
107     DN.HasSRID 4326
108     DN.HasSRTEXT _ : L0.String
109         @L0.loadString "epsg/EPSG_4326"
110
111 DN.SpatialRefSystem <T L0.Entity
112
113 DN.HasSpatialRefSystem <R L0.HasProperty
114     L0.HasRange DN.SpatialRefSystem
115
116 DN.HasSRID <R L0.HasProperty
117     L0.HasRange L0.Integer
118
119 DN.HasSRTEXT <R L0.HasProperty
120     L0.HasRange L0.String
121
122 DN.Functions.compositeInstantiator : L0.ExternalValue
123
124 DN.Composite <T STR.Composite
125     STR.Composite.instantiationFunction DN.Functions.compositeInstantiator
126     @L0.assert MOD.HasModelingTemplate
127         _ : MOD.DiagramTemplate
128             MOD.HasDiagramType DN.Diagram
129     @L0.assert MOD.HasModelingTemplate
130         _ : DN.AddLayerToDNDiagramTemplate
131
132 DN.HasStartVertex <R L0.DependsOn
133     L0.HasDomain DN.Edge
134     L0.HasRange DN.Vertex
135     L0.InverseOf DN.HasStartVertex_Inverse <R L0.IsRelatedTo
136
137 DN.HasEndVertex <R L0.DependsOn
138     L0.HasDomain DN.Edge
139     L0.HasRange DN.Vertex
140     L0.InverseOf DN.HasEndVertex_Inverse <R L0.IsRelatedTo
141
142 MBC = MOD.ModelingBrowseContext
143
144 DNAC.newDiagramContribution : L0.Template
145     @template %actionContext %label %image %action
146         %actionContext
147             VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
148                 L0.HasLabel %label
149                 VP.ActionContribution.HasImage %image
150                 VP.ActionContribution.HasCategory VP.NewActionCategory
151                 VP.ActionContribution.HasNodeType MBC.Configuration
152                 VP.ActionContribution.HasAction %action
153
154 DNAC = DN.ActionContext : VP.BrowseContext
155     VP.BrowseContext.IsIncludedIn MOD.ModelingActionContext
156     @DNAC.newDiagramContribution "Network Diagram" IMAGES.MapImage ACTIONS.NewDNDiagram
157
158 DNBC = DN.BrowseContext : VP.BrowseContext
159     VP.BrowseContext.IsIncludedIn MOD.ModelingBrowseContext
160     VP.BrowseContext.Includes SEL_UI.StandardPropertiesBase.BrowseContext
161     
162     @VP.customModifierRule    DN.Edge    VP.ResourceLabelModifierRule
163     @VP.constantImageRule     DN.Composite   IMAGES.MapImage
164
165
166 ACTIONS = DN.Actions : L0.Library
167
168 ACTIONS.NewDNDiagram : MOD.NewComposite
169     MOD.NewComposite.HasCompositeType DN.Composite
170     MOD.NewComposite.HasDefaultName "NewNetworkDiagram"
171
172 IMAGES = DN.Images : L0.Library
173
174 IMAGES.MapImage : IMAGE.PngImage
175     @L0.loadBytes "images/map.png"
176
177 // Component MAPPING
178 DN.Mapping <T L0.Library
179
180 DN.Functions.convertToValue : L0.ExternalValue
181
182 DN.Mapping.Base <T L0.Value
183   @L0.assert L0.ConvertsToValueWith DN.Functions.convertToValue
184
185 DN.Mapping.Terminal <T L0.Entity
186
187 DN.Mapping.TerminalPair <T L0.Entity
188     >-- DN.Mapping.InputTerminal --> DN.Mapping.Terminal <R L0.HasProperty
189     >-- DN.Mapping.OutputTerminal --> DN.Mapping.Terminal <R L0.HasProperty
190
191 DN.Mapping.VertexMapping <T DN.Mapping.Base
192     >-- DN.Mapping.ComponentType --> STR.ComponentType <R L0.DependsOn
193     >-- DN.Mapping.VertexMapping.ElevationAttribute --> L0.String <R L0.HasProperty
194     >-- DN.Mapping.VertexMapping.TemperatureAttribute --> L0.String <R L0.HasProperty
195     >-- DN.Mapping.VertexMapping.PressureAttribute --> L0.String <R L0.HasProperty
196     >-- DN.Mapping.Terminals --> DN.Mapping.TerminalPair <R L0.HasProperty
197
198 DN.Mapping.EdgeMapping <T DN.Mapping.Base
199     >-- DN.Mapping.ComponentType
200     >-- DN.Mapping.EdgeMapping.LengthAttribute --> L0.String <R L0.HasProperty
201     >-- DN.Mapping.EdgeMapping.DiameterAttribute --> L0.String <R L0.HasProperty
202     >-- DN.Mapping.EdgeMapping.OuterDiameterAttribute --> L0.String <R L0.HasProperty
203     >-- DN.Mapping.EdgeMapping.NominalMassFlowAttribute --> L0.String <R L0.HasProperty
204     >-- DN.Mapping.Terminals