activefacts-metamodel 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a373c9248f7d4909324761e8cc3f8432247c2420
4
+ data.tar.gz: ada7671d2de7fe53bba0df87e5fdc5690f4d2997
5
+ SHA512:
6
+ metadata.gz: 6efe90513d9166c47c33d6e8c7d84c89df3ef205ec734041b931cc483560c8a00e2224e023627769e7b94cfe95e2e7d67051397ce5b350aa27766498c5caff25
7
+ data.tar.gz: cf8cb38c2a799c00ffbd3107f85385eba7c10248eca6fac769ba80f958276bb15f1c0f8b3fba3c47dbb3ba304e759e59644827e90ff0997d3b035bec1e82c763
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ bin
11
+ *.swp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.5
4
+ before_install: gem install bundler -v 1.10.0.rc
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in activefacts-metamodel.gemspec
4
+ gemspec
5
+ if ENV['PWD'] =~ %r{Users/cjh/work/activefacts}
6
+ gem 'activefacts', path: '/Users/cjh/work/activefacts-api'
7
+ # gem 'activefacts', git: 'git://github.com/cjheath/activefacts-api.git'
8
+ else
9
+ gem 'activefacts-api'
10
+ end
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Clifford Heath
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,34 @@
1
+ # ActiveFacts::Metamodel
2
+
3
+ Core meta-model for fact-based model (schema).
4
+
5
+ This gem provides the core representations for the Fact Modeling tools of ActiveFacts.
6
+
7
+ ## Installation
8
+
9
+ Install via the activefacts gem bundle, or add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'activefacts-metamodel'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install activefacts-metamodel
22
+
23
+ ## Usage
24
+
25
+ This gem is only useful via the thngs that build on it.
26
+ Install activefacts to learn more.
27
+
28
+ ## Contributing
29
+
30
+ Bug reports and pull requests are welcome on GitHub at https://github.com/cjheath/activefacts-metamodel
31
+
32
+ ## License
33
+
34
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'activefacts/metamodel/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "activefacts-metamodel"
8
+ spec.version = ActiveFacts::Metamodel::VERSION
9
+ spec.authors = ["Clifford Heath"]
10
+ spec.email = ["clifford.heath@gmail.com"]
11
+
12
+ spec.summary = %q{Core meta-model for fact-based models (schema)}
13
+ spec.description = %q{
14
+ Core meta-model for fact-based models (schema).
15
+ This gem provides the core representations for the Fact Modeling tools of ActiveFacts.
16
+ }
17
+ spec.homepage = "https://github.com/cjheath/activefacts-metamodel"
18
+ spec.license = "MIT"
19
+
20
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.10.a"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec"
28
+
29
+ spec.add_runtime_dependency(%q<activefacts-api>, [">= 1.8.1", "~> 1.8"])
30
+ end
@@ -0,0 +1,567 @@
1
+ vocabulary Metamodel;
2
+
3
+ /*
4
+ * Value Types
5
+ */
6
+ Adjective is written as String(64);
7
+ Agent Name is written as String;
8
+ Aggregate Code is written as String(32);
9
+ Annotation is written as String;
10
+ Assimilation is written as String restricted to {'absorbed', 'partitioned', 'separate'};
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
+ Frequency is written as Unsigned Integer(32);
20
+ Guid is written as Guid auto-assigned at assert;
21
+ Implication Rule Name is written as String;
22
+ Length is written as Unsigned Integer(32);
23
+ Literal is written as String;
24
+ Name is written as String(64);
25
+ Numerator is written as Decimal;
26
+ Offset is written as Decimal;
27
+ Ordinal is written as Unsigned Integer(16);
28
+ Pronoun is written as String(20) restricted to {'feminine', 'masculine', 'neuter', 'personal'};
29
+ Regular Expression is written as String;
30
+ Ring Type is written as String;
31
+ Rotation Setting is written as String restricted to {'left', 'right'};
32
+ Scale is written as Unsigned Integer(32);
33
+ Subscript is written as Unsigned Integer(16);
34
+ Text is written as String(256);
35
+ Transaction Phase is written as String restricted to {'assert', 'commit'};
36
+ X is written as Signed Integer(32);
37
+ Y is written as Signed Integer(32);
38
+
39
+ /*
40
+ * Entity Types
41
+ */
42
+ Agent is identified by its Name;
43
+
44
+ Aggregate is identified by its Code;
45
+
46
+ Alternative Set is identified by Guid where
47
+ Alternative Set has one Guid,
48
+ Guid is of at most one Alternative Set;
49
+ Alternative Set members are exclusive;
50
+
51
+ Coefficient is identified by Numerator and Denominator and Coefficient is precise where
52
+ Coefficient has one Numerator,
53
+ Coefficient has one Denominator,
54
+ Coefficient is precise;
55
+
56
+ Concept is identified by Guid where
57
+ Concept has one Guid,
58
+ Guid is of at most one Concept;
59
+
60
+ Concept Annotation is where
61
+ Concept has mapping-Annotation,
62
+ Annotation applies to Concept;
63
+
64
+ Constraint [separate] is identified by Concept where
65
+ Constraint is an instance of one Concept;
66
+ Name is of Constraint,
67
+ Constraint is called at most one Name;
68
+
69
+ Context Note is identified by Concept where
70
+ Context Note is an instance of one Concept;
71
+ Context Note has one Context Note Kind,
72
+ Context Note Kind is of Context Note;
73
+ Context Note has one Discussion,
74
+ Discussion is for Context Note;
75
+ Context Note applies to at most one relevant-Concept,
76
+ Concept has Context Note;
77
+
78
+ Enforcement is identified by Constraint where
79
+ Constraint requires at most one Enforcement,
80
+ Enforcement applies to one Constraint;
81
+ Enforcement notifies at most one Agent;
82
+ Enforcement has one Enforcement Code,
83
+ Enforcement Code is of Enforcement;
84
+
85
+ Fact is identified by Concept where
86
+ Fact is an instance of one Concept;
87
+
88
+ Fact Type is independent identified by Concept where
89
+ Fact Type is an instance of one Concept;
90
+ Fact is of one Fact Type;
91
+
92
+ Implication Rule is identified by its Name;
93
+ Concept is implied by at most one Implication Rule;
94
+
95
+ Instance is identified by Concept where
96
+ Instance is an instance of one Concept;
97
+ Instance objectifies at most one Fact,
98
+ Fact is objectified as at most one Instance;
99
+
100
+ Link Fact Type is a kind of Fact Type;
101
+
102
+ Location is identified by X and Y where
103
+ Location is at one X,
104
+ Location is at one Y;
105
+
106
+ Presence Constraint is a kind of Constraint;
107
+ Presence Constraint has at most one max-Frequency restricted to {1..};
108
+ Presence Constraint has at most one min-Frequency restricted to {2..};
109
+ Presence Constraint is mandatory;
110
+ Presence Constraint is preferred identifier;
111
+
112
+ Query is identified by Concept where
113
+ Query is an instance of one Concept;
114
+
115
+ Reading is identified by Fact Type and Ordinal where
116
+ Fact Type has Reading,
117
+ Reading is for one Fact Type,
118
+ Reading is in one Ordinal position,
119
+ Ordinal reading for fact type is Reading;
120
+ Reading has one Text;
121
+ Reading is negative;
122
+
123
+ Ring Constraint is a kind of Constraint;
124
+ Ring Constraint is of one Ring Type;
125
+
126
+ Role is identified by Fact Type and Ordinal where
127
+ Role belongs to one Fact Type,
128
+ Fact Type contains Role,
129
+ Role fills one Ordinal,
130
+ Ordinal applies to Role;
131
+ Link Fact Type has one implying-Role,
132
+ implying-Role implies at most one Link Fact Type;
133
+ Ring Constraint has at most one other-Role,
134
+ other-Role is of Ring Constraint;
135
+ Role is an instance of one Concept;
136
+ Role is of Ring Constraint; // Avoid ambiguity; this is a new fact type
137
+ Role is of Ring Constraint,
138
+ Ring Constraint has at most one Role;
139
+ Role has at most one role-Name,
140
+ role-Name is name of at least one Role;
141
+
142
+ Role Sequence is identified by Guid where
143
+ Role Sequence has one Guid,
144
+ Guid is of at most one Role Sequence;
145
+ Presence Constraint covers one Role Sequence;
146
+ Reading is in one Role Sequence,
147
+ Role Sequence is for Reading;
148
+ Role Sequence has unused dependency to force table in norma;
149
+
150
+ Role Value is identified by Fact and Role where
151
+ Role Value fulfils one Fact,
152
+ Fact includes at least one Role Value,
153
+ Role Value is of one Role;
154
+ Instance plays Role Value,
155
+ Role Value is of one Instance;
156
+
157
+ Set Constraint is a kind of Constraint;
158
+
159
+ Shape is identified by Guid where
160
+ Shape has one Guid,
161
+ Guid is of at most one Shape;
162
+ Shape is at at most one Location;
163
+ Shape is expanded;
164
+
165
+ Step is identified by Guid where
166
+ Step has one Guid,
167
+ Guid is of at most one Step;
168
+ Step falls under at most one Alternative Set,
169
+ Alternative Set covers at least one Step;
170
+ Step specifies one Fact Type,
171
+ Fact Type directs Step;
172
+ Step is disallowed;
173
+ Step is optional;
174
+
175
+ Subset Constraint is a kind of Set Constraint;
176
+ Subset Constraint covers one subset-Role Sequence;
177
+ Subset Constraint covers one superset-Role Sequence;
178
+
179
+ Topic is identified by topic-Name where
180
+ Topic has one topic-Name,
181
+ topic-Name is of at most one Topic;
182
+ Concept belongs to at most one Topic,
183
+ Topic contains Concept;
184
+
185
+ Unit is identified by Concept where
186
+ Unit is an instance of one Concept;
187
+ Ephemera URL provides Unit coefficient,
188
+ Unit uses coefficient from at most one Ephemera URL;
189
+ Name is of at most one Unit,
190
+ Unit is called one Name;
191
+ Unit has at most one Coefficient;
192
+ Unit has at most one Offset;
193
+ Unit (as Plural Named Unit) has plural-Name; // Avoid ambiguity; this is a new fact type
194
+ Unit (as Plural Named Unit) has at most one plural-Name,
195
+ plural-Name is of at most one Plural Named Unit;
196
+ Unit is fundamental;
197
+
198
+ Value is identified by Literal and Value is literal string and Unit where
199
+ Value is represented by one Literal,
200
+ Literal represents Value,
201
+ Value is literal string,
202
+ Value is in at most one Unit,
203
+ Unit is of Value;
204
+ Instance has at most one Value;
205
+
206
+ Value Constraint is a kind of Constraint;
207
+ Role has at most one role-Value Constraint,
208
+ Value Constraint applies to at most one Role;
209
+ Value Constraint requires matching at most one Regular Expression;
210
+
211
+ Variable is identified by Query and Ordinal where
212
+ Query includes at least one Variable,
213
+ Variable is in one Query,
214
+ Variable has one Ordinal position;
215
+ Variable projects at most one Role (as Projection),
216
+ Projection is projected from at most one Variable;
217
+ Variable (as Objectification Variable) matches nesting over at most one Step,
218
+ Step nests as at most one Objectification Variable;
219
+ Variable has at most one Subscript,
220
+ Subscript is of Variable;
221
+ Variable is bound to at most one Value;
222
+ Variable has at most one role-Name,
223
+ Name is of Variable;
224
+
225
+ Vocabulary is identified by Name where
226
+ Vocabulary is called one Name;
227
+ Vocabulary contains Constraint,
228
+ Constraint belongs to at most one Vocabulary;
229
+ Vocabulary includes Unit,
230
+ Unit is in one Vocabulary;
231
+
232
+ Aggregation is where
233
+ Variable is bound to Aggregate over aggregated-Variable,
234
+ Aggregate of aggregated-Variable is bound as one Variable;
235
+
236
+ Agreement is identified by Context Note where
237
+ Context Note was added by at most one Agreement,
238
+ Agreement covers one Context Note;
239
+ Agreement was on at most one Date,
240
+ Date is of Agreement;
241
+
242
+ Bound is identified by Value and Bound is inclusive where
243
+ Bound has one Value,
244
+ Value is of at least one Bound,
245
+ Bound is inclusive;
246
+
247
+ Constraint Shape is a kind of Shape;
248
+ Constraint Shape is for one Constraint;
249
+
250
+ Context According To is where
251
+ Context Note is according to Agent,
252
+ Agent claims Context Note;
253
+ Context According To was lodged on at most one Date;
254
+
255
+ Context Agreed By is where
256
+ Agreement was reached by Agent,
257
+ Agent agreed on Agreement;
258
+
259
+ Derivation is where
260
+ Unit (as Derived Unit) is derived from base-Unit (as Base Unit) [acyclic, intransitive];
261
+ Derivation has at most one Exponent;
262
+
263
+ Diagram is identified by Vocabulary and Name where
264
+ Diagram is for one Vocabulary,
265
+ Vocabulary contains Diagram,
266
+ Diagram is called one Name,
267
+ Name is of Diagram;
268
+
269
+ Fact Type Shape is a kind of Shape;
270
+ Fact Type Shape has at most one Display Role Names Setting;
271
+ Fact Type Shape is for one Fact Type,
272
+ Fact Type has Fact Type Shape;
273
+ Fact Type Shape has at most one Rotation Setting;
274
+
275
+ Model Note Shape is a kind of Shape;
276
+ Model Note Shape is for one Context Note;
277
+
278
+ ORM Diagram is a kind of Diagram;
279
+ Shape is in one ORM Diagram,
280
+ ORM Diagram includes Shape;
281
+
282
+ Object Type is identified by Vocabulary and Name where
283
+ Object Type belongs to one Vocabulary,
284
+ Object Type is called one Name;
285
+ Instance is of one Object Type;
286
+ Object Type is an instance of one Concept;
287
+ Object Type uses at most one Pronoun;
288
+ Object Type plays Role,
289
+ Role is played by one Object Type;
290
+ Object Type is independent;
291
+ Variable is for one Object Type,
292
+ Object Type is referenced in Variable;
293
+
294
+ Object Type Shape is a kind of Shape;
295
+ Object Type Shape is for one Object Type,
296
+ Object Type has Object Type Shape;
297
+ Object Type Shape has expanded reference mode;
298
+
299
+ Objectified Fact Type Name Shape is a kind of Shape;
300
+ Objectified Fact Type Name Shape is for one Fact Type Shape,
301
+ Fact Type Shape has at most one Objectified Fact Type Name Shape;
302
+
303
+ Play is where
304
+ Variable is restricted by Role of Step,
305
+ Step contains Role restricting one Variable;
306
+ Play is input;
307
+
308
+ Population is identified by Vocabulary and Name where
309
+ Vocabulary includes Population,
310
+ Population belongs to at most one Vocabulary,
311
+ Population has one Name,
312
+ Name is of Population;
313
+ Population is an instance of one Concept;
314
+ Population includes Fact,
315
+ Fact belongs to one Population;
316
+ Population includes Instance,
317
+ Instance belongs to one Population;
318
+ Population includes Role Value,
319
+ Role Value belongs to one Population;
320
+
321
+ Reading Shape is a kind of Shape;
322
+ Fact Type Shape has at most one Reading Shape,
323
+ Reading Shape is for one Fact Type Shape;
324
+ Reading Shape is for one Reading,
325
+ Reading has Reading Shape;
326
+
327
+ Ring Constraint Shape is a kind of Constraint Shape;
328
+ Ring Constraint Shape is attached to one Fact Type Shape;
329
+
330
+ Role Display is where
331
+ Fact Type Shape displays Role in Ordinal position,
332
+ Fact Type Shape displays in Ordinal position one Role;
333
+
334
+ Role Name Shape is a kind of Shape;
335
+ Role Name Shape is for one Role Display,
336
+ Role Display has at most one Role Name Shape;
337
+
338
+ Role Ref is where
339
+ Role Sequence in Ordinal position includes one Role,
340
+ Role is in Role Sequence in one Ordinal place,
341
+ Role Sequence includes Role in Ordinal place,
342
+ Role has Ordinal place in Role Sequence;
343
+ Play projects at most one Role Ref,
344
+ Role Ref is projected from at most one Play;
345
+ Role Ref has at most one leading-Adjective;
346
+ Role Ref has at most one trailing-Adjective;
347
+
348
+ Set Comparison Constraint is a kind of Set Constraint;
349
+
350
+ Set Comparison Roles is where
351
+ Set Comparison Constraint has in Ordinal position one Role Sequence,
352
+ Role Sequence is Ordinal in Set Comparison Constraint,
353
+ in Ordinal position Set Comparison Constraint has Role Sequence,
354
+ Set Comparison Constraint has Role Sequence in one Ordinal position;
355
+
356
+ Set Equality Constraint is a kind of Set Comparison Constraint;
357
+
358
+ Set Exclusion Constraint is a kind of Set Comparison Constraint;
359
+ Set Exclusion Constraint is mandatory;
360
+
361
+ Value Constraint Shape is a kind of Constraint Shape;
362
+ Role Display has at most one Value Constraint Shape,
363
+ Value Constraint Shape is for at most one Role Display;
364
+ Value Constraint Shape is for at most one Object Type Shape,
365
+ Object Type Shape has Value Constraint Shape;
366
+
367
+ Value Range is identified by minimum-Bound and maximum-Bound where
368
+ Value Range has at most one minimum-Bound,
369
+ Value Range has at most one maximum-Bound;
370
+
371
+ Allowed Range is where
372
+ Value Constraint allows Value Range;
373
+
374
+ Domain Object Type is a kind of Object Type;
375
+
376
+ Entity Type is a kind of Domain Object Type;
377
+ Entity Type nests at most one Fact Type,
378
+ Fact Type is nested as at most one Entity Type;
379
+
380
+ Type Inheritance is a kind of Fact Type identified by Subtype and Supertype where
381
+ Entity Type (as Subtype) is subtype of super-Entity Type (as Supertype) [acyclic, intransitive],
382
+ Supertype is supertype of Subtype;
383
+ Assimilation applies to Type Inheritance,
384
+ Type Inheritance uses at most one Assimilation;
385
+ Type Inheritance provides identification;
386
+
387
+ Value Type is a kind of Domain Object Type;
388
+ Value is of one Value Type,
389
+ Value Type has Value;
390
+ Value Type has at most one Length,
391
+ Length is of Value Type;
392
+ Value Type has at most one Scale,
393
+ Scale is of Value Type;
394
+ Value Type is auto-assigned at at most one Transaction Phase;
395
+ Value Type is of at most one Unit;
396
+ Value Type has at most one Value Constraint,
397
+ Value Constraint constrains at most one Value Type;
398
+ Value Type is subtype of at most one super-Value Type (as Supertype) [acyclic, transitive],
399
+ Supertype is supertype of Value Type;
400
+
401
+ Value Type Parameter is where
402
+ Value Type has facet called Name,
403
+ Name is a facet of Value Type;
404
+ Value Type Parameter requires value of one facet-Value Type;
405
+
406
+ Value Type Parameter Restriction is where
407
+ Value Type receives Value Type Parameter,
408
+ Value Type Parameter applies to Value Type;
409
+ Value Type Parameter Restriction has one Value;
410
+
411
+ Implicit Boolean Value Type is a kind of Value Type;
412
+
413
+ /*
414
+ * Constraints:
415
+ */
416
+ for each Concept exactly one of these holds:
417
+ Object Type is an instance of Concept,
418
+ Fact Type is an instance of Concept,
419
+ Role is an instance of Concept,
420
+ Constraint is an instance of Concept,
421
+ Context Note is an instance of Concept,
422
+ Unit is an instance of Concept,
423
+ Instance is an instance of Concept,
424
+ Fact is an instance of Concept,
425
+ Population is an instance of Concept,
426
+ Query is an instance of Concept;
427
+ for each Constraint exactly one of these holds:
428
+ Constraint is a Set Constraint,
429
+ Constraint is a Presence Constraint,
430
+ Constraint is a Ring Constraint,
431
+ Constraint is a Value Constraint;
432
+ either Domain Object Type is a Value Type or Domain Object Type is an Entity Type but not both;
433
+ for each Role Sequence exactly one of these holds:
434
+ Role Sequence is for Reading,
435
+ Presence Constraint covers Role Sequence,
436
+ Subset Constraint (1) covers subset-Role Sequence,
437
+ Subset Constraint (2) covers superset-Role Sequence,
438
+ Role Sequence is Ordinal in Set Comparison Constraint;
439
+ either Set Comparison Constraint is a Set Exclusion Constraint or Set Comparison Constraint is a Set Equality Constraint but not both;
440
+ either Set Constraint is a Set Comparison Constraint or Set Constraint is a Subset Constraint but not both;
441
+ for each Shape exactly one of these holds:
442
+ Shape is an Object Type Shape,
443
+ Shape is a Fact Type Shape,
444
+ Shape is a Constraint Shape,
445
+ Shape is an Objectified Fact Type Name Shape,
446
+ Shape is a Reading Shape,
447
+ Shape is a Role Name Shape,
448
+ Shape is a Model Note Shape;
449
+ either Unit uses coefficient from Ephemera URL or Unit has Coefficient but not both;
450
+ either Unit is fundamental or Unit is derived from base-Unit but not both;
451
+ either Value Constraint Shape is for Object Type Shape or Value Constraint Shape is for Role Display but not both;
452
+ either Value Constraint allows Value Range or Value Constraint requires matching Regular Expression but not both;
453
+ either Value Constraint constrains Value Type or Value Constraint applies to Role but not both;
454
+ for each Instance at most one of these holds:
455
+ Instance has Value,
456
+ Instance objectifies Fact;
457
+ Role Value is of Instance that is of Object Type
458
+ if and only if
459
+ Role Value is of Role that is played by Object Type;
460
+ Role Value fulfils Fact that is of Fact Type
461
+ if and only if
462
+ Role Value is of Role that belongs to Fact Type;
463
+ Step specifies Fact Type that contains Role
464
+ if and only if
465
+ Step contains Role restricting Variable;
466
+ Variable is for Object Type that plays Role
467
+ if and only if
468
+ Variable is restricted by Role of Step;
469
+ Presence Constraint is preferred identifier
470
+ only if Presence Constraint has max Frequency;
471
+ Value Type has Scale
472
+ only if Value Type has Length;
473
+ Variable matches nesting over Step
474
+ only if Variable is for Object Type and Step specifies Fact Type;
475
+ either Agreement was reached by Agent or Agreement was on Date;
476
+ each Concept occurs at most one time in
477
+ Object Type is an instance of Concept;
478
+ each Concept occurs at most one time in
479
+ Population is an instance of Concept;
480
+ each Concept occurs at most one time in
481
+ Role is an instance of Concept;
482
+ each combination Entity Type(1), Type Inheritance occurs at most one time in
483
+ Entity Type(1) is subtype of super Entity Type(2),
484
+ Type Inheritance provides identification;
485
+ each combination ORM Diagram, Location occurs at most one time in
486
+ Shape is in ORM Diagram,
487
+ Shape is at Location;
488
+ each Presence Constraint occurs at least one time in
489
+ Presence Constraint has min Frequency(2),
490
+ Presence Constraint has max Frequency(1),
491
+ Presence Constraint is mandatory;
492
+ each Role Sequence occurs at least one time in
493
+ Role Sequence in Ordinal position includes Role;
494
+ each Set Comparison Constraint occurs at least 2 times in
495
+ Set Comparison Constraint has in Ordinal position Role Sequence;
496
+ either Value Range has minimum Bound(2) or Value Range has maximum Bound(1);
497
+ each combination Vocabulary, Name occurs at most one time in
498
+ Constraint belongs to Vocabulary,
499
+ Constraint is called Name;
500
+ each combination Vocabulary, Name occurs at most one time in
501
+ Unit is in Vocabulary,
502
+ Unit is called Name;
503
+
504
+ /*
505
+ * Compositions
506
+ */
507
+ Component is identified by Guid where
508
+ Component has one Guid,
509
+ Guid is of at most one Component;
510
+ Component projects at most one Name;
511
+
512
+ Composition is identified by Guid where
513
+ Composition has one Guid,
514
+ Guid is of at most one Composition;
515
+ Composition is called one Name,
516
+ Name is of at most one Composition;
517
+
518
+ Discriminator is a kind of Component;
519
+
520
+ Indicator is a kind of Component;
521
+ Indicator indicates one Role played;
522
+
523
+ Mapping is a kind of Component;
524
+ Mapping contains Component (as Member) [acyclic, stronglyintransitive],
525
+ Member belongs to at most one parent-Mapping;
526
+ Mapping represents one Object Type;
527
+
528
+ Nesting is a kind of Mapping;
529
+
530
+ Absorption is a kind of Mapping;
531
+ Absorption traverses to one child-Role;
532
+ Absorption is nested under at most one index-Role;
533
+ Absorption traverses from one parent-Role;
534
+ Absorption flattens;
535
+
536
+ Composite is identified by Mapping where
537
+ Mapping projects at most one Composite,
538
+ Composite consists of one Mapping;
539
+ Composition contains Composite,
540
+ Composite belongs to one Composition;
541
+
542
+ Discriminated Role is where
543
+ Discriminator distinguishes Role using one Value,
544
+ Role is indicated by Value for Discriminator;
545
+
546
+ Injection is a kind of Mapping;
547
+ for each Component exactly one of these holds:
548
+ that Component is a Mapping,
549
+ that Component is an Indicator,
550
+ that Component is a Discriminator;
551
+ either Component is a Mapping(2) that projects some Composite or Component belongs to parent Mapping(1) but not both;
552
+ for each Mapping exactly one of these holds:
553
+ that Mapping is an Absorption,
554
+ that Mapping is an Injection,
555
+ that Mapping is a Nesting,
556
+ that Mapping projects some Composite;
557
+ for each Mapping at most one of these holds:
558
+ that Mapping projects some Composite,
559
+ that Mapping is an Absorption and that Absorption flattens;
560
+ some Mapping represents some Object Type
561
+ if and only if
562
+ that Mapping is an Absorption that traverses to some child- Role and that Role is played by that Object Type;
563
+ either Component projects some Name or that Component flattens;
564
+ each Discriminator occurs at least 2 times in
565
+ Discriminator distinguishes Role using Value;
566
+ each combination Discriminator, Value occurs one time in
567
+ Discriminator distinguishes Role using Value;