activefacts 0.8.6 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +33 -2
- data/README.rdoc +30 -36
- data/Rakefile +16 -20
- data/bin/afgen +17 -11
- data/bin/cql +313 -36
- data/download.html +43 -19
- data/examples/CQL/Address.cql +15 -15
- data/examples/CQL/Blog.cql +8 -8
- data/examples/CQL/CompanyDirectorEmployee.cql +6 -5
- data/examples/CQL/Death.cql +3 -3
- data/examples/CQL/Diplomacy.cql +48 -0
- data/examples/CQL/Genealogy.cql +41 -41
- data/examples/CQL/Insurance.cql +311 -0
- data/examples/CQL/JoinEquality.cql +35 -0
- data/examples/CQL/Marriage.cql +1 -1
- data/examples/CQL/Metamodel.cql +290 -185
- data/examples/CQL/MetamodelNext.cql +420 -0
- data/examples/CQL/Monogamy.cql +24 -0
- data/examples/CQL/MonthInSeason.cql +27 -0
- data/examples/CQL/Moon.cql +23 -0
- data/examples/CQL/MultiInheritance.cql +4 -4
- data/examples/CQL/NonRoleId.cql +14 -0
- data/examples/CQL/OddIdentifier.cql +18 -0
- data/examples/CQL/OilSupply.cql +24 -24
- data/examples/CQL/OneToOnes.cql +17 -0
- data/examples/CQL/Orienteering.cql +55 -55
- data/examples/CQL/OrienteeringER.cql +58 -0
- data/examples/CQL/PersonPlaysGame.cql +2 -2
- data/examples/CQL/RedundantDependency.cql +34 -0
- data/examples/CQL/SchoolActivities.cql +5 -5
- data/examples/CQL/SeparateSubtype.cql +28 -0
- data/examples/CQL/ServiceDirector.cql +283 -0
- data/examples/CQL/SimplestUnary.cql +2 -2
- data/examples/CQL/SubtypePI.cql +11 -11
- data/examples/CQL/Supervision.cql +38 -0
- data/examples/CQL/Tests.Test5.Load.cql +38 -0
- data/examples/CQL/WaiterTips.cql +33 -0
- data/examples/CQL/Warehousing.cql +55 -53
- data/examples/CQL/WindowInRoomInBldg.cql +9 -9
- data/examples/CQL/unit.cql +433 -544
- data/examples/index.html +314 -170
- data/examples/intro.html +6 -176
- data/examples/local.css +8 -4
- data/index.html +40 -25
- data/lib/activefacts/api/concept.rb +2 -2
- data/lib/activefacts/api/constellation.rb +4 -4
- data/lib/activefacts/api/instance.rb +2 -2
- data/lib/activefacts/api/instance_index.rb +4 -0
- data/lib/activefacts/api/numeric.rb +3 -1
- data/lib/activefacts/api/role.rb +1 -1
- data/lib/activefacts/api/standard_types.rb +23 -16
- data/lib/activefacts/api/support.rb +3 -1
- data/lib/activefacts/api/vocabulary.rb +4 -0
- data/lib/activefacts/cql/CQLParser.treetop +87 -39
- data/lib/activefacts/cql/Concepts.treetop +95 -69
- data/lib/activefacts/cql/Context.treetop +11 -2
- data/lib/activefacts/cql/Expressions.treetop +23 -59
- data/lib/activefacts/cql/FactTypes.treetop +141 -95
- data/lib/activefacts/cql/Language/English.treetop +33 -21
- data/lib/activefacts/cql/LexicalRules.treetop +6 -1
- data/lib/activefacts/cql/Terms.treetop +75 -26
- data/lib/activefacts/cql/ValueTypes.treetop +52 -54
- data/lib/activefacts/cql/compiler.rb +46 -1691
- data/lib/activefacts/cql/compiler/constraint.rb +602 -0
- data/lib/activefacts/cql/compiler/entity_type.rb +425 -0
- data/lib/activefacts/cql/compiler/fact.rb +300 -0
- data/lib/activefacts/cql/compiler/fact_type.rb +230 -0
- data/lib/activefacts/cql/compiler/reading.rb +832 -0
- data/lib/activefacts/cql/compiler/shared.rb +109 -0
- data/lib/activefacts/cql/compiler/value_type.rb +104 -0
- data/lib/activefacts/cql/parser.rb +132 -81
- data/lib/activefacts/generate/cql.rb +397 -274
- data/lib/activefacts/generate/oo.rb +13 -12
- data/lib/activefacts/generate/ordered.rb +107 -117
- data/lib/activefacts/generate/ruby.rb +34 -38
- data/lib/activefacts/generate/sql/mysql.rb +62 -45
- data/lib/activefacts/generate/sql/server.rb +59 -42
- data/lib/activefacts/input/cql.rb +6 -3
- data/lib/activefacts/input/orm.rb +991 -557
- data/lib/activefacts/persistence/columns.rb +16 -12
- data/lib/activefacts/persistence/foreignkey.rb +7 -4
- data/lib/activefacts/persistence/index.rb +3 -4
- data/lib/activefacts/persistence/reference.rb +5 -2
- data/lib/activefacts/support.rb +20 -14
- data/lib/activefacts/version.rb +1 -1
- data/lib/activefacts/vocabulary.rb +1 -0
- data/lib/activefacts/vocabulary/extensions.rb +328 -44
- data/lib/activefacts/vocabulary/metamodel.rb +145 -20
- data/lib/activefacts/vocabulary/verbaliser.rb +621 -0
- data/spec/absorption_spec.rb +4 -4
- data/spec/api/value_type.rb +1 -1
- data/spec/cql/context_spec.rb +45 -22
- data/spec/cql/deontic_spec.rb +88 -0
- data/spec/cql/matching_spec.rb +517 -0
- data/spec/cql/samples_spec.rb +88 -31
- data/spec/cql/unit_spec.rb +58 -37
- data/spec/cql_cql_spec.rb +12 -7
- data/spec/cql_mysql_spec.rb +3 -7
- data/spec/cql_parse_spec.rb +0 -4
- data/spec/cql_ruby_spec.rb +1 -4
- data/spec/cql_sql_spec.rb +5 -18
- data/spec/cql_symbol_tables_spec.rb +3 -0
- data/spec/cqldump_spec.rb +0 -2
- data/spec/helpers/array_matcher.rb +35 -0
- data/spec/helpers/ctrl_c_support.rb +52 -0
- data/spec/helpers/diff_matcher.rb +38 -0
- data/spec/helpers/file_matcher.rb +5 -3
- data/spec/helpers/string_matcher.rb +39 -0
- data/spec/helpers/test_parser.rb +13 -0
- data/spec/norma_cql_spec.rb +13 -5
- data/spec/norma_ruby_spec.rb +11 -3
- data/spec/{absorption_ruby_spec.rb → norma_ruby_sql_spec.rb} +37 -32
- data/spec/norma_sql_spec.rb +11 -5
- data/spec/norma_tables_spec.rb +33 -29
- data/spec/spec_helper.rb +4 -1
- data/status.html +92 -23
- metadata +102 -36
- data/lib/activefacts/generate/cql/html.rb +0 -403
@@ -0,0 +1,35 @@
|
|
1
|
+
vocabulary JoinEquality;
|
2
|
+
|
3
|
+
/*
|
4
|
+
* Value Types
|
5
|
+
*/
|
6
|
+
Event Id is written as Auto Counter;
|
7
|
+
Number is written as Unsigned Integer(16);
|
8
|
+
Reserve is written as String(20);
|
9
|
+
Row is written as Char(2);
|
10
|
+
Venue Id is written as Auto Counter;
|
11
|
+
|
12
|
+
/*
|
13
|
+
* Entity Types
|
14
|
+
*/
|
15
|
+
Event is identified by its Id;
|
16
|
+
|
17
|
+
Venue is identified by its Id [independent];
|
18
|
+
Event is held at one Venue;
|
19
|
+
|
20
|
+
Seat is identified by Venue and Reserve and Row and Number [independent] where
|
21
|
+
Seat is at one Venue,
|
22
|
+
Seat is in one Reserve,
|
23
|
+
Seat is in one Row,
|
24
|
+
Seat has one Number;
|
25
|
+
|
26
|
+
Ticket is identified by Event and Seat where
|
27
|
+
Ticket is for one Event,
|
28
|
+
Ticket is for one Seat;
|
29
|
+
|
30
|
+
/*
|
31
|
+
* Constraints:
|
32
|
+
*/
|
33
|
+
Ticket is for Seat that is at Venue
|
34
|
+
if and only if
|
35
|
+
Ticket is for Event that is held at Venue;
|
data/examples/CQL/Marriage.cql
CHANGED
data/examples/CQL/Metamodel.cql
CHANGED
@@ -3,117 +3,161 @@ vocabulary Metamodel;
|
|
3
3
|
/*
|
4
4
|
* Value Types
|
5
5
|
*/
|
6
|
-
Adjective is written as
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
6
|
+
Adjective is written as String(64);
|
7
|
+
Agent Name is written as String;
|
8
|
+
Assimilation is written as String restricted to {'partitioned', 'separate'};
|
9
|
+
Constraint Id is written as Auto Counter;
|
10
|
+
Context Note Id is written as Auto Counter;
|
11
|
+
Context Note Kind is written as String restricted to {'as_opposed_to', 'because', 'so_that', 'to_avoid'};
|
12
|
+
Date is written as Date;
|
13
|
+
Denominator is written as Unsigned Integer(32);
|
14
|
+
Discussion is written as String;
|
15
|
+
Display Role Names Setting is written as String restricted to {'false', 'true'};
|
16
|
+
Enforcement Code is written as String(16);
|
17
|
+
Ephemera URL is written as String;
|
18
|
+
Exponent is written as Signed Integer(16);
|
19
|
+
Fact Id is written as Auto Counter;
|
20
|
+
Fact Type Id is written as Auto Counter;
|
21
|
+
Frequency is written as Unsigned Integer(32);
|
22
|
+
Instance Id is written as Auto Counter;
|
23
|
+
Join Id is written as Auto Counter;
|
24
|
+
Length is written as Unsigned Integer(32);
|
25
|
+
Literal is written as String;
|
26
|
+
Name is written as String(64);
|
22
27
|
Numerator is written as Decimal;
|
23
28
|
Offset is written as Decimal;
|
24
|
-
Ordinal is written as
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
Scale is written as
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
Ordinal is written as Unsigned Integer(16);
|
30
|
+
Pronoun is written as String(20) restricted to {'feminine', 'masculine', 'neuter', 'personal'};
|
31
|
+
Ring Type is written as String;
|
32
|
+
Role Sequence Id is written as Auto Counter;
|
33
|
+
Rotation Setting is written as String restricted to {'left', 'right'};
|
34
|
+
Scale is written as Unsigned Integer(32);
|
35
|
+
Shape Id is written as Auto Counter;
|
36
|
+
Text is written as String(256);
|
37
|
+
Unit Id is written as Auto Counter;
|
38
|
+
X is written as Signed Integer(32);
|
39
|
+
Y is written as Signed Integer(32);
|
33
40
|
|
34
41
|
/*
|
35
42
|
* Entity Types
|
36
43
|
*/
|
44
|
+
Agent is identified by its Name;
|
45
|
+
|
37
46
|
Coefficient is identified by Numerator and Denominator and Coefficient is precise where
|
38
47
|
Coefficient has one Numerator,
|
39
48
|
Coefficient has one Denominator,
|
40
49
|
Coefficient is precise;
|
41
50
|
|
42
51
|
Constraint is identified by its Id;
|
43
|
-
Constraint requires at most one Enforcement,
|
44
|
-
Enforcement applies to Constraint;
|
45
52
|
Name is of Constraint,
|
46
53
|
Constraint is called at most one Name;
|
47
54
|
|
48
|
-
|
49
|
-
Constraint has
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
Discussion is for
|
55
|
+
Context Note is identified by its Id;
|
56
|
+
Constraint has Context Note,
|
57
|
+
Context Note applies to at most one Constraint;
|
58
|
+
Context Note has one Context Note Kind,
|
59
|
+
Context Note Kind is of Context Note;
|
60
|
+
Context Note has one Discussion,
|
61
|
+
Discussion is for Context Note;
|
62
|
+
|
63
|
+
Enforcement is identified by Constraint where
|
64
|
+
Constraint requires at most one Enforcement,
|
65
|
+
Enforcement applies to one Constraint;
|
66
|
+
Enforcement notifies at most one Agent;
|
67
|
+
Enforcement has one Enforcement Code,
|
68
|
+
Enforcement Code is of Enforcement;
|
55
69
|
|
56
70
|
Fact is identified by its Id;
|
57
71
|
|
58
|
-
|
59
|
-
Fact is of one
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
Instance is identified by its Id;
|
64
|
-
Instance objectifies at most one Fact;
|
72
|
+
Fact Type is identified by its Id;
|
73
|
+
Fact is of one Fact Type;
|
74
|
+
Fact Type has Context Note,
|
75
|
+
Context Note applies to at most one Fact Type;
|
65
76
|
|
66
|
-
|
77
|
+
Implicit Fact Type is a kind of Fact Type;
|
67
78
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
79
|
+
Instance is identified by its Id;
|
80
|
+
Instance objectifies at most one Fact,
|
81
|
+
Fact is objectified as at most one Instance;
|
82
|
+
|
83
|
+
Join is identified by its Id;
|
84
|
+
|
85
|
+
Join Node is identified by Join and Ordinal where
|
86
|
+
Join includes Join Node,
|
87
|
+
Join Node is in one Join,
|
88
|
+
Join Node has one Ordinal position;
|
89
|
+
|
90
|
+
Join Step is identified by input-Join Node and output-Join Node where
|
91
|
+
Join Step has one input-Join Node,
|
92
|
+
Join Step has one output-Join Node;
|
93
|
+
Join Step traverses one Fact Type;
|
94
|
+
is anti Join Step;
|
95
|
+
Join Step is outer;
|
96
|
+
|
97
|
+
Position is identified by X and Y where
|
98
|
+
Position is at one X,
|
99
|
+
Position is at one Y;
|
100
|
+
|
101
|
+
Presence Constraint is a kind of Constraint;
|
102
|
+
Presence Constraint has at most one max-Frequency restricted to {1..};
|
103
|
+
Presence Constraint has at most one min-Frequency restricted to {2..};
|
104
|
+
Presence Constraint is mandatory;
|
105
|
+
Presence Constraint is preferred identifier;
|
106
|
+
|
107
|
+
Reading is identified by Fact Type and Ordinal where
|
108
|
+
Fact Type has Reading,
|
109
|
+
Reading is for one Fact Type,
|
77
110
|
Reading is in one Ordinal position,
|
78
111
|
Ordinal reading for fact type is Reading;
|
79
112
|
Reading has one Text;
|
80
113
|
|
81
|
-
|
82
|
-
|
114
|
+
Ring Constraint is a kind of Constraint;
|
115
|
+
Ring Constraint is of one Ring Type;
|
83
116
|
|
84
117
|
Role is where
|
85
|
-
|
86
|
-
|
87
|
-
|
118
|
+
Fact Type has at least one Ordinal role;
|
119
|
+
Implicit Fact Type is implied by one Role,
|
120
|
+
Role implies at most one Implicit Fact Type;
|
121
|
+
Ring Constraint has at most one other-Role;
|
122
|
+
Ring Constraint has other-Role,
|
123
|
+
other-Role is of Ring Constraint;
|
124
|
+
Role is of Ring Constraint,
|
125
|
+
Ring Constraint has at most one Role;
|
88
126
|
Role has at most one role-Name,
|
89
127
|
role-Name is name of at least one Role;
|
90
|
-
other-Role is of RingConstraint,
|
91
|
-
RingConstraint has at most one other-Role;
|
92
128
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
129
|
+
Role Sequence is identified by its Id;
|
130
|
+
Join projects one Role Sequence;
|
131
|
+
Presence Constraint covers one Role Sequence;
|
132
|
+
Reading is in one Role Sequence,
|
133
|
+
Role Sequence is for Reading;
|
134
|
+
Role Sequence has unused dependency to force table in norma;
|
97
135
|
|
98
|
-
|
99
|
-
Instance plays
|
100
|
-
|
101
|
-
|
102
|
-
Fact includes at least one
|
103
|
-
|
136
|
+
Role Value is identified by Instance and Fact where
|
137
|
+
Instance plays Role Value,
|
138
|
+
Role Value is of one Instance,
|
139
|
+
Role Value fulfils one Fact,
|
140
|
+
Fact includes at least one Role Value;
|
141
|
+
Role Value is of one Role;
|
104
142
|
|
105
|
-
|
143
|
+
Set Constraint is a kind of Constraint;
|
106
144
|
|
107
|
-
|
108
|
-
|
109
|
-
|
145
|
+
Shape is identified by its Id;
|
146
|
+
Shape is at at most one Position;
|
147
|
+
Shape is expanded;
|
148
|
+
|
149
|
+
Subset Constraint is a kind of Set Constraint;
|
150
|
+
Subset Constraint covers one subset-Role Sequence;
|
151
|
+
Subset Constraint covers one superset-Role Sequence;
|
110
152
|
|
111
153
|
Unit is identified by its Id;
|
154
|
+
Ephemera URL provides Unit coefficient,
|
155
|
+
Unit uses coefficient from at most one Ephemera URL;
|
112
156
|
Name is of Unit,
|
113
157
|
Unit is called one Name;
|
114
158
|
Unit has at most one Coefficient;
|
115
159
|
Unit has at most one Offset;
|
116
|
-
Unit
|
160
|
+
Unit has at most one plural-Name;
|
117
161
|
Unit is fundamental;
|
118
162
|
|
119
163
|
Value is identified by Literal and Value is a string and Unit where
|
@@ -124,9 +168,9 @@ Value is identified by Literal and Value is a string and Unit where
|
|
124
168
|
Unit is of Value;
|
125
169
|
Instance has at most one Value;
|
126
170
|
|
127
|
-
|
128
|
-
Role has at most one role-
|
129
|
-
|
171
|
+
Value Constraint is a kind of Constraint;
|
172
|
+
Role has at most one role-Value Constraint,
|
173
|
+
Value Constraint applies to at most one Role;
|
130
174
|
|
131
175
|
Vocabulary is identified by Name where
|
132
176
|
Vocabulary is called one Name;
|
@@ -135,10 +179,11 @@ Vocabulary contains Constraint,
|
|
135
179
|
Vocabulary includes Unit,
|
136
180
|
Unit is in one Vocabulary;
|
137
181
|
|
138
|
-
Agreement is identified by
|
139
|
-
|
140
|
-
Agreement covers one
|
141
|
-
Agreement was on at most one Date
|
182
|
+
Agreement is identified by Context Note where
|
183
|
+
Context Note was added by at most one Agreement,
|
184
|
+
Agreement covers one Context Note;
|
185
|
+
Agreement was on at most one Date,
|
186
|
+
Date is of Agreement;
|
142
187
|
|
143
188
|
Bound is identified by Value and Bound is inclusive where
|
144
189
|
Bound has one Value,
|
@@ -149,29 +194,61 @@ Concept is identified by Vocabulary and Name where
|
|
149
194
|
Concept belongs to one Vocabulary,
|
150
195
|
Vocabulary contains Concept,
|
151
196
|
Concept is called one Name;
|
152
|
-
Concept has
|
153
|
-
|
197
|
+
Concept has Context Note,
|
198
|
+
Context Note applies to at most one Concept;
|
154
199
|
Concept uses at most one Pronoun;
|
155
200
|
Concept plays Role,
|
156
201
|
Role is played by one Concept;
|
157
202
|
Concept is independent;
|
158
203
|
Instance is of one Concept;
|
204
|
+
Join Node is for one Concept,
|
205
|
+
Concept is referenced in Join Node;
|
206
|
+
|
207
|
+
Constraint Shape is a kind of Shape;
|
208
|
+
Constraint Shape is for one Constraint;
|
159
209
|
|
160
|
-
|
161
|
-
|
162
|
-
|
210
|
+
Context According To is where
|
211
|
+
Context Note is according to Agent,
|
212
|
+
Agent claims Context Note;
|
213
|
+
Context According To was lodged on at most one Date;
|
163
214
|
|
164
|
-
|
165
|
-
Agreement was reached by
|
166
|
-
|
215
|
+
Context Agreed By is where
|
216
|
+
Agreement was reached by Agent,
|
217
|
+
Agent agreed on Agreement;
|
167
218
|
|
168
219
|
Derivation is where
|
169
|
-
Unit (as
|
220
|
+
Unit (as Derived Unit) is derived from base-Unit (as Base Unit) [acyclic, intransitive];
|
170
221
|
Derivation has at most one Exponent;
|
171
222
|
|
172
|
-
|
173
|
-
|
174
|
-
|
223
|
+
Diagram is identified by Vocabulary and Name where
|
224
|
+
Diagram is for one Vocabulary,
|
225
|
+
Vocabulary contains Diagram,
|
226
|
+
Diagram is called one Name,
|
227
|
+
Name is of Diagram;
|
228
|
+
Shape is in one Diagram,
|
229
|
+
Diagram includes Shape;
|
230
|
+
|
231
|
+
Entity Type is a kind of Concept;
|
232
|
+
Entity Type nests at most one Fact Type,
|
233
|
+
Fact Type is nested as at most one Entity Type;
|
234
|
+
|
235
|
+
Fact Type Shape is a kind of Shape;
|
236
|
+
Fact Type Shape has at most one Display Role Names Setting;
|
237
|
+
Fact Type Shape is for one Fact Type,
|
238
|
+
Fact Type has Fact Type Shape;
|
239
|
+
Fact Type Shape has at most one Rotation Setting;
|
240
|
+
|
241
|
+
Model Note Shape is a kind of Shape;
|
242
|
+
Model Note Shape is for one Context Note;
|
243
|
+
|
244
|
+
Object Type Shape is a kind of Shape;
|
245
|
+
Object Type Shape is for one Concept,
|
246
|
+
Concept has Object Type Shape;
|
247
|
+
Object Type Shape has expanded reference mode;
|
248
|
+
|
249
|
+
Objectified Fact Type Name Shape is a kind of Shape identified by Fact Type Shape where
|
250
|
+
Objectified Fact Type Name Shape is for one Fact Type Shape,
|
251
|
+
Fact Type Shape has at most one Objectified Fact Type Name Shape;
|
175
252
|
|
176
253
|
Population is identified by Vocabulary and Name where
|
177
254
|
Vocabulary includes Population,
|
@@ -182,112 +259,140 @@ Population includes Fact,
|
|
182
259
|
Fact belongs to one Population;
|
183
260
|
Population includes Instance,
|
184
261
|
Instance belongs to one Population;
|
185
|
-
Population includes
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
262
|
+
Population includes Role Value,
|
263
|
+
Role Value belongs to one Population;
|
264
|
+
|
265
|
+
Reading Shape is a kind of Shape identified by Fact Type Shape where
|
266
|
+
Fact Type Shape has at most one Reading Shape,
|
267
|
+
Reading Shape is for one Fact Type Shape;
|
268
|
+
Reading Shape is for one Reading,
|
269
|
+
Reading has Reading Shape;
|
270
|
+
|
271
|
+
Ring Constraint Shape is a kind of Constraint Shape;
|
272
|
+
Ring Constraint Shape is attached to one Fact Type;
|
273
|
+
|
274
|
+
Role Display is where
|
275
|
+
Fact Type Shape displays Role in Ordinal position,
|
276
|
+
Fact Type Shape displays in Ordinal position at most one Role;
|
277
|
+
|
278
|
+
Role Name Shape is a kind of Shape;
|
279
|
+
Role Name Shape is for one Role Display,
|
280
|
+
Role Display has at most one Role Name Shape;
|
281
|
+
|
282
|
+
Role Ref is where
|
283
|
+
Role Sequence in Ordinal position includes at most one Role,
|
284
|
+
Role is in Role Sequence in at most one Ordinal place,
|
285
|
+
Role Sequence includes Role in Ordinal place,
|
286
|
+
Role has Ordinal place in Role Sequence;
|
287
|
+
Role Ref connects to at most one Join Node,
|
288
|
+
Join Node includes Role Ref;
|
289
|
+
Role Ref has at most one leading-Adjective;
|
290
|
+
Role Ref has at most one trailing-Adjective;
|
291
|
+
|
292
|
+
Set Comparison Constraint is a kind of Set Constraint;
|
293
|
+
|
294
|
+
Set Comparison Roles is where
|
295
|
+
Set Comparison Constraint has in Ordinal position at most one Role Sequence,
|
296
|
+
Role Sequence is Ordinal in Set Comparison Constraint,
|
297
|
+
in Ordinal position Set Comparison Constraint has Role Sequence,
|
298
|
+
Set Comparison Constraint has Role Sequence in at most one Ordinal position;
|
299
|
+
|
300
|
+
Set Equality Constraint is a kind of Set Comparison Constraint;
|
301
|
+
|
302
|
+
Set Exclusion Constraint is a kind of Set Comparison Constraint;
|
303
|
+
Set Exclusion Constraint is mandatory;
|
304
|
+
|
305
|
+
Type Inheritance is a kind of Fact Type identified by Subtype and Supertype where
|
306
|
+
Entity Type (as Subtype) is subtype of super-Entity Type (as Supertype) [acyclic],
|
211
307
|
Supertype is supertype of Subtype;
|
212
|
-
Assimilation applies to
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
308
|
+
Assimilation applies to Type Inheritance,
|
309
|
+
Type Inheritance uses at most one Assimilation;
|
310
|
+
Type Inheritance provides identification;
|
311
|
+
|
312
|
+
Value Constraint Shape is a kind of Constraint Shape;
|
313
|
+
Role Display has at most one Value Constraint Shape,
|
314
|
+
Value Constraint Shape is for at most one Role Display;
|
315
|
+
Value Constraint Shape is for at most one Object Type Shape,
|
316
|
+
Object Type Shape has Value Constraint Shape;
|
317
|
+
|
318
|
+
Value Range is identified by minimum-Bound and maximum-Bound where
|
319
|
+
Value Range has at most one minimum-Bound,
|
320
|
+
Value Range has at most one maximum-Bound;
|
321
|
+
|
322
|
+
Value Type is a kind of Concept;
|
323
|
+
Value Type has at most one Length,
|
324
|
+
Length is of Value Type;
|
325
|
+
Value Type has at most one Scale,
|
326
|
+
Scale is of Value Type;
|
327
|
+
Value Type is of at most one Unit;
|
328
|
+
Value Type has at most one Value Constraint,
|
329
|
+
Value Constraint constrains at most one Value Type;
|
330
|
+
Value Type is subtype of at most one super-Value Type (as Supertype) [acyclic],
|
331
|
+
Supertype is supertype of Value Type;
|
332
|
+
Value Type is auto-assigned;
|
333
|
+
|
334
|
+
Allowed Range is where
|
335
|
+
Value Constraint allows at least one Value Range;
|
336
|
+
|
337
|
+
ImplicitBooleanValueType is a kind of Value Type;
|
239
338
|
|
240
339
|
Parameter is where
|
241
|
-
Name is a parameter of
|
242
|
-
|
340
|
+
Name is a parameter of Value Type,
|
341
|
+
Value Type has parameter called Name;
|
243
342
|
|
244
|
-
|
245
|
-
Value for Parameter applies to at most one
|
343
|
+
Param Value is where
|
344
|
+
Value for Parameter applies to at most one Value Type;
|
246
345
|
|
247
346
|
/*
|
248
347
|
* Constraints:
|
249
348
|
*/
|
250
|
-
either Concept is an
|
349
|
+
either Concept is an Entity Type or Concept is a Value Type but not both;
|
251
350
|
for each Constraint exactly one of these holds:
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
for each
|
256
|
-
|
257
|
-
|
258
|
-
|
351
|
+
Constraint is a Presence Constraint,
|
352
|
+
Constraint is a Set Constraint,
|
353
|
+
Constraint is a Ring Constraint;
|
354
|
+
for each Context Note exactly one of these holds:
|
355
|
+
Context Note applies to Concept,
|
356
|
+
Context Note applies to Fact Type,
|
357
|
+
Context Note applies to Constraint;
|
358
|
+
either Set Comparison Constraint is a Set Exclusion Constraint or Set Comparison Constraint is a Set Equality Constraint but not both;
|
359
|
+
either Set Constraint is a Set Comparison Constraint or Set Constraint is a Subset Constraint but not both;
|
360
|
+
either Unit uses coefficient from Ephemera URL or Unit has Coefficient but not both;
|
361
|
+
either Unit is fundamental or Unit is derived from base-Unit but not both;
|
362
|
+
either Value Constraint Shape is for Object Type Shape or Value Constraint Shape is for Role Display but not both;
|
363
|
+
either Value Constraint constrains Value Type or Value Constraint applies to Role but not both;
|
259
364
|
for each Instance at most one of these holds:
|
260
365
|
Instance has Value,
|
261
366
|
Instance objectifies Fact;
|
262
|
-
|
367
|
+
Role Value is of Instance that is of Concept
|
263
368
|
if and only if
|
264
|
-
|
265
|
-
|
369
|
+
Role Value is of Role that is played by Concept;
|
370
|
+
Role Value fulfils Fact that is of Fact Type
|
266
371
|
if and only if
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
each
|
286
|
-
|
287
|
-
either
|
372
|
+
Role Value is of Role (where Fact Type has Ordinal role);
|
373
|
+
Presence Constraint is preferred identifier
|
374
|
+
only if Presence Constraint has max Frequency;
|
375
|
+
Value Type has Scale
|
376
|
+
only if Value Type has Length;
|
377
|
+
either Agreement was reached by Agent or Agreement was on Date;
|
378
|
+
each combination Diagram, Position occurs at most one time in
|
379
|
+
Shape is in Diagram,
|
380
|
+
Shape is at Position;
|
381
|
+
each combination Entity Type, Type Inheritance occurs at most one time in
|
382
|
+
Entity Type is subtype of super Entity Type,
|
383
|
+
Type Inheritance provides identification;
|
384
|
+
each Presence Constraint occurs at least one time in
|
385
|
+
Presence Constraint has min Frequency,
|
386
|
+
Presence Constraint has max Frequency,
|
387
|
+
Presence Constraint is mandatory;
|
388
|
+
each Role Sequence occurs at least one time in
|
389
|
+
Role Sequence in Ordinal position includes Role;
|
390
|
+
each Set Comparison Constraint occurs at least 2 times in
|
391
|
+
Set Comparison Constraint has in Ordinal position Role Sequence;
|
392
|
+
either Value Range has minimum Bound or Value Range has maximum Bound;
|
288
393
|
each combination Vocabulary, Name occurs at most one time in
|
289
|
-
|
290
|
-
|
394
|
+
Constraint belongs to Vocabulary,
|
395
|
+
Constraint is called Name;
|
291
396
|
each combination Vocabulary, Name occurs at most one time in
|
292
|
-
|
293
|
-
|
397
|
+
Unit is in Vocabulary,
|
398
|
+
Unit is called Name;
|