]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph
2c6ac584641ce3c3c2a2374b9b15fe3033481abe
[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
9 MBC = MOD.ModelingBrowseContext
10
11 DN = <http://www.simantics.org/DistrictNetwork-1.0> : L0.Ontology
12     @L0.new
13     L0.Ontology.global true
14     L0.HasResourceClass "org.simantics.district.network.ontology.DistrictNetworkResource"
15
16 DN.Layer <T DIA.Layer
17
18 DN.Edge <T DIA.Element : L0.Type
19     @L0.assert DN.HasMapping ""
20     @L0.assert DN.Bidirectional false
21     @L0.assert DN.Edge.HasDiameter 1
22
23 DN.Vertex <T DIA.Element : L0.Type
24     @L0.assert DN.HasMapping ""
25     @L0.assert DN.Bidirectional false
26
27 DN.Bidirectional <R L0.HasProperty : SEL.GenericParameterType
28     L0.HasLabel "Is network bidirectional"
29     L0.HasRange L0.Boolean
30     L0.readOnly false
31
32 DN.EdgeDefaultMapping <R L0.HasProperty : SEL.GenericParameterType
33     L0.HasLabel "Default Edge mapping"
34     L0.HasRange L0.String
35     L0.readOnly false
36
37 DN.VertexDefaultMapping <R L0.HasProperty : SEL.GenericParameterType
38     L0.HasLabel "Default Vertex mapping"
39     L0.HasRange L0.String
40     L0.readOnly false
41
42 DN.HasMapping <R L0.HasProperty : SEL.GenericParameterType
43     L0.HasLabel "Mapping"
44     L0.HasRange DN.Mapping.EdgeMapping
45     L0.readOnly false
46
47 DN.Edge.HasDiameter <R L0.HasProperty : SEL.GenericParameterType
48     L0.HasLabel "Diameter"
49     L0.HasRange L0.Double
50     L0.readOnly false
51
52 DN.InLayer
53     @L0.defTag 
54     @L0.tag L0.Abstract
55
56 DN.HasInLayerTag <R L0.HasProperty
57     L0.HasRange L0.Tag
58
59 DN.Connection <T DIA.Connection
60
61 DN.Diagram <T DIA.Diagram
62     @L0.assert DN.VertexDefaultMapping ""
63     @L0.assert DN.EdgeDefaultMapping ""
64
65 DN.AddLayerToDNDiagramTemplate <T L0.Template
66
67 DN.EPSG_4326 <T DN.SpatialRefSystem
68     DN.HasSRID 4326
69     DN.HasSRTEXT _ : L0.String
70         @L0.loadString "epsg/EPSG_4326"
71
72 DN.SpatialRefSystem <T L0.Entity
73
74 DN.HasSpatialRefSystem <R L0.HasProperty
75     L0.HasRange DN.SpatialRefSystem
76
77 DN.HasSRID <R L0.HasProperty
78     L0.HasRange L0.Integer
79
80 DN.HasSRTEXT <R L0.HasProperty
81     L0.HasRange L0.String
82
83 DN.Composite <T STR.Composite
84     @L0.assert MOD.HasModelingTemplate
85         _ : MOD.DiagramTemplate
86             MOD.HasDiagramType DN.Diagram
87     @L0.assert MOD.HasModelingTemplate
88         _ : DN.AddLayerToDNDiagramTemplate
89
90 DN.HasStartVertex <R L0.DependsOn
91     L0.HasDomain DN.Edge
92     L0.HasRange DN.Vertex
93     L0.InverseOf DN.HasStartVertex_Inverse <R L0.IsRelatedTo
94
95 DN.HasEndVertex <R L0.DependsOn
96     L0.HasDomain DN.Edge
97     L0.HasRange DN.Vertex
98     L0.InverseOf DN.HasEndVertex_Inverse <R L0.IsRelatedTo
99
100 DNAC.newDiagramContribution : L0.Template
101     @template %actionContext %label %image %action
102         %actionContext
103             VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
104                 L0.HasLabel %label
105                 VP.ActionContribution.HasImage %image
106                 VP.ActionContribution.HasCategory VP.NewActionCategory
107                 VP.ActionContribution.HasNodeType MBC.Configuration
108                 VP.ActionContribution.HasAction %action
109
110 DNAC = DN.ActionContext : VP.BrowseContext
111     VP.BrowseContext.IsIncludedIn MOD.ModelingActionContext
112     @DNAC.newDiagramContribution "DN Diagram" IMAGES.ConfigurationFolder ACTIONS.NewDNDiagram
113
114 ACTIONS = DN.Actions : L0.Library
115
116 ACTIONS.NewDNDiagram : MOD.NewComposite
117     MOD.NewComposite.HasCompositeType DN.Composite
118     MOD.NewComposite.HasDefaultName "NewDNComposite"
119
120 IMAGES = DN.Images : L0.Library
121
122 IMAGES.ConfigurationFolder : IMAGE.PngImage
123     @L0.loadBytes "images/Configuration.png"
124
125     
126 // Component MAPPING
127 DN.Mapping <T L0.Library
128
129 DN.Mapping.Terminal <T L0.Entity
130
131 DN.Mapping.TerminalPair <T L0.Entity
132     >-- DN.Mapping.InputTerminal --> DN.Mapping.Terminal <R L0.HasProperty
133     >-- DN.Mapping.OutputTerminal --> DN.Mapping.Terminal <R L0.HasProperty
134
135 DN.Mapping.VertexMapping <T L0.Entity
136     >-- DN.Mapping.ComponentType --> STR.ComponentType <R L0.HasProperty
137     >-- DN.Mapping.VertexMapping.ElevationAttribute --> L0.String <R L0.HasProperty
138     >-- DN.Mapping.Terminals --> DN.Mapping.TerminalPair <R L0.HasProperty
139
140 DN.Mapping.EdgeMapping <T L0.Entity
141     >-- DN.Mapping.ComponentType
142     >-- DN.Mapping.EdgeMapping.Bidirectional --> L0.Boolean <R L0.HasProperty
143     >-- DN.Mapping.EdgeMapping.LengthAttribute --> L0.String <R L0.HasProperty
144     >-- DN.Mapping.EdgeMapping.DiameterAttribute --> L0.String <R L0.HasProperty
145     >-- DN.Mapping.Terminals