/** */ package de.hftstuttgart.buildingphysics.impl; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.LifeCycle; import de.hftstuttgart.buildingphysics.WindowType; import de.hftstuttgart.cityunits.model.NullableQuantity; import de.hftstuttgart.cityunits.model.quantities.QuantitiesFactory; import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; /** * * An implementation of the model object 'Window Type'. * *

* The following features are implemented: *

* * * @generated */ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements WindowType { /** * The default value of the '{@link #getId() Id}' attribute. * * * @see #getId() * @generated * @ordered */ protected static final int ID_EDEFAULT = 0; /** * The cached value of the '{@link #getId() Id}' attribute. * * * @see #getId() * @generated * @ordered */ protected int id = ID_EDEFAULT; /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * The default value of the '{@link #getUValue() UValue}' attribute. * * * @see #getUValue() * @generated * @ordered */ protected static final NullableQuantity UVALUE_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE .createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "W/(m\u00b2*K)"); /** * The cached value of the '{@link #getUValue() UValue}' attribute. * * * @see #getUValue() * @generated * @ordered */ protected NullableQuantity uValue = UVALUE_EDEFAULT; /** * The default value of the '{@link #getGValue() GValue}' attribute. * * * @see #getGValue() * @generated * @ordered */ protected static final double GVALUE_EDEFAULT = 0.0; /** * The cached value of the '{@link #getGValue() GValue}' attribute. * * * @see #getGValue() * @generated * @ordered */ protected double gValue = GVALUE_EDEFAULT; /** * The default value of the '{@link #getGlazingNumber() Glazing Number}' attribute. * * * @see #getGlazingNumber() * @generated * @ordered */ protected static final int GLAZING_NUMBER_EDEFAULT = 1; /** * The cached value of the '{@link #getGlazingNumber() Glazing Number}' attribute. * * * @see #getGlazingNumber() * @generated * @ordered */ protected int glazingNumber = GLAZING_NUMBER_EDEFAULT; /** * The default value of the '{@link #getFrameRatio() Frame Ratio}' attribute. * * * @see #getFrameRatio() * @generated * @ordered */ protected static final double FRAME_RATIO_EDEFAULT = 0.0; /** * The cached value of the '{@link #getFrameRatio() Frame Ratio}' attribute. * * * @see #getFrameRatio() * @generated * @ordered */ protected double frameRatio = FRAME_RATIO_EDEFAULT; /** * The cached value of the '{@link #getLifeCycle() Life Cycle}' containment reference. * * * @see #getLifeCycle() * @generated * @ordered */ protected LifeCycle lifeCycle; /** * * * @generated */ protected WindowTypeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return BuildingPhysicsPackage.Literals.WINDOW_TYPE; } /** * * * @generated */ @Override public int getId() { return id; } /** * * * @generated */ @Override public void setId(int newId) { int oldId = id; id = newId; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__ID, oldId, id)); } /** * * * @generated */ @Override public String getName() { return name; } /** * * * @generated */ @Override public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__NAME, oldName, name)); } /** * * * @generated */ @Override public NullableQuantity getUValue() { return uValue; } /** * * * @generated */ @Override public void setUValue(NullableQuantity newUValue) { NullableQuantity oldUValue = uValue; uValue = newUValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__UVALUE, oldUValue, uValue)); } /** * * * @generated */ @Override public double getGValue() { return gValue; } /** * * * @generated */ @Override public void setGValue(double newGValue) { double oldGValue = gValue; gValue = newGValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__GVALUE, oldGValue, gValue)); } /** * * * @generated */ @Override public int getGlazingNumber() { return glazingNumber; } /** * * * @generated */ @Override public void setGlazingNumber(int newGlazingNumber) { int oldGlazingNumber = glazingNumber; glazingNumber = newGlazingNumber; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER, oldGlazingNumber, glazingNumber)); } /** * * * @generated */ @Override public double getFrameRatio() { return frameRatio; } /** * * * @generated */ @Override public void setFrameRatio(double newFrameRatio) { double oldFrameRatio = frameRatio; frameRatio = newFrameRatio; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO, oldFrameRatio, frameRatio)); } /** * * * @generated */ @Override public LifeCycle getLifeCycle() { return lifeCycle; } /** * * * @generated */ public NotificationChain basicSetLifeCycle(LifeCycle newLifeCycle, NotificationChain msgs) { LifeCycle oldLifeCycle = lifeCycle; lifeCycle = newLifeCycle; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE, oldLifeCycle, newLifeCycle); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setLifeCycle(LifeCycle newLifeCycle) { if (newLifeCycle != lifeCycle) { NotificationChain msgs = null; if (lifeCycle != null) msgs = ((InternalEObject) lifeCycle).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE, null, msgs); if (newLifeCycle != null) msgs = ((InternalEObject) newLifeCycle).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE, null, msgs); msgs = basicSetLifeCycle(newLifeCycle, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE, newLifeCycle, newLifeCycle)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: return basicSetLifeCycle(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case BuildingPhysicsPackage.WINDOW_TYPE__ID: return getId(); case BuildingPhysicsPackage.WINDOW_TYPE__NAME: return getName(); case BuildingPhysicsPackage.WINDOW_TYPE__UVALUE: return getUValue(); case BuildingPhysicsPackage.WINDOW_TYPE__GVALUE: return getGValue(); case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER: return getGlazingNumber(); case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: return getFrameRatio(); case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: return getLifeCycle(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case BuildingPhysicsPackage.WINDOW_TYPE__ID: setId((Integer) newValue); return; case BuildingPhysicsPackage.WINDOW_TYPE__NAME: setName((String) newValue); return; case BuildingPhysicsPackage.WINDOW_TYPE__UVALUE: setUValue((NullableQuantity) newValue); return; case BuildingPhysicsPackage.WINDOW_TYPE__GVALUE: setGValue((Double) newValue); return; case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER: setGlazingNumber((Integer) newValue); return; case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: setFrameRatio((Double) newValue); return; case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: setLifeCycle((LifeCycle) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case BuildingPhysicsPackage.WINDOW_TYPE__ID: setId(ID_EDEFAULT); return; case BuildingPhysicsPackage.WINDOW_TYPE__NAME: setName(NAME_EDEFAULT); return; case BuildingPhysicsPackage.WINDOW_TYPE__UVALUE: setUValue(UVALUE_EDEFAULT); return; case BuildingPhysicsPackage.WINDOW_TYPE__GVALUE: setGValue(GVALUE_EDEFAULT); return; case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER: setGlazingNumber(GLAZING_NUMBER_EDEFAULT); return; case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: setFrameRatio(FRAME_RATIO_EDEFAULT); return; case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: setLifeCycle((LifeCycle) null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case BuildingPhysicsPackage.WINDOW_TYPE__ID: return id != ID_EDEFAULT; case BuildingPhysicsPackage.WINDOW_TYPE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case BuildingPhysicsPackage.WINDOW_TYPE__UVALUE: return UVALUE_EDEFAULT == null ? uValue != null : !UVALUE_EDEFAULT.equals(uValue); case BuildingPhysicsPackage.WINDOW_TYPE__GVALUE: return gValue != GVALUE_EDEFAULT; case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER: return glazingNumber != GLAZING_NUMBER_EDEFAULT; case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: return frameRatio != FRAME_RATIO_EDEFAULT; case BuildingPhysicsPackage.WINDOW_TYPE__LIFE_CYCLE: return lifeCycle != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (id: "); result.append(id); result.append(", name: "); result.append(name); result.append(", uValue: "); result.append(uValue); result.append(", gValue: "); result.append(gValue); result.append(", glazingNumber: "); result.append(glazingNumber); result.append(", frameRatio: "); result.append(frameRatio); result.append(')'); return result.toString(); } } //WindowTypeImpl