]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph
Initial commit of simantics/district
[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
8 MBC = MOD.ModelingBrowseContext
9
10 DN = <http://www.simantics.org/DistrictNetwork-1.0> : L0.Ontology
11     @L0.new
12     L0.HasResourceClass "org.simantics.district.network.ontology.DistrictNetworkResource"
13
14 DN.Edge <T DIA.Element : L0.Type
15
16 DN.Vertex <T DIA.Element : L0.Type
17
18 DN.Connection <T DIA.Connection
19
20 DN.Diagram <T DIA.Diagram
21
22
23 DN.Composite <T STR.Composite
24     @L0.assert MOD.HasModelingTemplate
25         _ : MOD.DiagramTemplate
26             MOD.HasDiagramType DN.Diagram
27
28 DN.HasStartVertex <R L0.HasProperty
29     L0.HasRange DN.Vertex
30
31 DN.HasEndVertex <R L0.HasProperty
32     L0.HasRange DN.Vertex
33
34 DNAC.newDiagramContribution : L0.Template
35     @template %actionContext %label %image %action
36         %actionContext
37             VP.BrowseContext.HasActionContribution _ : VP.ActionContribution
38                 L0.HasLabel %label
39                 VP.ActionContribution.HasImage %image
40                 VP.ActionContribution.HasCategory VP.NewActionCategory
41                 VP.ActionContribution.HasNodeType MBC.Configuration
42                 VP.ActionContribution.HasAction %action
43
44 DNAC = DN.ActionContext : VP.BrowseContext
45     VP.BrowseContext.IsIncludedIn MOD.ModelingActionContext
46     @DNAC.newDiagramContribution "DN Diagram" IMAGES.ConfigurationFolder ACTIONS.NewDNDiagram
47
48 ACTIONS = DN.Actions : L0.Library
49
50 ACTIONS.NewDNDiagram : MOD.NewComposite
51     MOD.NewComposite.HasCompositeType DN.Composite
52     MOD.NewComposite.HasDefaultName "NewDNComposite"
53
54 IMAGES = DN.Images : L0.Library
55
56 IMAGES.ConfigurationFolder : IMAGE.PngImage
57     @L0.loadBytes "images/Configuration.png"