@lionweb/delta-protocol-test-cli 0.0.1-alpha.0 → 0.7.0-alpha.11

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,559 @@
1
+ // Copyright 2025 TRUMPF Laser SE and other contributors
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License")
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ //
15
+ // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
+ // SPDX-License-Identifier: Apache-2.0
17
+
18
+ // Warning: this file is generated!
19
+ // Modifying it by hand is useless at best, and sabotage at worst.
20
+
21
+ /*
22
+ * language's metadata:
23
+ * name: TestLanguage
24
+ * version: 0
25
+ * key: TestLanguage
26
+ * id: TestLanguage
27
+ */
28
+
29
+
30
+ import {
31
+ Annotation,
32
+ Classifier,
33
+ Concept,
34
+ Containment,
35
+ Enumeration,
36
+ EnumerationLiteral,
37
+ Language,
38
+ Property,
39
+ Reference,
40
+ SingleRef
41
+ } from "@lionweb/core";
42
+
43
+ import {
44
+ LionWebId
45
+ } from "@lionweb/json";
46
+
47
+ import {
48
+ ContainmentValueManager,
49
+ DeltaHandler,
50
+ ILanguageBase,
51
+ INamed,
52
+ INodeBase,
53
+ LionCore_builtinsBase,
54
+ NodeBase,
55
+ NodeBaseFactory,
56
+ OptionalMultiContainmentValueManager,
57
+ OptionalMultiReferenceValueManager,
58
+ OptionalPropertyValueManager,
59
+ OptionalSingleContainmentValueManager,
60
+ OptionalSingleReferenceValueManager,
61
+ Parentage,
62
+ PropertyValueManager,
63
+ ReferenceValueManager,
64
+ RequiredMultiContainmentValueManager,
65
+ RequiredMultiReferenceValueManager,
66
+ RequiredPropertyValueManager,
67
+ RequiredSingleContainmentValueManager,
68
+ RequiredSingleReferenceValueManager
69
+ } from "@lionweb/class-core";
70
+
71
+
72
+ export class TestLanguageBase implements ILanguageBase {
73
+
74
+ private readonly _language: Language = new Language("TestLanguage", "0", "TestLanguage", "TestLanguage");
75
+ get language(): Language {
76
+ this.ensureWiredUp();
77
+ return this._language;
78
+ }
79
+
80
+ public readonly _TestEnumeration = new Enumeration(this._language, "TestEnumeration", "TestEnumeration", "TestEnumeration");
81
+ get TestEnumeration(): Enumeration {
82
+ this.ensureWiredUp();
83
+ return this._TestEnumeration;
84
+ }
85
+ private readonly _TestEnumeration_literal1 = new EnumerationLiteral(this._TestEnumeration, "literal1", "TestEnumeration-literal1", "TestEnumeration-literal1");
86
+ get TestEnumeration_literal1(): EnumerationLiteral {
87
+ this.ensureWiredUp();
88
+ return this._TestEnumeration_literal1;
89
+ }
90
+ private readonly _TestEnumeration_literal2 = new EnumerationLiteral(this._TestEnumeration, "literal2", "TestEnumeration-literal2", "TestEnumeration-literal2");
91
+ get TestEnumeration_literal2(): EnumerationLiteral {
92
+ this.ensureWiredUp();
93
+ return this._TestEnumeration_literal2;
94
+ }
95
+ private readonly _TestEnumeration_literal3 = new EnumerationLiteral(this._TestEnumeration, "literal3", "TestEnumeration-literal3", "TestEnumeration-literal3");
96
+ get TestEnumeration_literal3(): EnumerationLiteral {
97
+ this.ensureWiredUp();
98
+ return this._TestEnumeration_literal3;
99
+ }
100
+
101
+ public readonly _SecondTestEnumeration = new Enumeration(this._language, "SecondTestEnumeration", "SecondTestEnumeration", "SecondTestEnumeration");
102
+ get SecondTestEnumeration(): Enumeration {
103
+ this.ensureWiredUp();
104
+ return this._SecondTestEnumeration;
105
+ }
106
+ private readonly _SecondTestEnumeration_literal1 = new EnumerationLiteral(this._SecondTestEnumeration, "literal1", "SecondTestEnumeration-literal1", "SecondTestEnumeration-literal1");
107
+ get SecondTestEnumeration_literal1(): EnumerationLiteral {
108
+ this.ensureWiredUp();
109
+ return this._SecondTestEnumeration_literal1;
110
+ }
111
+ private readonly _SecondTestEnumeration_literal2 = new EnumerationLiteral(this._SecondTestEnumeration, "literal2", "SecondTestEnumeration-literal2", "SecondTestEnumeration-literal2");
112
+ get SecondTestEnumeration_literal2(): EnumerationLiteral {
113
+ this.ensureWiredUp();
114
+ return this._SecondTestEnumeration_literal2;
115
+ }
116
+ private readonly _SecondTestEnumeration_literal3 = new EnumerationLiteral(this._SecondTestEnumeration, "literal3", "SecondTestEnumeration-literal3", "SecondTestEnumeration-literal3");
117
+ get SecondTestEnumeration_literal3(): EnumerationLiteral {
118
+ this.ensureWiredUp();
119
+ return this._SecondTestEnumeration_literal3;
120
+ }
121
+
122
+ public readonly _DataTypeTestConcept = new Concept(this._language, "DataTypeTestConcept", "DataTypeTestConcept", "DataTypeTestConcept", false).isPartition();
123
+ get DataTypeTestConcept(): Concept {
124
+ this.ensureWiredUp();
125
+ return this._DataTypeTestConcept;
126
+ }
127
+ private readonly _DataTypeTestConcept_booleanValue_1 = new Property(this._DataTypeTestConcept, "booleanValue_1", "DataTypeTestConcept-booleanValue_1", "DataTypeTestConcept-booleanValue_1");
128
+ get DataTypeTestConcept_booleanValue_1(): Property {
129
+ this.ensureWiredUp();
130
+ return this._DataTypeTestConcept_booleanValue_1;
131
+ }
132
+ private readonly _DataTypeTestConcept_integerValue_1 = new Property(this._DataTypeTestConcept, "integerValue_1", "DataTypeTestConcept-integerValue_1", "DataTypeTestConcept-integerValue_1");
133
+ get DataTypeTestConcept_integerValue_1(): Property {
134
+ this.ensureWiredUp();
135
+ return this._DataTypeTestConcept_integerValue_1;
136
+ }
137
+ private readonly _DataTypeTestConcept_stringValue_1 = new Property(this._DataTypeTestConcept, "stringValue_1", "DataTypeTestConcept-stringValue_1", "DataTypeTestConcept-stringValue_1");
138
+ get DataTypeTestConcept_stringValue_1(): Property {
139
+ this.ensureWiredUp();
140
+ return this._DataTypeTestConcept_stringValue_1;
141
+ }
142
+ private readonly _DataTypeTestConcept_enumValue_1 = new Property(this._DataTypeTestConcept, "enumValue_1", "DataTypeTestConcept-enumValue_1", "DataTypeTestConcept-enumValue_1");
143
+ get DataTypeTestConcept_enumValue_1(): Property {
144
+ this.ensureWiredUp();
145
+ return this._DataTypeTestConcept_enumValue_1;
146
+ }
147
+ private readonly _DataTypeTestConcept_booleanValue_0_1 = new Property(this._DataTypeTestConcept, "booleanValue_0_1", "DataTypeTestConcept-booleanValue_0_1", "DataTypeTestConcept-booleanValue_0_1").isOptional();
148
+ get DataTypeTestConcept_booleanValue_0_1(): Property {
149
+ this.ensureWiredUp();
150
+ return this._DataTypeTestConcept_booleanValue_0_1;
151
+ }
152
+ private readonly _DataTypeTestConcept_integerValue_0_1 = new Property(this._DataTypeTestConcept, "integerValue_0_1", "DataTypeTestConcept-integerValue_0_1", "DataTypeTestConcept-integerValue_0_1").isOptional();
153
+ get DataTypeTestConcept_integerValue_0_1(): Property {
154
+ this.ensureWiredUp();
155
+ return this._DataTypeTestConcept_integerValue_0_1;
156
+ }
157
+ private readonly _DataTypeTestConcept_stringValue_0_1 = new Property(this._DataTypeTestConcept, "stringValue_0_1", "DataTypeTestConcept-stringValue_0_1", "DataTypeTestConcept-stringValue_0_1").isOptional();
158
+ get DataTypeTestConcept_stringValue_0_1(): Property {
159
+ this.ensureWiredUp();
160
+ return this._DataTypeTestConcept_stringValue_0_1;
161
+ }
162
+ private readonly _DataTypeTestConcept_enumValue_0_1 = new Property(this._DataTypeTestConcept, "enumValue_0_1", "DataTypeTestConcept-enumValue_0_1", "DataTypeTestConcept-enumValue_0_1").isOptional();
163
+ get DataTypeTestConcept_enumValue_0_1(): Property {
164
+ this.ensureWiredUp();
165
+ return this._DataTypeTestConcept_enumValue_0_1;
166
+ }
167
+
168
+ public readonly _LinkTestConcept = new Concept(this._language, "LinkTestConcept", "LinkTestConcept", "LinkTestConcept", false).isPartition();
169
+ get LinkTestConcept(): Concept {
170
+ this.ensureWiredUp();
171
+ return this._LinkTestConcept;
172
+ }
173
+ private readonly _LinkTestConcept_containment_0_1 = new Containment(this._LinkTestConcept, "containment_0_1", "LinkTestConcept-containment_0_1", "LinkTestConcept-containment_0_1").isOptional();
174
+ get LinkTestConcept_containment_0_1(): Containment {
175
+ this.ensureWiredUp();
176
+ return this._LinkTestConcept_containment_0_1;
177
+ }
178
+ private readonly _LinkTestConcept_containment_1 = new Containment(this._LinkTestConcept, "containment_1", "LinkTestConcept-containment_1", "LinkTestConcept-containment_1");
179
+ get LinkTestConcept_containment_1(): Containment {
180
+ this.ensureWiredUp();
181
+ return this._LinkTestConcept_containment_1;
182
+ }
183
+ private readonly _LinkTestConcept_containment_0_n = new Containment(this._LinkTestConcept, "containment_0_n", "LinkTestConcept-containment_0_n", "LinkTestConcept-containment_0_n").isOptional().isMultiple();
184
+ get LinkTestConcept_containment_0_n(): Containment {
185
+ this.ensureWiredUp();
186
+ return this._LinkTestConcept_containment_0_n;
187
+ }
188
+ private readonly _LinkTestConcept_containment_1_n = new Containment(this._LinkTestConcept, "containment_1_n", "LinkTestConcept-containment_1_n", "LinkTestConcept-containment_1_n").isMultiple();
189
+ get LinkTestConcept_containment_1_n(): Containment {
190
+ this.ensureWiredUp();
191
+ return this._LinkTestConcept_containment_1_n;
192
+ }
193
+ private readonly _LinkTestConcept_reference_0_1 = new Reference(this._LinkTestConcept, "reference_0_1", "LinkTestConcept-reference_0_1", "LinkTestConcept-reference_0_1").isOptional();
194
+ get LinkTestConcept_reference_0_1(): Reference {
195
+ this.ensureWiredUp();
196
+ return this._LinkTestConcept_reference_0_1;
197
+ }
198
+ private readonly _LinkTestConcept_reference_1 = new Reference(this._LinkTestConcept, "reference_1", "LinkTestConcept-reference_1", "LinkTestConcept-reference_1");
199
+ get LinkTestConcept_reference_1(): Reference {
200
+ this.ensureWiredUp();
201
+ return this._LinkTestConcept_reference_1;
202
+ }
203
+ private readonly _LinkTestConcept_reference_0_n = new Reference(this._LinkTestConcept, "reference_0_n", "LinkTestConcept-reference_0_n", "LinkTestConcept-reference_0_n").isOptional().isMultiple();
204
+ get LinkTestConcept_reference_0_n(): Reference {
205
+ this.ensureWiredUp();
206
+ return this._LinkTestConcept_reference_0_n;
207
+ }
208
+ private readonly _LinkTestConcept_reference_1_n = new Reference(this._LinkTestConcept, "reference_1_n", "LinkTestConcept-reference_1_n", "LinkTestConcept-reference_1_n").isMultiple();
209
+ get LinkTestConcept_reference_1_n(): Reference {
210
+ this.ensureWiredUp();
211
+ return this._LinkTestConcept_reference_1_n;
212
+ }
213
+
214
+ public readonly _TestAnnotation = new Annotation(this._language, "TestAnnotation", "TestAnnotation", "TestAnnotation");
215
+ get TestAnnotation(): Annotation {
216
+ this.ensureWiredUp();
217
+ return this._TestAnnotation;
218
+ }
219
+
220
+ private _wiredUp: boolean = false;
221
+ private ensureWiredUp() {
222
+ if (this._wiredUp) {
223
+ return;
224
+ }
225
+ this._language.havingEntities(this._TestEnumeration, this._SecondTestEnumeration, this._DataTypeTestConcept, this._LinkTestConcept, this._TestAnnotation);
226
+ this._TestEnumeration.havingLiterals(this._TestEnumeration_literal1, this._TestEnumeration_literal2, this._TestEnumeration_literal3);
227
+ this._SecondTestEnumeration.havingLiterals(this._SecondTestEnumeration_literal1, this._SecondTestEnumeration_literal2, this._SecondTestEnumeration_literal3);
228
+ this._DataTypeTestConcept.havingFeatures(this._DataTypeTestConcept_booleanValue_1, this._DataTypeTestConcept_integerValue_1, this._DataTypeTestConcept_stringValue_1, this._DataTypeTestConcept_enumValue_1, this._DataTypeTestConcept_booleanValue_0_1, this._DataTypeTestConcept_integerValue_0_1, this._DataTypeTestConcept_stringValue_0_1, this._DataTypeTestConcept_enumValue_0_1);
229
+ this._DataTypeTestConcept_booleanValue_1.ofType(LionCore_builtinsBase.INSTANCE._Boolean);
230
+ this._DataTypeTestConcept_integerValue_1.ofType(LionCore_builtinsBase.INSTANCE._Integer);
231
+ this._DataTypeTestConcept_stringValue_1.ofType(LionCore_builtinsBase.INSTANCE._String);
232
+ this._DataTypeTestConcept_enumValue_1.ofType(this._TestEnumeration);
233
+ this._DataTypeTestConcept_booleanValue_0_1.ofType(LionCore_builtinsBase.INSTANCE._Boolean).isOptional();
234
+ this._DataTypeTestConcept_integerValue_0_1.ofType(LionCore_builtinsBase.INSTANCE._Integer).isOptional();
235
+ this._DataTypeTestConcept_stringValue_0_1.ofType(LionCore_builtinsBase.INSTANCE._String).isOptional();
236
+ this._DataTypeTestConcept_enumValue_0_1.ofType(this._TestEnumeration).isOptional();
237
+ this._LinkTestConcept.implementing(LionCore_builtinsBase.INSTANCE._INamed);
238
+ this._LinkTestConcept.havingFeatures(this._LinkTestConcept_containment_0_1, this._LinkTestConcept_containment_1, this._LinkTestConcept_containment_0_n, this._LinkTestConcept_containment_1_n, this._LinkTestConcept_reference_0_1, this._LinkTestConcept_reference_1, this._LinkTestConcept_reference_0_n, this._LinkTestConcept_reference_1_n);
239
+ this._LinkTestConcept_containment_0_1.ofType(this._LinkTestConcept);
240
+ this._LinkTestConcept_containment_1.ofType(this._LinkTestConcept);
241
+ this._LinkTestConcept_containment_0_n.ofType(this._LinkTestConcept);
242
+ this._LinkTestConcept_containment_1_n.ofType(this._LinkTestConcept);
243
+ this._LinkTestConcept_reference_0_1.ofType(this._LinkTestConcept);
244
+ this._LinkTestConcept_reference_1.ofType(this._LinkTestConcept);
245
+ this._LinkTestConcept_reference_0_n.ofType(this._LinkTestConcept);
246
+ this._LinkTestConcept_reference_1_n.ofType(this._LinkTestConcept);
247
+ this._wiredUp = true;
248
+ }
249
+
250
+ factory(handleDelta?: DeltaHandler): NodeBaseFactory {
251
+ return (classifier: Classifier, id: LionWebId) => {
252
+ switch (classifier.key) {
253
+ case this._DataTypeTestConcept.key: return DataTypeTestConcept.create(id, handleDelta);
254
+ case this._LinkTestConcept.key: return LinkTestConcept.create(id, handleDelta);
255
+ case this._TestAnnotation.key: return TestAnnotation.create(id, handleDelta);
256
+ default: {
257
+ const {language} = classifier;
258
+ throw new Error(`can't instantiate ${classifier.name} (key=${classifier.key}): classifier is not known in language ${language.name} (key=${language.key}, version=${language.version})`);
259
+ }
260
+ }
261
+ }
262
+ }
263
+
264
+ enumLiteralFrom<EnumType>(enumerationLiteral: EnumerationLiteral): EnumType {
265
+ const {enumeration} = enumerationLiteral;
266
+ switch (enumeration.key) {
267
+ case this._TestEnumeration.key: return enumerationLiteral.key as EnumType;
268
+ case this._SecondTestEnumeration.key: return enumerationLiteral.key as EnumType;
269
+ default: {
270
+ const {language} = enumeration;
271
+ throw new Error(`enumeration with key ${enumeration.key} is not known in language ${language.name} (key=${language.key}, version=${language.version})`);
272
+ }
273
+ }
274
+ }
275
+
276
+ public static readonly INSTANCE = new TestLanguageBase();
277
+ }
278
+
279
+
280
+ export enum TestEnumeration {
281
+ literal1 = "TestEnumeration-literal1",
282
+ literal2 = "TestEnumeration-literal2",
283
+ literal3 = "TestEnumeration-literal3"
284
+ }
285
+
286
+ export enum SecondTestEnumeration {
287
+ literal1 = "SecondTestEnumeration-literal1",
288
+ literal2 = "SecondTestEnumeration-literal2",
289
+ literal3 = "SecondTestEnumeration-literal3"
290
+ }
291
+
292
+ export class DataTypeTestConcept extends NodeBase {
293
+ static create(id: LionWebId, handleDelta?: DeltaHandler, parentInfo?: Parentage): DataTypeTestConcept {
294
+ return new DataTypeTestConcept(TestLanguageBase.INSTANCE.DataTypeTestConcept, id, handleDelta, parentInfo);
295
+ }
296
+
297
+ private readonly _booleanValue_1: RequiredPropertyValueManager<boolean>;
298
+ get booleanValue_1(): boolean {
299
+ return this._booleanValue_1.get();
300
+ }
301
+ set booleanValue_1(newValue: boolean) {
302
+ this._booleanValue_1.set(newValue);
303
+ }
304
+
305
+ private readonly _integerValue_1: RequiredPropertyValueManager<number>;
306
+ get integerValue_1(): number {
307
+ return this._integerValue_1.get();
308
+ }
309
+ set integerValue_1(newValue: number) {
310
+ this._integerValue_1.set(newValue);
311
+ }
312
+
313
+ private readonly _stringValue_1: RequiredPropertyValueManager<string>;
314
+ get stringValue_1(): string {
315
+ return this._stringValue_1.get();
316
+ }
317
+ set stringValue_1(newValue: string) {
318
+ this._stringValue_1.set(newValue);
319
+ }
320
+
321
+ private readonly _enumValue_1: RequiredPropertyValueManager<TestEnumeration>;
322
+ get enumValue_1(): TestEnumeration {
323
+ return this._enumValue_1.get();
324
+ }
325
+ set enumValue_1(newValue: TestEnumeration) {
326
+ this._enumValue_1.set(newValue);
327
+ }
328
+
329
+ private readonly _booleanValue_0_1: OptionalPropertyValueManager<boolean>;
330
+ get booleanValue_0_1(): boolean | undefined {
331
+ return this._booleanValue_0_1.get();
332
+ }
333
+ set booleanValue_0_1(newValue: boolean | undefined) {
334
+ this._booleanValue_0_1.set(newValue);
335
+ }
336
+
337
+ private readonly _integerValue_0_1: OptionalPropertyValueManager<number>;
338
+ get integerValue_0_1(): number | undefined {
339
+ return this._integerValue_0_1.get();
340
+ }
341
+ set integerValue_0_1(newValue: number | undefined) {
342
+ this._integerValue_0_1.set(newValue);
343
+ }
344
+
345
+ private readonly _stringValue_0_1: OptionalPropertyValueManager<string>;
346
+ get stringValue_0_1(): string | undefined {
347
+ return this._stringValue_0_1.get();
348
+ }
349
+ set stringValue_0_1(newValue: string | undefined) {
350
+ this._stringValue_0_1.set(newValue);
351
+ }
352
+
353
+ private readonly _enumValue_0_1: OptionalPropertyValueManager<TestEnumeration>;
354
+ get enumValue_0_1(): TestEnumeration | undefined {
355
+ return this._enumValue_0_1.get();
356
+ }
357
+ set enumValue_0_1(newValue: TestEnumeration | undefined) {
358
+ this._enumValue_0_1.set(newValue);
359
+ }
360
+
361
+ public constructor(classifier: Classifier, id: LionWebId, handleDelta?: DeltaHandler, parentInfo?: Parentage) {
362
+ super(classifier, id, handleDelta, parentInfo);
363
+ this._booleanValue_1 = new RequiredPropertyValueManager<boolean>(TestLanguageBase.INSTANCE.DataTypeTestConcept_booleanValue_1, this);
364
+ this._integerValue_1 = new RequiredPropertyValueManager<number>(TestLanguageBase.INSTANCE.DataTypeTestConcept_integerValue_1, this);
365
+ this._stringValue_1 = new RequiredPropertyValueManager<string>(TestLanguageBase.INSTANCE.DataTypeTestConcept_stringValue_1, this);
366
+ this._enumValue_1 = new RequiredPropertyValueManager<TestEnumeration>(TestLanguageBase.INSTANCE.DataTypeTestConcept_enumValue_1, this);
367
+ this._booleanValue_0_1 = new OptionalPropertyValueManager<boolean>(TestLanguageBase.INSTANCE.DataTypeTestConcept_booleanValue_0_1, this);
368
+ this._integerValue_0_1 = new OptionalPropertyValueManager<number>(TestLanguageBase.INSTANCE.DataTypeTestConcept_integerValue_0_1, this);
369
+ this._stringValue_0_1 = new OptionalPropertyValueManager<string>(TestLanguageBase.INSTANCE.DataTypeTestConcept_stringValue_0_1, this);
370
+ this._enumValue_0_1 = new OptionalPropertyValueManager<TestEnumeration>(TestLanguageBase.INSTANCE.DataTypeTestConcept_enumValue_0_1, this);
371
+ }
372
+
373
+ getPropertyValueManager(property: Property): PropertyValueManager<unknown> {
374
+ switch (property.key) {
375
+ case TestLanguageBase.INSTANCE.DataTypeTestConcept_booleanValue_1.key: return this._booleanValue_1;
376
+ case TestLanguageBase.INSTANCE.DataTypeTestConcept_integerValue_1.key: return this._integerValue_1;
377
+ case TestLanguageBase.INSTANCE.DataTypeTestConcept_stringValue_1.key: return this._stringValue_1;
378
+ case TestLanguageBase.INSTANCE.DataTypeTestConcept_enumValue_1.key: return this._enumValue_1;
379
+ case TestLanguageBase.INSTANCE.DataTypeTestConcept_booleanValue_0_1.key: return this._booleanValue_0_1;
380
+ case TestLanguageBase.INSTANCE.DataTypeTestConcept_integerValue_0_1.key: return this._integerValue_0_1;
381
+ case TestLanguageBase.INSTANCE.DataTypeTestConcept_stringValue_0_1.key: return this._stringValue_0_1;
382
+ case TestLanguageBase.INSTANCE.DataTypeTestConcept_enumValue_0_1.key: return this._enumValue_0_1;
383
+ default: return super.getPropertyValueManager(property);
384
+ }
385
+ }
386
+ }
387
+
388
+ export class LinkTestConcept extends NodeBase implements INamed {
389
+ static create(id: LionWebId, handleDelta?: DeltaHandler, parentInfo?: Parentage): LinkTestConcept {
390
+ return new LinkTestConcept(TestLanguageBase.INSTANCE.LinkTestConcept, id, handleDelta, parentInfo);
391
+ }
392
+
393
+ private readonly _containment_0_1: OptionalSingleContainmentValueManager<LinkTestConcept>;
394
+ get containment_0_1(): LinkTestConcept | undefined {
395
+ return this._containment_0_1.get();
396
+ }
397
+ set containment_0_1(newValue: LinkTestConcept | undefined) {
398
+ this._containment_0_1.set(newValue);
399
+ }
400
+ replaceContainment_0_1With(newValue: LinkTestConcept) {
401
+ this._containment_0_1.replaceWith(newValue);
402
+ }
403
+
404
+ private readonly _containment_1: RequiredSingleContainmentValueManager<LinkTestConcept>;
405
+ get containment_1(): LinkTestConcept {
406
+ return this._containment_1.get();
407
+ }
408
+ set containment_1(newValue: LinkTestConcept) {
409
+ this._containment_1.set(newValue);
410
+ }
411
+ replaceContainment_1With(newValue: LinkTestConcept) {
412
+ this._containment_1.replaceWith(newValue);
413
+ }
414
+
415
+ private readonly _containment_0_n: OptionalMultiContainmentValueManager<LinkTestConcept>;
416
+ get containment_0_n(): LinkTestConcept[] {
417
+ return this._containment_0_n.get();
418
+ }
419
+ addContainment_0_n(newValue: LinkTestConcept) {
420
+ this._containment_0_n.add(newValue);
421
+ }
422
+ removeContainment_0_n(valueToRemove: LinkTestConcept) {
423
+ this._containment_0_n.remove(valueToRemove);
424
+ }
425
+ addContainment_0_nAtIndex(newValue: LinkTestConcept, index: number) {
426
+ this._containment_0_n.insertAtIndex(newValue, index);
427
+ }
428
+ moveContainment_0_n(oldIndex: number, newIndex: number) {
429
+ this._containment_0_n.move(oldIndex, newIndex);
430
+ }
431
+ replaceContainment_0_nAtIndex(movedChild: LinkTestConcept, newIndex: number) {
432
+ this._containment_0_n.replaceAtIndex(movedChild, newIndex);
433
+ }
434
+
435
+ private readonly _containment_1_n: RequiredMultiContainmentValueManager<LinkTestConcept>;
436
+ get containment_1_n(): LinkTestConcept[] {
437
+ return this._containment_1_n.get();
438
+ }
439
+ addContainment_1_n(newValue: LinkTestConcept) {
440
+ this._containment_1_n.add(newValue);
441
+ }
442
+ removeContainment_1_n(valueToRemove: LinkTestConcept) {
443
+ this._containment_1_n.remove(valueToRemove);
444
+ }
445
+ addContainment_1_nAtIndex(newValue: LinkTestConcept, index: number) {
446
+ this._containment_1_n.insertAtIndex(newValue, index);
447
+ }
448
+ moveContainment_1_n(oldIndex: number, newIndex: number) {
449
+ this._containment_1_n.move(oldIndex, newIndex);
450
+ }
451
+ replaceContainment_1_nAtIndex(movedChild: LinkTestConcept, newIndex: number) {
452
+ this._containment_1_n.replaceAtIndex(movedChild, newIndex);
453
+ }
454
+
455
+ private readonly _reference_0_1: OptionalSingleReferenceValueManager<LinkTestConcept>;
456
+ get reference_0_1(): SingleRef<LinkTestConcept> | undefined {
457
+ return this._reference_0_1.get();
458
+ }
459
+ set reference_0_1(newValue: SingleRef<LinkTestConcept> | undefined) {
460
+ this._reference_0_1.set(newValue);
461
+ }
462
+
463
+ private readonly _reference_1: RequiredSingleReferenceValueManager<LinkTestConcept>;
464
+ get reference_1(): SingleRef<LinkTestConcept> {
465
+ return this._reference_1.get();
466
+ }
467
+ set reference_1(newValue: SingleRef<LinkTestConcept>) {
468
+ this._reference_1.set(newValue);
469
+ }
470
+
471
+ private readonly _reference_0_n: OptionalMultiReferenceValueManager<LinkTestConcept>;
472
+ get reference_0_n(): SingleRef<LinkTestConcept>[] {
473
+ return this._reference_0_n.get();
474
+ }
475
+ addReference_0_n(newValue: LinkTestConcept) {
476
+ this._reference_0_n.add(newValue);
477
+ }
478
+ removeReference_0_n(valueToRemove: LinkTestConcept) {
479
+ this._reference_0_n.remove(valueToRemove);
480
+ }
481
+ addReference_0_nAtIndex(newValue: LinkTestConcept, index: number) {
482
+ this._reference_0_n.insertAtIndex(newValue, index);
483
+ }
484
+ moveReference_0_n(oldIndex: number, newIndex: number) {
485
+ this._reference_0_n.move(oldIndex, newIndex);
486
+ }
487
+
488
+ private readonly _reference_1_n: RequiredMultiReferenceValueManager<LinkTestConcept>;
489
+ get reference_1_n(): SingleRef<LinkTestConcept>[] {
490
+ return this._reference_1_n.get();
491
+ }
492
+ addReference_1_n(newValue: LinkTestConcept) {
493
+ this._reference_1_n.add(newValue);
494
+ }
495
+ removeReference_1_n(valueToRemove: LinkTestConcept) {
496
+ this._reference_1_n.remove(valueToRemove);
497
+ }
498
+ addReference_1_nAtIndex(newValue: LinkTestConcept, index: number) {
499
+ this._reference_1_n.insertAtIndex(newValue, index);
500
+ }
501
+ moveReference_1_n(oldIndex: number, newIndex: number) {
502
+ this._reference_1_n.move(oldIndex, newIndex);
503
+ }
504
+
505
+ private readonly _name: RequiredPropertyValueManager<string>;
506
+ get name(): string {
507
+ return this._name.get();
508
+ }
509
+ set name(newValue: string) {
510
+ this._name.set(newValue);
511
+ }
512
+
513
+ public constructor(classifier: Classifier, id: LionWebId, handleDelta?: DeltaHandler, parentInfo?: Parentage) {
514
+ super(classifier, id, handleDelta, parentInfo);
515
+ this._containment_0_1 = new OptionalSingleContainmentValueManager<LinkTestConcept>(TestLanguageBase.INSTANCE.LinkTestConcept_containment_0_1, this);
516
+ this._containment_1 = new RequiredSingleContainmentValueManager<LinkTestConcept>(TestLanguageBase.INSTANCE.LinkTestConcept_containment_1, this);
517
+ this._containment_0_n = new OptionalMultiContainmentValueManager<LinkTestConcept>(TestLanguageBase.INSTANCE.LinkTestConcept_containment_0_n, this);
518
+ this._containment_1_n = new RequiredMultiContainmentValueManager<LinkTestConcept>(TestLanguageBase.INSTANCE.LinkTestConcept_containment_1_n, this);
519
+ this._reference_0_1 = new OptionalSingleReferenceValueManager<LinkTestConcept>(TestLanguageBase.INSTANCE.LinkTestConcept_reference_0_1, this);
520
+ this._reference_1 = new RequiredSingleReferenceValueManager<LinkTestConcept>(TestLanguageBase.INSTANCE.LinkTestConcept_reference_1, this);
521
+ this._reference_0_n = new OptionalMultiReferenceValueManager<LinkTestConcept>(TestLanguageBase.INSTANCE.LinkTestConcept_reference_0_n, this);
522
+ this._reference_1_n = new RequiredMultiReferenceValueManager<LinkTestConcept>(TestLanguageBase.INSTANCE.LinkTestConcept_reference_1_n, this);
523
+ this._name = new RequiredPropertyValueManager<string>(LionCore_builtinsBase.INSTANCE.INamed_name, this);
524
+ }
525
+
526
+ getPropertyValueManager(property: Property): PropertyValueManager<unknown> {
527
+ if (property.key === LionCore_builtinsBase.INSTANCE.INamed_name.key) {
528
+ return this._name;
529
+ }
530
+ return super.getPropertyValueManager(property);
531
+ }
532
+
533
+ getContainmentValueManager(containment: Containment): ContainmentValueManager<INodeBase> {
534
+ switch (containment.key) {
535
+ case TestLanguageBase.INSTANCE.LinkTestConcept_containment_0_1.key: return this._containment_0_1;
536
+ case TestLanguageBase.INSTANCE.LinkTestConcept_containment_1.key: return this._containment_1;
537
+ case TestLanguageBase.INSTANCE.LinkTestConcept_containment_0_n.key: return this._containment_0_n;
538
+ case TestLanguageBase.INSTANCE.LinkTestConcept_containment_1_n.key: return this._containment_1_n;
539
+ default: return super.getContainmentValueManager(containment);
540
+ }
541
+ }
542
+
543
+ getReferenceValueManager(reference: Reference): ReferenceValueManager<INodeBase> {
544
+ switch (reference.key) {
545
+ case TestLanguageBase.INSTANCE.LinkTestConcept_reference_0_1.key: return this._reference_0_1;
546
+ case TestLanguageBase.INSTANCE.LinkTestConcept_reference_1.key: return this._reference_1;
547
+ case TestLanguageBase.INSTANCE.LinkTestConcept_reference_0_n.key: return this._reference_0_n;
548
+ case TestLanguageBase.INSTANCE.LinkTestConcept_reference_1_n.key: return this._reference_1_n;
549
+ default: return super.getReferenceValueManager(reference);
550
+ }
551
+ }
552
+ }
553
+
554
+ export class TestAnnotation extends NodeBase {
555
+ static create(id: LionWebId, handleDelta?: DeltaHandler, parentInfo?: Parentage): TestAnnotation {
556
+ return new TestAnnotation(TestLanguageBase.INSTANCE.TestAnnotation, id, handleDelta, parentInfo);
557
+ }
558
+ }
559
+
package/src/tasks.ts CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  LinkTestConcept,
28
28
  TestAnnotation,
29
29
  TestLanguageBase
30
- } from "@lionweb/class-core-test/dist/gen/TestLanguage.g.js"
30
+ } from "./gen/TestLanguage.g.js"
31
31
 
32
32
 
33
33
  const lastOf = <T>(ts: T[]): T => {