]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network.ontology/graph/DistrictNetwork.pgraph
Add default mappings for right/left click & prevent edge drawing
[simantics/district.git] / org.simantics.district.network.ontology / graph / DistrictNetwork.pgraph
index 392173bf50c25b1998dcd2076240f9edae3a80d9..99c1afce431f3eb63f5be65b3d3ff74fc5ce7f61 100644 (file)
@@ -18,8 +18,8 @@ DN = <http://www.simantics.org/DistrictNetwork-1.0> : L0.Ontology
 DN.SCLMain : L0.SCLModule
     L0.SCLModule.definition
         """
-        include "Simantics/District/SCLMain"
-        """
+include "Simantics/District/SCLMain"
+"""
 
 // ----------------------------------------------------------------------------
 
@@ -85,6 +85,8 @@ DN.Edge <T DN.Element
     >-- DN.Edge.HasLength 
         @defProperty "Length" L0.Double
         L0.readOnly true
+    >-- DN.Edge.HasGeometry
+        @defProperty "Detailed Geometry" L0.DoubleArray
     >-- DN.Edge.HasDiameter
         @defProperty "Diameter" L0.Double
     >-- DN.Edge.HasOuterDiameter
@@ -110,6 +112,12 @@ DN.EdgeDefaultMapping <R L0.HasProperty : DN.EdgeMappingParameterType
 DN.VertexDefaultMapping <R L0.HasProperty : DN.VertexMappingParameterType
     L0.HasLabel "Default Vertex mapping"
 
+DN.RightClickDefaultMapping <R L0.HasProperty : DN.VertexMappingParameterType
+    L0.HasLabel "Right click Vertex mapping"
+
+DN.LeftClickDefaultMapping <R L0.HasProperty : DN.VertexMappingParameterType
+    L0.HasLabel "Left click Vertex mapping"
+
 // ----------------------------------------------------------------------------
 
 DN.Functions : L0.Library
@@ -154,18 +162,26 @@ DN.Diagram.MappedDiagram <R L0.IsWeaklyRelatedTo
 DN.MappedComponent <R L0.IsWeaklyRelatedTo
     L0.InverseOf DN.MappedFromElement <R L0.IsWeaklyRelatedTo
 
+DN.Diagram.trackChangesEnabled <R L0.HasProperty : SEL.GenericParameterType
+    L0.HasRange L0.Boolean
+    L0.HasLabel "Track changes"
+
+DN.Diagram.splitToMultipleEnabled <R L0.HasProperty : SEL.GenericParameterType
+    L0.HasRange L0.Boolean
+    L0.HasLabel "Split To Multiple Diagrams"
+
 DN.AddLayerToDNDiagramTemplate <T L0.Template
 
 DN.EPSG_4326 : DN.SpatialRefSystem
     L0.HasLabel "EPSG:4326"
     DN.HasSRID 4326
-    DN.HasSRTEXT _ : L0.String
-        @L0.loadString "epsg/EPSG_4326"
 
-DN.SpatialRefSystem <T L0.Entity
+DN.SpatialRefSystem <T L0.Property
+    L0.readOnly true
 
-DN.HasSpatialRefSystem <R L0.HasProperty
+DN.HasSpatialRefSystem <R L0.HasProperty : SEL.GenericParameterType
     L0.HasRange DN.SpatialRefSystem
+    L0.HasLabel "Spatial Reference System"
 
 DN.HasSRID <R L0.HasProperty
     L0.HasRange L0.Integer
@@ -201,18 +217,20 @@ DN.Mapping <T L0.Library
 DN.Functions.convertToValue : L0.ExternalValue
 
 DN.Mapping.Base <T L0.Value
+  >-- DN.Mapping.Id --> L0.String <R L0.HasProperty
+  >-- DN.Mapping.ComponentType --> STR.ComponentType <R L0.DependsOn
+  >-- DN.Mapping.Terminals --> DN.Mapping.TerminalPair <R L0.HasProperty
   @L0.assert L0.ConvertsToValueWith DN.Functions.convertToValue
 
 DN.Mapping.Terminal <T L0.Entity
+    L0.HasRange L0.String
 
-DN.Mapping.TerminalPair <T L0.Entity
+DN.Mapping.TerminalPair <T L0.Property
     >-- DN.Mapping.InputTerminal --> DN.Mapping.Terminal <R L0.HasProperty
     >-- DN.Mapping.OutputTerminal --> DN.Mapping.Terminal <R L0.HasProperty
 
 DN.Mapping.VertexMapping <T DN.Mapping.Base
     // Common
-    >-- DN.Mapping.Id --> L0.String <R L0.HasProperty
-    >-- DN.Mapping.ComponentType --> STR.ComponentType <R L0.DependsOn
     >-- DN.Mapping.VertexMapping.ElevationAttribute --> L0.String <R L0.HasProperty
     >-- DN.Mapping.VertexMapping.SupplyTemperatureAttribute --> L0.String <R L0.HasProperty
     >-- DN.Mapping.VertexMapping.ReturnTemperatureAttribute --> L0.String <R L0.HasProperty
@@ -222,7 +240,6 @@ DN.Mapping.VertexMapping <T DN.Mapping.Base
     >-- DN.Mapping.VertexMapping.DeltaTemperatureAttribute --> L0.String <R L0.HasProperty
     >-- DN.Mapping.VertexMapping.XAttribute --> L0.String <R L0.HasProperty
     >-- DN.Mapping.VertexMapping.YAttribute --> L0.String <R L0.HasProperty
-    >-- DN.Mapping.Terminals --> DN.Mapping.TerminalPair <R L0.HasProperty
     // Production
     >-- DN.Mapping.VertexMapping.dpAttribute --> L0.String <R L0.HasProperty
     >-- DN.Mapping.VertexMapping.dtAttribute --> L0.String <R L0.HasProperty
@@ -243,8 +260,6 @@ DN.Mapping.VertexMapping <T DN.Mapping.Base
     >-- DN.Mapping.VertexMapping.NominalMassFlowAttribute --> L0.String <R L0.HasProperty
 
 DN.Mapping.EdgeMapping <T DN.Mapping.Base
-    >-- DN.Mapping.Id
-    >-- DN.Mapping.ComponentType
     >-- DN.Mapping.EdgeMapping.LengthAttribute --> L0.String <R L0.HasProperty
     >-- DN.Mapping.EdgeMapping.DiameterAttribute --> L0.String <R L0.HasProperty
     >-- DN.Mapping.EdgeMapping.OuterDiameterAttribute --> L0.String <R L0.HasProperty
@@ -254,4 +269,25 @@ DN.Mapping.EdgeMapping <T DN.Mapping.Base
     >-- DN.Mapping.EdgeMapping.KSupplyAttribute --> L0.String <R L0.HasProperty
     >-- DN.Mapping.EdgeMapping.TGroundAttribute --> L0.String <R L0.HasProperty
     >-- DN.Mapping.EdgeMapping.ElevationAttribute --> L0.String <R L0.HasProperty
-    >-- DN.Mapping.Terminals
+
+
+// Allowed connection types
+DN.SupplyConnectionType <T STR.ConnectionType
+
+DN.SupplyInConnectionType : DN.SupplyConnectionType : STR.InputDirection
+    STR.SupportsDirection DN.SupplyOutConnectionType
+    STR.ConnectionType.isUserSelectable true
+
+DN.SupplyOutConnectionType : DN.SupplyConnectionType : STR.OutputDirection
+    STR.SupportsDirection DN.SupplyInConnectionType
+    STR.ConnectionType.isUserSelectable true
+
+DN.ReturnConnectionType <T STR.ConnectionType
+
+DN.ReturnInConnectionType : DN.ReturnConnectionType : STR.InputDirection
+    STR.SupportsDirection DN.ReturnOutConnectionType
+    STR.ConnectionType.isUserSelectable true
+
+DN.ReturnOutConnectionType : DN.ReturnConnectionType : STR.OutputDirection
+    STR.SupportsDirection DN.ReturnInConnectionType
+    STR.ConnectionType.isUserSelectable true