11standard library package Links {
2- doc
3- /*
4- * This package defines associations and features that are related to the typing of links.
5- */
2+ doc
3+ /*
4+ * This package defines associations and features that are related to the typing of links.
5+ */
66
7- private import Base::Anything;
8- private import Base::things;
9-
10- abstract assoc Link specializes Anything {
11- doc
12- /*
13- * Link is the most general association between two or more things.
14- */
7+ private import Base::Anything;
8+ private import Base::things;
9+
10+ abstract assoc Link specializes Anything {
11+ doc
12+ /*
13+ * Link is the most general association between two or more things.
14+ */
1515
16- readonly feature participant: Anything[2..*] nonunique ordered;
17- }
18-
19- assoc all BinaryLink specializes Link {
20- doc
21- /*
22- * BinaryLink is the most general binary association between exactly two things,
23- * nominally directed from source to target.
24- */
25-
26- feature participant: Anything[2] nonunique ordered redefines Link::participant;
27-
28- readonly end feature source: Anything[0..*] subsets participant;
29- readonly end feature target: Anything[0..*] subsets participant;
30- }
31-
32- assoc all SelfLink specializes BinaryLink {
33- doc
34- /*
35- * SelfLink is a binary association in which the things at the two ends are asserted
36- * to be the same.
37- */
38-
39- end feature thisThing: Anything[1] redefines source subsets sameThing, sameThing.self;
40- end feature sameThing: Anything[1] redefines target subsets thisThing;
41- }
42-
43- abstract feature links: Link[0..*] nonunique subsets things {
44- doc
45- /*
46- * links is the most general feature of links between individuals.
47- */
48- }
49-
50- abstract feature binaryLinks: BinaryLink[0..*] nonunique subsets links {
51- doc
52- /*
53- * binaryLinks is a specialization of links restricted to type BinaryLink.
54- */
55- }
56-
57- abstract feature selfLinks: SelfLink[0..*] nonunique subsets binaryLinks {
58- doc
59- /*
60- * selfLinks is a specialization of binaryLinks restricted to type SelfLink.
61- */
16+ readonly feature participant: Anything[2..*] nonunique ordered;
17+ }
18+
19+ assoc all BinaryLink specializes Link {
20+ doc
21+ /*
22+ * BinaryLink is the most general binary association between exactly two things,
23+ * nominally directed from source to target.
24+ */
25+
26+ feature participant: Anything[2] nonunique ordered redefines Link::participant;
27+
28+ readonly end feature source: Anything[0..*] nonunique subsets participant;
29+ readonly end feature target: Anything[0..*] nonunique subsets participant;
30+ }
31+
32+ assoc all SelfLink specializes BinaryLink {
33+ doc
34+ /*
35+ * SelfLink is a binary association in which the things at the two ends are asserted
36+ * to be the same.
37+ */
38+
39+ end feature thisThing: Anything[1] redefines source subsets sameThing, sameThing.self;
40+ end feature sameThing: Anything[1] redefines target subsets thisThing;
41+ }
42+
43+ abstract feature links: Link[0..*] nonunique subsets things {
44+ doc
45+ /*
46+ * links is the most general feature of links between individuals.
47+ */
48+ }
49+
50+ abstract feature binaryLinks: BinaryLink[0..*] nonunique subsets links {
51+ doc
52+ /*
53+ * binaryLinks is a specialization of links restricted to type BinaryLink.
54+ */
55+ }
56+
57+ abstract feature selfLinks: SelfLink[0..*] nonunique subsets binaryLinks {
58+ doc
59+ /*
60+ * selfLinks is a specialization of binaryLinks restricted to type SelfLink.
61+ */
62+
63+ end feature thisThing: Anything[1] redefines SelfLink::thisThing, binaryLinks::source;
64+ end feature sameThing: Anything[1] redefines SelfLink::sameThing, binaryLinks::target;
65+ }
6266
63- end feature thisThing: Anything[1] redefines SelfLink::thisThing, binaryLinks::source;
64- end feature sameThing: Anything[1] redefines SelfLink::sameThing, binaryLinks::target;
65- }
66-
6767}
0 commit comments