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>
5 //// CONNECTION BRANCHING / ROUTING
7 DIA.HasInverseAttachment <R L0.IsRelatedTo : L0.FunctionalRelation
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."
11 DIA.HasConnector <R STR.IsConnectedTo <R L0.IsComposedOf
12 L0.InverseOf DIA.IsConnectorOf
13 L0.HasDomain DIA.Connection
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
33 DIA.AreConnected <R L0.IsWeaklyRelatedTo
35 // TODO L0.HasDomain DIA.Connector or DIA.BranchPoint
36 // TODO --> DIA.Connector or DIA.BranchPoint
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
43 DIA.Connection <T DIA.Element : L0.Type
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
51 DIA.BranchPoint <T DIA.InteriorRouteNode
52 @L0.property DIA.Horizontal
53 @L0.property DIA.Vertical
54 @L0.property DIA.AreConnected
61 DIA.RoutingRelation : L0.Relation
62 DIA.Routing : DIA.RoutingRelation
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
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
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."
75 DIA.HasDefaultRouting <R L0.IsRelatedTo
76 L0.HasDomain STR.ConnectionType
77 --> DIA.RoutingRelation
79 // NOTE: attach the diagram ontology default attachment relation to default structural modelling rules.
80 STR.DefaultModelingRules
81 STR.HasAttachmentRelation DIA.HasPlainConnector