1 %prefix tmcl http://psi.topicmaps.org/tmcl/
3 def role-combination($at, $rt, $tt, $ort, $ott)
4 ?c isa tmcl:role-combination-constraint.
5 tmcl:constrained-statement(tmcl:constraint: ?c, tmcl:constrained: $at)
6 tmcl:constrained-role(tmcl:constraint: ?c, tmcl:constrained: $rt)
7 tmcl:constrained-topic-type(tmcl:constraint: ?c, tmcl:constrained: $tt)
8 tmcl:other-constrained-role(tmcl:constraint: ?c, tmcl:constrained: $ort)
9 tmcl:other-constrained-topic-type(tmcl:constraint: ?c, tmcl:constrained: $ott)
12 def has-role($at, $rt, $min, $max)
13 ?c isa tmcl:association-role-constraint;
17 tmcl:constrained-statement(tmcl:constraint : ?c, tmcl:constrained : $at)
18 tmcl:constrained-role(tmcl:constraint : ?c, tmcl:constrained : $rt)
21 def plays-role($tt, $rt, $at, $min, $max)
22 ?c isa tmcl:topic-role-constraint;
26 tmcl:constrained-topic-type(tmcl:constraint : ?c, tmcl:constrained : $tt)
27 tmcl:constrained-statement(tmcl:constraint : ?c, tmcl:constrained : $at)
28 tmcl:constrained-role(tmcl:constraint : ?c, tmcl:constrained : $rt)
31 contained-in isa tmcl:association-type;
32 has-role(containee, 1, 1);
33 has-role(container, 1, 1);
34 role-combination(containee, city, container, province);
35 role-combination(containee, province, container, country);
36 role-combination(containee, country, container, continent).
38 continent isa tmcl:topic-type;
39 plays-role(container, contained-in, 0, *).
40 country isa tmcl:topic-type;
41 plays-role(container, contained-in, 0, *);
42 plays-role(containee, contained-in, 0, *).
43 province isa tmcl:topic-type;
44 plays-role(container, contained-in, 0, *);
45 plays-role(containee, contained-in, 0, *).
46 city isa tmcl:topic-type;
47 plays-role(containee, contained-in, 0, *).
49 contained-in(containee: oslo, container: europe)
54 containee isa tmcl:role-type.
55 container isa tmcl:role-type.