activefacts-examples 1.7.2 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -1
- data/activefacts-examples.gemspec +5 -7
- data/cql/Metamodel.cql +79 -69
- data/cql/SeparateSubtype.cql +1 -1
- data/diagrams/json/Metamodel.json +9 -7
- data/metadata/json/Metamodel.json +515 -504
- data/metadata/json/OilSupply.json +54 -54
- data/orm/Health.orm +257 -0
- data/orm/Metamodel.orm +3471 -3154
- data/rails/models/Metamodel.models +42 -11
- data/rails/schema/Metamodel.schema.rb +24 -12
- data/ruby/Metamodel.rb +17 -8
- data/sql/server/CinemaBookings.sql +1 -1
- data/sql/server/CinemaTickets.sql +3 -3
- data/sql/server/CompanyDirectorEmployee.sql +2 -2
- data/sql/server/Genealogy.sql +1 -1
- data/sql/server/Insurance.sql +6 -6
- data/sql/server/Metamodel.sql +64 -29
- data/sql/server/OilSupply.sql +20 -4
- data/sql/server/SimplestUnary.sql +1 -1
- metadata +22 -38
@@ -2,7 +2,7 @@
|
|
2
2
|
"types": {
|
3
3
|
"Acceptable Substitution": {
|
4
4
|
"is_main": true,
|
5
|
-
"id": "
|
5
|
+
"id": "c5d13ea6-e4e8-421d-ac4e-e17192362229",
|
6
6
|
"functions": [
|
7
7
|
{
|
8
8
|
"title": "involving Product",
|
@@ -23,116 +23,116 @@
|
|
23
23
|
},
|
24
24
|
"Cost": {
|
25
25
|
"is_main": false,
|
26
|
-
"id": "
|
26
|
+
"id": "177b2f92-5172-454c-ba12-be6a9761e2a1",
|
27
27
|
"functions": [
|
28
28
|
{
|
29
29
|
"title": "all Production Forecast",
|
30
30
|
"type": "Production Forecast",
|
31
31
|
"where": "some Production Forecast predicts this Cost",
|
32
|
-
"role_id": "
|
32
|
+
"role_id": "fdab4aba-52ae-400f-aece-c1e0ee82d2a1",
|
33
33
|
"is_list": true
|
34
34
|
},
|
35
35
|
{
|
36
36
|
"title": "all Transport Route",
|
37
37
|
"type": "Transport Route",
|
38
38
|
"where": "some Transport Route incurs this Cost per kl",
|
39
|
-
"role_id": "
|
39
|
+
"role_id": "108f8b19-0464-448a-8e65-48418a8dc080",
|
40
40
|
"is_list": true
|
41
41
|
}
|
42
42
|
]
|
43
43
|
},
|
44
44
|
"Month": {
|
45
45
|
"is_main": true,
|
46
|
-
"id": "
|
46
|
+
"id": "6fe5409f-e3ab-4aac-8f02-dba5d7d62768",
|
47
47
|
"functions": [
|
48
48
|
{
|
49
49
|
"title": "Month Nr",
|
50
50
|
"type": "Month Nr",
|
51
51
|
"where": "this Month has one Month Nr",
|
52
|
-
"role_id": "
|
52
|
+
"role_id": "08432eaf-33c9-494b-a2bd-8d27a4fb7df5"
|
53
53
|
},
|
54
54
|
{
|
55
55
|
"title": "Season",
|
56
56
|
"type": "Season",
|
57
57
|
"where": "this Month is in one Season",
|
58
|
-
"role_id": "
|
58
|
+
"role_id": "251485d9-8f72-4793-b537-4951ffbecb65"
|
59
59
|
},
|
60
60
|
{
|
61
61
|
"title": "all Supply Period",
|
62
62
|
"type": "Supply Period",
|
63
63
|
"where": "some Supply Period is in this Month",
|
64
|
-
"role_id": "
|
64
|
+
"role_id": "c91a4adc-d341-4227-b9c7-88a736ea4b37",
|
65
65
|
"is_list": true
|
66
66
|
}
|
67
67
|
]
|
68
68
|
},
|
69
69
|
"Month Nr": {
|
70
70
|
"is_main": false,
|
71
|
-
"id": "
|
71
|
+
"id": "005651a3-3bed-4282-b7b5-957e659d8247",
|
72
72
|
"functions": [
|
73
73
|
{
|
74
74
|
"title": "Month",
|
75
75
|
"type": "Month",
|
76
76
|
"where": "this Month Nr is of one Month",
|
77
|
-
"role_id": "
|
77
|
+
"role_id": "16d7da4e-22ab-47a6-9c11-918782a57ca9"
|
78
78
|
}
|
79
79
|
]
|
80
80
|
},
|
81
81
|
"Product": {
|
82
82
|
"is_main": true,
|
83
|
-
"id": "
|
83
|
+
"id": "769aca36-e82b-4052-b9e0-3a50f03119c1",
|
84
84
|
"functions": [
|
85
85
|
{
|
86
86
|
"title": "Product Name",
|
87
87
|
"type": "Product Name",
|
88
88
|
"where": "this Product has one Product Name",
|
89
|
-
"role_id": "
|
89
|
+
"role_id": "86903d44-b5ec-47e4-a91e-e60c7a4957cc"
|
90
90
|
},
|
91
91
|
{
|
92
92
|
"title": "all Acceptable Substitution",
|
93
93
|
"type": "Acceptable Substitution",
|
94
94
|
"where": "this Product may be substituted by some alternate-Product in some Season",
|
95
|
-
"role_id": "
|
95
|
+
"role_id": "30ba1f32-d71e-4829-9888-a87b2b41b0b1",
|
96
96
|
"is_list": true
|
97
97
|
},
|
98
98
|
{
|
99
99
|
"title": "all Acceptable Substitution",
|
100
100
|
"type": "Acceptable Substitution",
|
101
101
|
"where": "this alternate-Product is an acceptable substitute for some Product in some Season",
|
102
|
-
"role_id": "
|
102
|
+
"role_id": "7b997df7-fd33-4222-b834-1650a773c688",
|
103
103
|
"is_list": true
|
104
104
|
},
|
105
105
|
{
|
106
106
|
"title": "all Production Forecast",
|
107
107
|
"type": "Production Forecast",
|
108
108
|
"where": "some Refinery in some Supply Period will make this Product in some Quantity",
|
109
|
-
"role_id": "
|
109
|
+
"role_id": "3b0c6f8b-bc69-45af-88bd-d88eb6343d75",
|
110
110
|
"is_list": true
|
111
111
|
},
|
112
112
|
{
|
113
113
|
"title": "all Regional Demand",
|
114
114
|
"type": "Regional Demand",
|
115
115
|
"where": "some Region in some Supply Period will need this Product in some Quantity",
|
116
|
-
"role_id": "
|
116
|
+
"role_id": "8d6e58d2-b815-4f09-8ad9-92d322c97032",
|
117
117
|
"is_list": true
|
118
118
|
}
|
119
119
|
]
|
120
120
|
},
|
121
121
|
"Product Name": {
|
122
122
|
"is_main": false,
|
123
|
-
"id": "
|
123
|
+
"id": "14bcb16c-7875-4e04-b1ba-d37121f78591",
|
124
124
|
"functions": [
|
125
125
|
{
|
126
126
|
"title": "Product",
|
127
127
|
"type": "Product",
|
128
128
|
"where": "this Product Name is of one Product",
|
129
|
-
"role_id": "
|
129
|
+
"role_id": "8a8c42db-81c4-4fd4-b73d-8c3652459299"
|
130
130
|
}
|
131
131
|
]
|
132
132
|
},
|
133
133
|
"Production Forecast": {
|
134
134
|
"is_main": true,
|
135
|
-
"id": "
|
135
|
+
"id": "4b9412cd-aa64-4a84-97b4-2e4f167d95a0",
|
136
136
|
"functions": [
|
137
137
|
{
|
138
138
|
"title": "involving Refinery",
|
@@ -158,109 +158,109 @@
|
|
158
158
|
"title": "Cost",
|
159
159
|
"type": "Cost",
|
160
160
|
"where": "this Production Forecast predicts one Cost",
|
161
|
-
"role_id": "
|
161
|
+
"role_id": "6522db23-d4c7-4b64-9072-f34e3145a7f5"
|
162
162
|
}
|
163
163
|
]
|
164
164
|
},
|
165
165
|
"Quantity": {
|
166
166
|
"is_main": false,
|
167
|
-
"id": "
|
167
|
+
"id": "32a9e99c-f0ca-4982-a776-6295712710e6",
|
168
168
|
"functions": [
|
169
169
|
{
|
170
170
|
"title": "all Production Forecast",
|
171
171
|
"type": "Production Forecast",
|
172
172
|
"where": "some Refinery in some Supply Period will make some Product in this Quantity",
|
173
|
-
"role_id": "
|
173
|
+
"role_id": "e2763183-c841-4374-ae7f-af16f6c147b6",
|
174
174
|
"is_list": true
|
175
175
|
},
|
176
176
|
{
|
177
177
|
"title": "all Regional Demand",
|
178
178
|
"type": "Regional Demand",
|
179
179
|
"where": "some Region in some Supply Period will need some Product in this Quantity",
|
180
|
-
"role_id": "
|
180
|
+
"role_id": "53e36c00-07b3-41a4-b076-5387b842fbe8",
|
181
181
|
"is_list": true
|
182
182
|
}
|
183
183
|
]
|
184
184
|
},
|
185
185
|
"Refinery": {
|
186
186
|
"is_main": true,
|
187
|
-
"id": "
|
187
|
+
"id": "d8b6128d-03fa-427e-bd70-15986e9e58e6",
|
188
188
|
"functions": [
|
189
189
|
{
|
190
190
|
"title": "Refinery Name",
|
191
191
|
"type": "Refinery Name",
|
192
192
|
"where": "this Refinery has one Refinery Name",
|
193
|
-
"role_id": "
|
193
|
+
"role_id": "0e062cdc-c151-4523-bfb1-f5cd22982b12"
|
194
194
|
},
|
195
195
|
{
|
196
196
|
"title": "all Production Forecast",
|
197
197
|
"type": "Production Forecast",
|
198
198
|
"where": "this Refinery in some Supply Period will make some Product in some Quantity",
|
199
|
-
"role_id": "
|
199
|
+
"role_id": "6a862ed4-17b9-440e-94a7-75024d2c6f90",
|
200
200
|
"is_list": true
|
201
201
|
},
|
202
202
|
{
|
203
203
|
"title": "all Transport Route",
|
204
204
|
"type": "Transport Route",
|
205
205
|
"where": "some Transport Method transportation is available from this Refinery to some Region",
|
206
|
-
"role_id": "
|
206
|
+
"role_id": "b9177d19-9e16-4525-8b9e-a6e319e96294",
|
207
207
|
"is_list": true
|
208
208
|
}
|
209
209
|
]
|
210
210
|
},
|
211
211
|
"Refinery Name": {
|
212
212
|
"is_main": false,
|
213
|
-
"id": "
|
213
|
+
"id": "5ba3b8a1-f97a-4804-9836-29ff9368cef4",
|
214
214
|
"functions": [
|
215
215
|
{
|
216
216
|
"title": "Refinery",
|
217
217
|
"type": "Refinery",
|
218
218
|
"where": "this Refinery Name is of one Refinery",
|
219
|
-
"role_id": "
|
219
|
+
"role_id": "781275b1-1a94-4777-9490-dbb837812180"
|
220
220
|
}
|
221
221
|
]
|
222
222
|
},
|
223
223
|
"Region": {
|
224
224
|
"is_main": true,
|
225
|
-
"id": "
|
225
|
+
"id": "7905f9b9-4600-43e5-a09d-826653d3e9dd",
|
226
226
|
"functions": [
|
227
227
|
{
|
228
228
|
"title": "Region Name",
|
229
229
|
"type": "Region Name",
|
230
230
|
"where": "this Region has one Region Name",
|
231
|
-
"role_id": "
|
231
|
+
"role_id": "94df1888-f381-495c-9534-5d39e778e593"
|
232
232
|
},
|
233
233
|
{
|
234
234
|
"title": "all Regional Demand",
|
235
235
|
"type": "Regional Demand",
|
236
236
|
"where": "this Region in some Supply Period will need some Product in some Quantity",
|
237
|
-
"role_id": "
|
237
|
+
"role_id": "20d123fc-d71f-4d46-836a-abe4fd8d1bf7",
|
238
238
|
"is_list": true
|
239
239
|
},
|
240
240
|
{
|
241
241
|
"title": "all Transport Route",
|
242
242
|
"type": "Transport Route",
|
243
243
|
"where": "some Transport Method transportation is available from some Refinery to this Region",
|
244
|
-
"role_id": "
|
244
|
+
"role_id": "88a3db2f-3369-44ab-b0db-49d42efd7407",
|
245
245
|
"is_list": true
|
246
246
|
}
|
247
247
|
]
|
248
248
|
},
|
249
249
|
"Region Name": {
|
250
250
|
"is_main": false,
|
251
|
-
"id": "
|
251
|
+
"id": "31e9316d-ccbf-462d-8a16-72fa5a0ea62f",
|
252
252
|
"functions": [
|
253
253
|
{
|
254
254
|
"title": "Region",
|
255
255
|
"type": "Region",
|
256
256
|
"where": "this Region Name is of one Region",
|
257
|
-
"role_id": "
|
257
|
+
"role_id": "d6ee16cb-4c16-463a-9cfd-eb81725e4c5a"
|
258
258
|
}
|
259
259
|
]
|
260
260
|
},
|
261
261
|
"Regional Demand": {
|
262
262
|
"is_main": true,
|
263
|
-
"id": "
|
263
|
+
"id": "1cec0b45-36e4-4b2e-ac94-4311944a9d0f",
|
264
264
|
"functions": [
|
265
265
|
{
|
266
266
|
"title": "involving Region",
|
@@ -286,72 +286,72 @@
|
|
286
286
|
},
|
287
287
|
"Season": {
|
288
288
|
"is_main": false,
|
289
|
-
"id": "
|
289
|
+
"id": "d0294d0b-bc98-48ce-9dec-d826313ca83f",
|
290
290
|
"functions": [
|
291
291
|
{
|
292
292
|
"title": "all Month",
|
293
293
|
"type": "Month",
|
294
294
|
"where": "some Month is in this Season",
|
295
|
-
"role_id": "
|
295
|
+
"role_id": "7d0ddba9-0eed-42ed-96df-cbbee39e0aee",
|
296
296
|
"is_list": true
|
297
297
|
},
|
298
298
|
{
|
299
299
|
"title": "all Acceptable Substitution",
|
300
300
|
"type": "Acceptable Substitution",
|
301
301
|
"where": "some Product may be substituted by some alternate-Product in this Season",
|
302
|
-
"role_id": "
|
302
|
+
"role_id": "493c5830-db45-4e01-8c62-cd9dad97e3b5",
|
303
303
|
"is_list": true
|
304
304
|
}
|
305
305
|
]
|
306
306
|
},
|
307
307
|
"Supply Period": {
|
308
|
-
"is_main":
|
309
|
-
"id": "
|
308
|
+
"is_main": true,
|
309
|
+
"id": "ba704989-82e0-4839-9e35-2df483055fe1",
|
310
310
|
"functions": [
|
311
311
|
{
|
312
312
|
"title": "all Production Forecast",
|
313
313
|
"type": "Production Forecast",
|
314
314
|
"where": "some Refinery in this Supply Period will make some Product in some Quantity",
|
315
|
-
"role_id": "
|
315
|
+
"role_id": "2d3cb324-eb95-4371-ad9d-7ee0f3829688",
|
316
316
|
"is_list": true
|
317
317
|
},
|
318
318
|
{
|
319
319
|
"title": "all Regional Demand",
|
320
320
|
"type": "Regional Demand",
|
321
321
|
"where": "some Region in this Supply Period will need some Product in some Quantity",
|
322
|
-
"role_id": "
|
322
|
+
"role_id": "85b8643b-495c-4418-87c1-d4ea21ffbd30",
|
323
323
|
"is_list": true
|
324
324
|
},
|
325
325
|
{
|
326
326
|
"title": "Month",
|
327
327
|
"type": "Month",
|
328
328
|
"where": "this Supply Period is in one Month",
|
329
|
-
"role_id": "
|
329
|
+
"role_id": "d2480cbb-0038-434f-9867-7716473140ac"
|
330
330
|
},
|
331
331
|
{
|
332
332
|
"title": "Year",
|
333
333
|
"type": "Year",
|
334
334
|
"where": "this Supply Period is in one Year",
|
335
|
-
"role_id": "
|
335
|
+
"role_id": "0a44a1c0-d8e2-46ec-b18a-94d5e1e5b1a8"
|
336
336
|
}
|
337
337
|
]
|
338
338
|
},
|
339
339
|
"Transport Method": {
|
340
340
|
"is_main": false,
|
341
|
-
"id": "
|
341
|
+
"id": "6b707476-5479-4acf-9672-82cbc8425f48",
|
342
342
|
"functions": [
|
343
343
|
{
|
344
344
|
"title": "all Transport Route",
|
345
345
|
"type": "Transport Route",
|
346
346
|
"where": "this Transport Method transportation is available from some Refinery to some Region",
|
347
|
-
"role_id": "
|
347
|
+
"role_id": "e7ccf527-c6bf-41d3-b82a-ab22ff6ee7ab",
|
348
348
|
"is_list": true
|
349
349
|
}
|
350
350
|
]
|
351
351
|
},
|
352
352
|
"Transport Route": {
|
353
353
|
"is_main": true,
|
354
|
-
"id": "
|
354
|
+
"id": "d600e055-f1ed-48ec-816b-87ef65b8c922",
|
355
355
|
"functions": [
|
356
356
|
{
|
357
357
|
"title": "involving Transport Method",
|
@@ -372,38 +372,38 @@
|
|
372
372
|
"title": "Cost",
|
373
373
|
"type": "Cost",
|
374
374
|
"where": "this Transport Route incurs one Cost per kl",
|
375
|
-
"role_id": "
|
375
|
+
"role_id": "c6e66448-f3b2-4360-9320-91e565a5fac5"
|
376
376
|
}
|
377
377
|
]
|
378
378
|
},
|
379
379
|
"Year": {
|
380
380
|
"is_main": false,
|
381
|
-
"id": "
|
381
|
+
"id": "72e71900-23ea-4f04-b0a6-f3300b298759",
|
382
382
|
"functions": [
|
383
383
|
{
|
384
384
|
"title": "all Supply Period",
|
385
385
|
"type": "Supply Period",
|
386
386
|
"where": "some Supply Period is in this Year",
|
387
|
-
"role_id": "
|
387
|
+
"role_id": "251920ea-8659-435a-b2e9-ba9bf3f18cb7",
|
388
388
|
"is_list": true
|
389
389
|
},
|
390
390
|
{
|
391
391
|
"title": "Year Nr",
|
392
392
|
"type": "Year Nr",
|
393
393
|
"where": "this Year has one Year Nr",
|
394
|
-
"role_id": "
|
394
|
+
"role_id": "c4f5123d-170a-442e-96a0-a163b43fce1b"
|
395
395
|
}
|
396
396
|
]
|
397
397
|
},
|
398
398
|
"Year Nr": {
|
399
399
|
"is_main": false,
|
400
|
-
"id": "
|
400
|
+
"id": "e5a34fcc-495d-4097-80b7-97ef08a9df57",
|
401
401
|
"functions": [
|
402
402
|
{
|
403
403
|
"title": "Year",
|
404
404
|
"type": "Year",
|
405
405
|
"where": "this Year Nr is of one Year",
|
406
|
-
"role_id": "
|
406
|
+
"role_id": "a46be6ae-499a-4f7d-8cf9-32d3179cc7c6"
|
407
407
|
}
|
408
408
|
]
|
409
409
|
}
|