MaterialImpl.java 26.1 KB
Newer Older
1
2
3
4
5
6
/**
 */
package de.hftstuttgart.buildingphysics.impl;

import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Material;
7
import de.hftstuttgart.buildingphysics.MaterialCategory;
8

9
10
11
12
13
import de.hftstuttgart.cityunits.model.NullableQuantity;

import de.hftstuttgart.cityunits.model.quantities.QuantitiesFactory;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage;

14
import org.eclipse.emf.common.notify.Notification;
15
import org.eclipse.emf.common.notify.NotificationChain;
16

17
import org.eclipse.emf.ecore.EClass;
18
import org.eclipse.emf.ecore.InternalEObject;
19

20
21
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
22

23
import org.eclipse.emf.ecore.util.EcoreUtil;
24
25
26
27
28
29
30
31
32

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Material</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * </p>
 * <ul>
33
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getMaterialId <em>Material Id</em>}</li>
34
35
36
37
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getName <em>Name</em>}</li>
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDensity <em>Density</em>}</li>
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getHeatCapacity <em>Heat Capacity</em>}</li>
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getConductivity <em>Conductivity</em>}</li>
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
38
39
40
41
42
43
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getEmbodiedEnergy <em>Embodied Energy</em>}</li>
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getEmbodiedCarbon <em>Embodied Carbon</em>}</li>
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getConstructionDescription <em>Construction Description</em>}</li>
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDisposalEnergy <em>Disposal Energy</em>}</li>
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDisposalCarbon <em>Disposal Carbon</em>}</li>
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDisposalDescription <em>Disposal Description</em>}</li>
44
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getCategory <em>Category</em>}</li>
45
46
47
48
49
50
 * </ul>
 *
 * @generated
 */
public class MaterialImpl extends MinimalEObjectImpl.Container implements Material {
	/**
51
	 * The default value of the '{@link #getMaterialId() <em>Material Id</em>}' attribute.
52
53
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
54
	 * @see #getMaterialId()
55
56
57
	 * @generated
	 * @ordered
	 */
58
	protected static final String MATERIAL_ID_EDEFAULT = null;
59
60

	/**
61
	 * The cached value of the '{@link #getMaterialId() <em>Material Id</em>}' attribute.
62
63
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
64
	 * @see #getMaterialId()
65
66
67
	 * @generated
	 * @ordered
	 */
68
	protected String materialId = MATERIAL_ID_EDEFAULT;
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

	/**
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected static final String NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected String name = NAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getDensity() <em>Density</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDensity()
	 * @generated
	 * @ordered
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
98
99
	protected static final NullableQuantity DENSITY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kg/m\u00b3");
100
101
102
103
104
105
106
107
108

	/**
	 * The cached value of the '{@link #getDensity() <em>Density</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDensity()
	 * @generated
	 * @ordered
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
109
	protected NullableQuantity density = DENSITY_EDEFAULT;
110
111
112
113
114
115
116
117
118

	/**
	 * The default value of the '{@link #getHeatCapacity() <em>Heat Capacity</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getHeatCapacity()
	 * @generated
	 * @ordered
	 */
119
	protected static final NullableQuantity HEAT_CAPACITY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
120
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "J/K");
121
122
123
124
125
126
127
128
129

	/**
	 * The cached value of the '{@link #getHeatCapacity() <em>Heat Capacity</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getHeatCapacity()
	 * @generated
	 * @ordered
	 */
130
	protected NullableQuantity heatCapacity = HEAT_CAPACITY_EDEFAULT;
131
132
133
134
135
136
137
138
139

	/**
	 * The default value of the '{@link #getConductivity() <em>Conductivity</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConductivity()
	 * @generated
	 * @ordered
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
140
141
	protected static final NullableQuantity CONDUCTIVITY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "W/(m*K)");
142
143
144
145
146
147
148
149
150

	/**
	 * The cached value of the '{@link #getConductivity() <em>Conductivity</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConductivity()
	 * @generated
	 * @ordered
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
151
	protected NullableQuantity conductivity = CONDUCTIVITY_EDEFAULT;
152

Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
	/**
	 * The default value of the '{@link #getEmbodiedEnergy() <em>Embodied Energy</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEmbodiedEnergy()
	 * @generated
	 * @ordered
	 */
	protected static final NullableQuantity EMBODIED_ENERGY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kW*h/kg");

	/**
	 * The cached value of the '{@link #getEmbodiedEnergy() <em>Embodied Energy</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEmbodiedEnergy()
	 * @generated
	 * @ordered
	 */
	protected NullableQuantity embodiedEnergy = EMBODIED_ENERGY_EDEFAULT;

	/**
	 * The default value of the '{@link #getEmbodiedCarbon() <em>Embodied Carbon</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEmbodiedCarbon()
	 * @generated
	 * @ordered
	 */
	protected static final NullableQuantity EMBODIED_CARBON_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
183
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kgCO\u2082eq/kg");
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
184
185
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
211
212
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
239
240
241
242
243
244

	/**
	 * The cached value of the '{@link #getEmbodiedCarbon() <em>Embodied Carbon</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEmbodiedCarbon()
	 * @generated
	 * @ordered
	 */
	protected NullableQuantity embodiedCarbon = EMBODIED_CARBON_EDEFAULT;

	/**
	 * The default value of the '{@link #getConstructionDescription() <em>Construction Description</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConstructionDescription()
	 * @generated
	 * @ordered
	 */
	protected static final String CONSTRUCTION_DESCRIPTION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getConstructionDescription() <em>Construction Description</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConstructionDescription()
	 * @generated
	 * @ordered
	 */
	protected String constructionDescription = CONSTRUCTION_DESCRIPTION_EDEFAULT;

	/**
	 * The default value of the '{@link #getDisposalEnergy() <em>Disposal Energy</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDisposalEnergy()
	 * @generated
	 * @ordered
	 */
	protected static final NullableQuantity DISPOSAL_ENERGY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kW*h/kg");

	/**
	 * The cached value of the '{@link #getDisposalEnergy() <em>Disposal Energy</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDisposalEnergy()
	 * @generated
	 * @ordered
	 */
	protected NullableQuantity disposalEnergy = DISPOSAL_ENERGY_EDEFAULT;

	/**
	 * The default value of the '{@link #getDisposalCarbon() <em>Disposal Carbon</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDisposalCarbon()
	 * @generated
	 * @ordered
	 */
	protected static final NullableQuantity DISPOSAL_CARBON_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
245
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kgCO\u2082eq/kg");
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276

	/**
	 * The cached value of the '{@link #getDisposalCarbon() <em>Disposal Carbon</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDisposalCarbon()
	 * @generated
	 * @ordered
	 */
	protected NullableQuantity disposalCarbon = DISPOSAL_CARBON_EDEFAULT;

	/**
	 * The default value of the '{@link #getDisposalDescription() <em>Disposal Description</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDisposalDescription()
	 * @generated
	 * @ordered
	 */
	protected static final String DISPOSAL_DESCRIPTION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getDisposalDescription() <em>Disposal Description</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDisposalDescription()
	 * @generated
	 * @ordered
	 */
	protected String disposalDescription = DISPOSAL_DESCRIPTION_EDEFAULT;

277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected MaterialImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return BuildingPhysicsPackage.Literals.MATERIAL;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
301
	@Override
302
303
	public String getMaterialId() {
		return materialId;
304
305
306
307
308
309
310
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
311
	@Override
312
313
314
	public void setMaterialId(String newMaterialId) {
		String oldMaterialId = materialId;
		materialId = newMaterialId;
315
		if (eNotificationRequired())
316
317
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__MATERIAL_ID,
					oldMaterialId, materialId));
318
319
320
321
322
323
324
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
325
	@Override
326
327
328
329
330
331
332
333
334
	public String getName() {
		return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
335
	@Override
336
337
338
339
340
341
342
343
344
345
346
347
348
	public void setName(String newName) {
		String oldName = name;
		name = newName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__NAME, oldName,
					name));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
349
	@Override
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
350
	public NullableQuantity getDensity() {
351
352
353
354
355
356
357
358
		return density;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
359
	@Override
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
360
361
	public void setDensity(NullableQuantity newDensity) {
		NullableQuantity oldDensity = density;
362
363
364
365
366
367
368
369
370
371
372
		density = newDensity;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__DENSITY, oldDensity,
					density));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
373
	@Override
374
	public NullableQuantity getHeatCapacity() {
375
376
377
378
379
380
381
382
		return heatCapacity;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
383
	@Override
384
385
	public void setHeatCapacity(NullableQuantity newHeatCapacity) {
		NullableQuantity oldHeatCapacity = heatCapacity;
386
387
388
389
390
391
392
393
394
395
396
		heatCapacity = newHeatCapacity;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY,
					oldHeatCapacity, heatCapacity));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
397
	@Override
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
398
	public NullableQuantity getConductivity() {
399
400
401
402
403
404
405
406
		return conductivity;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
407
	@Override
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
408
409
	public void setConductivity(NullableQuantity newConductivity) {
		NullableQuantity oldConductivity = conductivity;
410
411
412
413
414
415
		conductivity = newConductivity;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY,
					oldConductivity, conductivity));
	}

Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NullableQuantity getEmbodiedEnergy() {
		return embodiedEnergy;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setEmbodiedEnergy(NullableQuantity newEmbodiedEnergy) {
		NullableQuantity oldEmbodiedEnergy = embodiedEnergy;
		embodiedEnergy = newEmbodiedEnergy;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__EMBODIED_ENERGY,
					oldEmbodiedEnergy, embodiedEnergy));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NullableQuantity getEmbodiedCarbon() {
		return embodiedCarbon;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setEmbodiedCarbon(NullableQuantity newEmbodiedCarbon) {
		NullableQuantity oldEmbodiedCarbon = embodiedCarbon;
		embodiedCarbon = newEmbodiedCarbon;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__EMBODIED_CARBON,
					oldEmbodiedCarbon, embodiedCarbon));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String getConstructionDescription() {
		return constructionDescription;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setConstructionDescription(String newConstructionDescription) {
		String oldConstructionDescription = constructionDescription;
		constructionDescription = newConstructionDescription;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					BuildingPhysicsPackage.MATERIAL__CONSTRUCTION_DESCRIPTION, oldConstructionDescription,
					constructionDescription));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NullableQuantity getDisposalEnergy() {
		return disposalEnergy;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setDisposalEnergy(NullableQuantity newDisposalEnergy) {
		NullableQuantity oldDisposalEnergy = disposalEnergy;
		disposalEnergy = newDisposalEnergy;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__DISPOSAL_ENERGY,
					oldDisposalEnergy, disposalEnergy));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NullableQuantity getDisposalCarbon() {
		return disposalCarbon;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setDisposalCarbon(NullableQuantity newDisposalCarbon) {
		NullableQuantity oldDisposalCarbon = disposalCarbon;
		disposalCarbon = newDisposalCarbon;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__DISPOSAL_CARBON,
					oldDisposalCarbon, disposalCarbon));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String getDisposalDescription() {
		return disposalDescription;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setDisposalDescription(String newDisposalDescription) {
		String oldDisposalDescription = disposalDescription;
		disposalDescription = newDisposalDescription;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__DISPOSAL_DESCRIPTION,
					oldDisposalDescription, disposalDescription));
	}

561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public MaterialCategory getCategory() {
		if (eContainerFeatureID() != BuildingPhysicsPackage.MATERIAL__CATEGORY)
			return null;
		return (MaterialCategory) eInternalContainer();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetCategory(MaterialCategory newCategory, NotificationChain msgs) {
		msgs = eBasicSetContainer((InternalEObject) newCategory, BuildingPhysicsPackage.MATERIAL__CATEGORY, msgs);
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setCategory(MaterialCategory newCategory) {
		if (newCategory != eInternalContainer()
				|| (eContainerFeatureID() != BuildingPhysicsPackage.MATERIAL__CATEGORY && newCategory != null)) {
			if (EcoreUtil.isAncestor(this, newCategory))
				throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
			NotificationChain msgs = null;
			if (eInternalContainer() != null)
				msgs = eBasicRemoveFromContainer(msgs);
			if (newCategory != null)
				msgs = ((InternalEObject) newCategory).eInverseAdd(this,
						BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS, MaterialCategory.class, msgs);
			msgs = basicSetCategory(newCategory, msgs);
			if (msgs != null)
				msgs.dispatch();
		} else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__CATEGORY,
					newCategory, newCategory));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			if (eInternalContainer() != null)
				msgs = eBasicRemoveFromContainer(msgs);
			return basicSetCategory((MaterialCategory) otherEnd, msgs);
		}
		return super.eInverseAdd(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			return basicSetCategory(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
		switch (eContainerFeatureID()) {
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			return eInternalContainer().eInverseRemove(this, BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS,
					MaterialCategory.class, msgs);
		}
		return super.eBasicRemoveFromContainerFeature(msgs);
	}

653
654
655
656
657
658
659
660
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
661
662
		case BuildingPhysicsPackage.MATERIAL__MATERIAL_ID:
			return getMaterialId();
663
664
665
666
667
668
669
670
		case BuildingPhysicsPackage.MATERIAL__NAME:
			return getName();
		case BuildingPhysicsPackage.MATERIAL__DENSITY:
			return getDensity();
		case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
			return getHeatCapacity();
		case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
			return getConductivity();
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
671
672
673
674
675
676
677
678
679
680
681
682
		case BuildingPhysicsPackage.MATERIAL__EMBODIED_ENERGY:
			return getEmbodiedEnergy();
		case BuildingPhysicsPackage.MATERIAL__EMBODIED_CARBON:
			return getEmbodiedCarbon();
		case BuildingPhysicsPackage.MATERIAL__CONSTRUCTION_DESCRIPTION:
			return getConstructionDescription();
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_ENERGY:
			return getDisposalEnergy();
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_CARBON:
			return getDisposalCarbon();
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_DESCRIPTION:
			return getDisposalDescription();
683
684
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			return getCategory();
685
686
687
688
689
690
691
692
693
694
695
696
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
697
698
		case BuildingPhysicsPackage.MATERIAL__MATERIAL_ID:
			setMaterialId((String) newValue);
699
700
701
702
703
			return;
		case BuildingPhysicsPackage.MATERIAL__NAME:
			setName((String) newValue);
			return;
		case BuildingPhysicsPackage.MATERIAL__DENSITY:
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
704
			setDensity((NullableQuantity) newValue);
705
706
			return;
		case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
707
			setHeatCapacity((NullableQuantity) newValue);
708
709
			return;
		case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
710
			setConductivity((NullableQuantity) newValue);
711
			return;
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
		case BuildingPhysicsPackage.MATERIAL__EMBODIED_ENERGY:
			setEmbodiedEnergy((NullableQuantity) newValue);
			return;
		case BuildingPhysicsPackage.MATERIAL__EMBODIED_CARBON:
			setEmbodiedCarbon((NullableQuantity) newValue);
			return;
		case BuildingPhysicsPackage.MATERIAL__CONSTRUCTION_DESCRIPTION:
			setConstructionDescription((String) newValue);
			return;
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_ENERGY:
			setDisposalEnergy((NullableQuantity) newValue);
			return;
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_CARBON:
			setDisposalCarbon((NullableQuantity) newValue);
			return;
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_DESCRIPTION:
			setDisposalDescription((String) newValue);
			return;
730
731
732
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			setCategory((MaterialCategory) newValue);
			return;
733
734
735
736
737
738
739
740
741
742
743
744
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
745
746
		case BuildingPhysicsPackage.MATERIAL__MATERIAL_ID:
			setMaterialId(MATERIAL_ID_EDEFAULT);
747
748
749
750
751
752
753
754
755
756
757
758
759
			return;
		case BuildingPhysicsPackage.MATERIAL__NAME:
			setName(NAME_EDEFAULT);
			return;
		case BuildingPhysicsPackage.MATERIAL__DENSITY:
			setDensity(DENSITY_EDEFAULT);
			return;
		case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
			setHeatCapacity(HEAT_CAPACITY_EDEFAULT);
			return;
		case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
			setConductivity(CONDUCTIVITY_EDEFAULT);
			return;
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
		case BuildingPhysicsPackage.MATERIAL__EMBODIED_ENERGY:
			setEmbodiedEnergy(EMBODIED_ENERGY_EDEFAULT);
			return;
		case BuildingPhysicsPackage.MATERIAL__EMBODIED_CARBON:
			setEmbodiedCarbon(EMBODIED_CARBON_EDEFAULT);
			return;
		case BuildingPhysicsPackage.MATERIAL__CONSTRUCTION_DESCRIPTION:
			setConstructionDescription(CONSTRUCTION_DESCRIPTION_EDEFAULT);
			return;
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_ENERGY:
			setDisposalEnergy(DISPOSAL_ENERGY_EDEFAULT);
			return;
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_CARBON:
			setDisposalCarbon(DISPOSAL_CARBON_EDEFAULT);
			return;
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_DESCRIPTION:
			setDisposalDescription(DISPOSAL_DESCRIPTION_EDEFAULT);
			return;
778
779
780
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			setCategory((MaterialCategory) null);
			return;
781
782
783
784
785
786
787
788
789
790
791
792
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
793
794
		case BuildingPhysicsPackage.MATERIAL__MATERIAL_ID:
			return MATERIAL_ID_EDEFAULT == null ? materialId != null : !MATERIAL_ID_EDEFAULT.equals(materialId);
795
796
797
		case BuildingPhysicsPackage.MATERIAL__NAME:
			return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
		case BuildingPhysicsPackage.MATERIAL__DENSITY:
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
798
			return DENSITY_EDEFAULT == null ? density != null : !DENSITY_EDEFAULT.equals(density);
799
		case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
800
			return HEAT_CAPACITY_EDEFAULT == null ? heatCapacity != null : !HEAT_CAPACITY_EDEFAULT.equals(heatCapacity);
801
		case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
802
			return CONDUCTIVITY_EDEFAULT == null ? conductivity != null : !CONDUCTIVITY_EDEFAULT.equals(conductivity);
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
		case BuildingPhysicsPackage.MATERIAL__EMBODIED_ENERGY:
			return EMBODIED_ENERGY_EDEFAULT == null ? embodiedEnergy != null
					: !EMBODIED_ENERGY_EDEFAULT.equals(embodiedEnergy);
		case BuildingPhysicsPackage.MATERIAL__EMBODIED_CARBON:
			return EMBODIED_CARBON_EDEFAULT == null ? embodiedCarbon != null
					: !EMBODIED_CARBON_EDEFAULT.equals(embodiedCarbon);
		case BuildingPhysicsPackage.MATERIAL__CONSTRUCTION_DESCRIPTION:
			return CONSTRUCTION_DESCRIPTION_EDEFAULT == null ? constructionDescription != null
					: !CONSTRUCTION_DESCRIPTION_EDEFAULT.equals(constructionDescription);
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_ENERGY:
			return DISPOSAL_ENERGY_EDEFAULT == null ? disposalEnergy != null
					: !DISPOSAL_ENERGY_EDEFAULT.equals(disposalEnergy);
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_CARBON:
			return DISPOSAL_CARBON_EDEFAULT == null ? disposalCarbon != null
					: !DISPOSAL_CARBON_EDEFAULT.equals(disposalCarbon);
		case BuildingPhysicsPackage.MATERIAL__DISPOSAL_DESCRIPTION:
			return DISPOSAL_DESCRIPTION_EDEFAULT == null ? disposalDescription != null
					: !DISPOSAL_DESCRIPTION_EDEFAULT.equals(disposalDescription);
821
822
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			return getCategory() != null;
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy())
			return super.toString();

		StringBuilder result = new StringBuilder(super.toString());
838
839
		result.append(" (materialId: ");
		result.append(materialId);
840
841
842
843
844
845
846
847
		result.append(", name: ");
		result.append(name);
		result.append(", density: ");
		result.append(density);
		result.append(", heatCapacity: ");
		result.append(heatCapacity);
		result.append(", conductivity: ");
		result.append(conductivity);
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
848
849
850
851
852
853
854
855
856
857
858
859
		result.append(", embodiedEnergy: ");
		result.append(embodiedEnergy);
		result.append(", embodiedCarbon: ");
		result.append(embodiedCarbon);
		result.append(", constructionDescription: ");
		result.append(constructionDescription);
		result.append(", disposalEnergy: ");
		result.append(disposalEnergy);
		result.append(", disposalCarbon: ");
		result.append(disposalCarbon);
		result.append(", disposalDescription: ");
		result.append(disposalDescription);
860
861
862
863
864
		result.append(')');
		return result.toString();
	}

} //MaterialImpl