]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram.ontology/graph/DiagramConnections.pgraph
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.diagram.ontology / graph / DiagramConnections.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 STR = <http://www.simantics.org/Structural-1.2>
3 DIA = <http://www.simantics.org/Diagram-2.2>
4
5 //// CONNECTION BRANCHING / ROUTING
6
7 DIA.HasInverseAttachment <R L0.IsRelatedTo : L0.FunctionalRelation
8     @L0.symmetric
9     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."
10
11 DIA.HasConnector <R STR.IsConnectedTo <R L0.IsComposedOf
12     L0.InverseOf DIA.IsConnectorOf
13     L0.HasDomain DIA.Connection
14     --> DIA.Connector
15 DIA.HasTailConnector <R DIA.HasConnector
16     L0.HasDescription "Identifies, where applicable, the beginning of the connection"
17     L0.InverseOf DIA.IsTailConnectorOf
18 DIA.HasHeadConnector <R DIA.HasConnector
19     L0.HasDescription "Identifies, where applicable, the end of the connection"
20     L0.InverseOf DIA.IsHeadConnectorOf
21     DIA.HasInverseAttachment DIA.HasTailConnector
22 DIA.HasPlainConnector <R DIA.HasTailConnector
23     L0.HasDescription "Identifies a connection end where no arrowhead is drawn."
24     L0.InverseOf DIA.IsPlainConnectorOf
25 DIA.HasArrowConnector <R DIA.HasHeadConnector
26     L0.HasDescription "Identifies a connection end with an arrow."
27     L0.InverseOf DIA.IsArrowConnectorOf
28     DIA.HasInverseAttachment DIA.HasPlainConnector
29 DIA.HasBranchPoint <R DIA.HasInteriorRouteNode
30     L0.InverseOf DIA.IsBranchPointOf
31     L0.HasDomain DIA.Connection
32     --> DIA.BranchPoint
33 DIA.AreConnected <R L0.IsWeaklyRelatedTo
34     @L0.symmetric
35     // TODO L0.HasDomain DIA.Connector or DIA.BranchPoint
36     // TODO --> DIA.Connector or DIA.BranchPoint
37
38 DIA.Connector <T STR.Connection : L0.Type
39 // HN: removed, cannot be valid requirements
40     @L0.property DIA.AreConnected
41     @L0.property STR.Connects
42
43 DIA.Connection <T DIA.Element : L0.Type
44     >-- DIA.HasTransform
45     @L0.property DIA.HasPlainConnector
46     @L0.property DIA.HasArrowConnector
47     @L0.property DIA.HasBranchPoint
48     @L0.property STR.HasConnectionType
49     @L0.property DIA.Routing
50
51 DIA.BranchPoint <T DIA.InteriorRouteNode
52     @L0.property DIA.Horizontal
53     @L0.property DIA.Vertical
54     @L0.property DIA.AreConnected
55
56 DIA.Horizontal
57     @L0.defTag 
58 DIA.Vertical
59     @L0.defTag
60
61 DIA.RoutingRelation : L0.Relation
62 DIA.Routing : DIA.RoutingRelation
63     @L0.tag L0.Abstract
64     @L0.defTag
65     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."
66 DIA.LinearRouting <R DIA.Routing
67     @L0.symmetric
68     L0.HasLabel "Straight"
69     L0.HasDescription "Connection line segments will be routed with straight lines between terminals, route points and branch points."
70 DIA.RightAngledRouting <R DIA.Routing
71     @L0.symmetric
72     L0.HasLabel "Right-angled"
73     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."
74
75 DIA.HasDefaultRouting <R L0.IsRelatedTo
76     L0.HasDomain STR.ConnectionType
77     --> DIA.RoutingRelation
78
79 // NOTE: attach the diagram ontology default attachment relation to default structural modelling rules.
80 STR.DefaultModelingRules
81     STR.HasAttachmentRelation DIA.HasPlainConnector