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

import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Material;

8
import de.hftstuttgart.buildingphysics.MaterialCategory;
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
15
import org.eclipse.emf.common.notify.Notification;

16
import org.eclipse.emf.common.notify.NotificationChain;
17
18
import org.eclipse.emf.ecore.EClass;

19
import org.eclipse.emf.ecore.InternalEObject;
20
21
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
22
import org.eclipse.emf.ecore.util.EcoreUtil;
23
24
25
26
27
28
29
30
31

/**
 * <!-- 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>
32
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getMaterialId <em>Material Id</em>}</li>
33
34
35
36
 *   <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
37
38
39
40
41
42
 *   <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>
43
 *   <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getCategory <em>Category</em>}</li>
44
45
46
47
48
49
 * </ul>
 *
 * @generated
 */
public class MaterialImpl extends MinimalEObjectImpl.Container implements Material {
	/**
50
	 * The default value of the '{@link #getMaterialId() <em>Material Id</em>}' attribute.
51
52
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
53
	 * @see #getMaterialId()
54
55
56
	 * @generated
	 * @ordered
	 */
57
	protected static final String MATERIAL_ID_EDEFAULT = null;
58
59

	/**
60
	 * The cached value of the '{@link #getMaterialId() <em>Material Id</em>}' attribute.
61
62
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
63
	 * @see #getMaterialId()
64
65
66
	 * @generated
	 * @ordered
	 */
67
	protected String materialId = MATERIAL_ID_EDEFAULT;
68
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

	/**
	 * 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
97
98
	protected static final NullableQuantity DENSITY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kg/m\u00b3");
99
100
101
102
103
104
105
106
107

	/**
	 * 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
108
	protected NullableQuantity density = DENSITY_EDEFAULT;
109
110
111
112
113
114
115
116
117

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

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

	/**
	 * 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
139
140
	protected static final NullableQuantity CONDUCTIVITY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "W/(m*K)");
141
142
143
144
145
146
147
148
149

	/**
	 * 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
150
	protected NullableQuantity conductivity = CONDUCTIVITY_EDEFAULT;
151

Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
152
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
183
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
245
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
	/**
	 * 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
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kg");

	/**
	 * 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
			.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "kg");

	/**
	 * 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;

276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
	/**
	 * <!-- 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
300
	@Override
301
302
	public String getMaterialId() {
		return materialId;
303
304
305
306
307
308
309
	}

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

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

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
334
	@Override
335
336
337
338
339
340
341
342
343
344
345
346
347
	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
348
	@Override
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
349
	public NullableQuantity getDensity() {
350
351
352
353
354
355
356
357
		return density;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
358
	@Override
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
359
360
	public void setDensity(NullableQuantity newDensity) {
		NullableQuantity oldDensity = density;
361
362
363
364
365
366
367
368
369
370
371
		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
372
	@Override
373
	public NullableQuantity getHeatCapacity() {
374
375
376
377
378
379
380
381
		return heatCapacity;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
382
	@Override
383
384
	public void setHeatCapacity(NullableQuantity newHeatCapacity) {
		NullableQuantity oldHeatCapacity = heatCapacity;
385
386
387
388
389
390
391
392
393
394
395
		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
396
	@Override
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
397
	public NullableQuantity getConductivity() {
398
399
400
401
402
403
404
405
		return conductivity;
	}

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

Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
415
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
	/**
	 * <!-- 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));
	}

560
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
	/**
	 * <!-- 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);
	}

652
653
654
655
656
657
658
659
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
660
661
		case BuildingPhysicsPackage.MATERIAL__MATERIAL_ID:
			return getMaterialId();
662
663
664
665
666
667
668
669
		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
670
671
672
673
674
675
676
677
678
679
680
681
		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();
682
683
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			return getCategory();
684
685
686
687
688
689
690
691
692
693
694
695
		}
		return super.eGet(featureID, resolve, coreType);
	}

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

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
744
745
		case BuildingPhysicsPackage.MATERIAL__MATERIAL_ID:
			setMaterialId(MATERIAL_ID_EDEFAULT);
746
747
748
749
750
751
752
753
754
755
756
757
758
			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
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
		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;
777
778
779
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			setCategory((MaterialCategory) null);
			return;
780
781
782
783
784
785
786
787
788
789
790
791
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
792
793
		case BuildingPhysicsPackage.MATERIAL__MATERIAL_ID:
			return MATERIAL_ID_EDEFAULT == null ? materialId != null : !MATERIAL_ID_EDEFAULT.equals(materialId);
794
795
796
		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
797
			return DENSITY_EDEFAULT == null ? density != null : !DENSITY_EDEFAULT.equals(density);
798
		case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
799
			return HEAT_CAPACITY_EDEFAULT == null ? heatCapacity != null : !HEAT_CAPACITY_EDEFAULT.equals(heatCapacity);
800
		case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
801
			return CONDUCTIVITY_EDEFAULT == null ? conductivity != null : !CONDUCTIVITY_EDEFAULT.equals(conductivity);
Kai-Holger Brassel's avatar
Kai-Holger Brassel committed
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
		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);
820
821
		case BuildingPhysicsPackage.MATERIAL__CATEGORY:
			return getCategory() != null;
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
		}
		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());
837
838
		result.append(" (materialId: ");
		result.append(materialId);
839
840
841
842
843
844
845
846
		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
847
848
849
850
851
852
853
854
855
856
857
858
		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);
859
860
861
862
863
		result.append(')');
		return result.toString();
	}

} //MaterialImpl