]> dreyeck.freedombox.rocks Git - topic-maps.git/blob - vendor/cxtm/tmcl/level-1/invalid/scope-required-occurrence-too-many.ctm
examples: explore project work through native Topic Maps (slice 22U)
[topic-maps.git] / vendor / cxtm / tmcl / level-1 / invalid / scope-required-occurrence-too-many.ctm
1
2 %prefix tmcl http://psi.topicmaps.org/tmcl/
3 %prefix tmdm http://psi.topicmaps.org/iso13250/model/
4
5 def has-occurrence($tt, $ot, $min, $max)
6 ?c isa tmcl:topic-occurrence-constraint;
7 tmcl:card-min: $min;
8 tmcl:card-max: $max.
9
10 tmcl:constrained-topic-type(tmcl:constraint : ?c, tmcl:constrained : $tt)
11 tmcl:constrained-statement(tmcl:constraint : ?c, tmcl:constrained : $ot)
12 end
13
14 def has-scope($st, $tt, $min, $max)
15 ?c isa tmcl:scope-constraint;
16 tmcl:card-min: $min;
17 tmcl:card-max: $max.
18
19 tmcl:constrained-statement(tmcl:constraint : ?c, tmcl:constrained : $st)
20 tmcl:allowed-scope(tmcl:allows : ?c, tmcl:allowed : $tt)
21 end
22
23 def requires-scope($tt, $st, $t, $min, $max)
24 ?c isa tmcl:scope-required-constraint;
25 tmcl:card-min: $min;
26 tmcl:card-max: $max.
27
28 tmcl:constrained-topic-type(tmcl:constraint : ?c, tmcl:constrained : $tt)
29 tmcl:constrained-statement(tmcl:constraint : ?c, tmcl:constrained : $st)
30 tmcl:required-scope(tmcl:constraint : ?c, tmcl:constrained : $t)
31 end
32
33 description isa tmcl:occurrence-type;
34 has-scope(language, 1, 1).
35
36 language isa tmcl:topic-type;
37 has-occurrence(description, 0, *);
38 requires-scope(description, english, 1, 1);
39 requires-scope(description, norwegian, 1, 1).
40
41 norwegian isa language;
42 description: "Very nice language" @ english;
43 description: "Flott språk" @ norwegian;
44 description: "Bedre enn nynorsk" @ norwegian.
45
46 english isa language;
47 description: "Very nice language" @ english;
48 description: "Flott språk" @ norwegian.