]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram.ontology/graph/DiagramConnections.pgraph
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.diagram.ontology / graph / DiagramConnections.pgraph
diff --git a/bundles/org.simantics.diagram.ontology/graph/DiagramConnections.pgraph b/bundles/org.simantics.diagram.ontology/graph/DiagramConnections.pgraph
new file mode 100644 (file)
index 0000000..246c2e3
--- /dev/null
@@ -0,0 +1,81 @@
+L0 = <http://www.simantics.org/Layer0-1.1>\r
+STR = <http://www.simantics.org/Structural-1.2>\r
+DIA = <http://www.simantics.org/Diagram-2.2>\r
+\r
+//// CONNECTION BRANCHING / ROUTING\r
+\r
+DIA.HasInverseAttachment <R L0.IsRelatedTo : L0.FunctionalRelation\r
+    @L0.symmetric\r
+    L0.HasDescription "Identifies the inversely directed connector attachment relation of a DIA.HasConnector relation. For example, DIA.HasPlainConnector is the inverse attachment relation of DIA.HasArrowConnector."\r
+\r
+DIA.HasConnector <R STR.IsConnectedTo <R L0.IsComposedOf\r
+    L0.InverseOf DIA.IsConnectorOf\r
+    L0.HasDomain DIA.Connection\r
+    --> DIA.Connector\r
+DIA.HasTailConnector <R DIA.HasConnector\r
+    L0.HasDescription "Identifies, where applicable, the beginning of the connection"\r
+    L0.InverseOf DIA.IsTailConnectorOf\r
+DIA.HasHeadConnector <R DIA.HasConnector\r
+    L0.HasDescription "Identifies, where applicable, the end of the connection"\r
+    L0.InverseOf DIA.IsHeadConnectorOf\r
+    DIA.HasInverseAttachment DIA.HasTailConnector\r
+DIA.HasPlainConnector <R DIA.HasTailConnector\r
+    L0.HasDescription "Identifies a connection end where no arrowhead is drawn."\r
+    L0.InverseOf DIA.IsPlainConnectorOf\r
+DIA.HasArrowConnector <R DIA.HasHeadConnector\r
+    L0.HasDescription "Identifies a connection end with an arrow."\r
+    L0.InverseOf DIA.IsArrowConnectorOf\r
+    DIA.HasInverseAttachment DIA.HasPlainConnector\r
+DIA.HasBranchPoint <R DIA.HasInteriorRouteNode\r
+    L0.InverseOf DIA.IsBranchPointOf\r
+    L0.HasDomain DIA.Connection\r
+    --> DIA.BranchPoint\r
+DIA.AreConnected <R L0.IsWeaklyRelatedTo\r
+    @L0.symmetric\r
+    // TODO L0.HasDomain DIA.Connector or DIA.BranchPoint\r
+    // TODO --> DIA.Connector or DIA.BranchPoint\r
+\r
+DIA.Connector <T STR.Connection : L0.Type\r
+// HN: removed, cannot be valid requirements\r
+    @L0.property DIA.AreConnected\r
+    @L0.property STR.Connects\r
+\r
+DIA.Connection <T DIA.Element : L0.Type\r
+    >-- DIA.HasTransform\r
+    @L0.property DIA.HasPlainConnector\r
+    @L0.property DIA.HasArrowConnector\r
+    @L0.property DIA.HasBranchPoint\r
+    @L0.property STR.HasConnectionType\r
+    @L0.property DIA.Routing\r
+\r
+DIA.BranchPoint <T DIA.InteriorRouteNode\r
+    @L0.property DIA.Horizontal\r
+    @L0.property DIA.Vertical\r
+    @L0.property DIA.AreConnected\r
+\r
+DIA.Horizontal\r
+    @L0.defTag \r
+DIA.Vertical\r
+    @L0.defTag\r
+\r
+DIA.RoutingRelation : L0.Relation\r
+DIA.Routing : DIA.RoutingRelation\r
+    @L0.tag L0.Abstract\r
+    @L0.defTag\r
+    L0.HasDescription "A relation meant to be inherited to create specific tags describing how a connection should be routed. The relation itself should be made adaptable to a routing strategy class org.simantics.g2d.routing.IRouter2. A connection can only have 0 to 1 Routing tags."\r
+DIA.LinearRouting <R DIA.Routing\r
+    @L0.symmetric\r
+    L0.HasLabel "Straight"\r
+    L0.HasDescription "Connection line segments will be routed with straight lines between terminals, route points and branch points."\r
+DIA.RightAngledRouting <R DIA.Routing\r
+    @L0.symmetric\r
+    L0.HasLabel "Right-angled"\r
+    L0.HasDescription "Connection line segments will be routed with x/y axis-aligned right-angled lines between so that the connection will is guaranteed to pass through each route and branch point."\r
+\r
+DIA.HasDefaultRouting <R L0.IsRelatedTo\r
+    L0.HasDomain STR.ConnectionType\r
+    --> DIA.RoutingRelation\r
+\r
+// NOTE: attach the diagram ontology default attachment relation to default structural modelling rules.\r
+STR.DefaultModelingRules\r
+    STR.HasAttachmentRelation DIA.HasPlainConnector\r