blob: d142f0d792a0c54ae3115bea5b9b261815ac1535 [file] [log] [blame]
/**
*/
package io.shell.admin.aas._2._0.impl;
import io.shell.admin.aas._2._0.LangStringSetT;
import io.shell.admin.aas._2._0.MultiLanguagePropertyT;
import io.shell.admin.aas._2._0.ReferenceT;
import io.shell.admin.aas._2._0._0Package;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Multi Language Property T</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link io.shell.admin.aas._2._0.impl.MultiLanguagePropertyTImpl#getValueId <em>Value Id</em>}</li>
* <li>{@link io.shell.admin.aas._2._0.impl.MultiLanguagePropertyTImpl#getValue <em>Value</em>}</li>
* </ul>
*
* @generated
*/
public class MultiLanguagePropertyTImpl extends SubmodelElementAbstractTImpl implements MultiLanguagePropertyT {
/**
* The cached value of the '{@link #getValueId() <em>Value Id</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValueId()
* @generated
* @ordered
*/
protected ReferenceT valueId;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected LangStringSetT value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MultiLanguagePropertyTImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return _0Package.Literals.MULTI_LANGUAGE_PROPERTY_T;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ReferenceT getValueId() {
return valueId;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetValueId(ReferenceT newValueId, NotificationChain msgs) {
ReferenceT oldValueId = valueId;
valueId = newValueId;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE_ID, oldValueId, newValueId);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValueId(ReferenceT newValueId) {
if (newValueId != valueId) {
NotificationChain msgs = null;
if (valueId != null)
msgs = ((InternalEObject)valueId).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE_ID, null, msgs);
if (newValueId != null)
msgs = ((InternalEObject)newValueId).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE_ID, null, msgs);
msgs = basicSetValueId(newValueId, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE_ID, newValueId, newValueId));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LangStringSetT getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetValue(LangStringSetT newValue, NotificationChain msgs) {
LangStringSetT oldValue = value;
value = newValue;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE, oldValue, newValue);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(LangStringSetT newValue) {
if (newValue != value) {
NotificationChain msgs = null;
if (value != null)
msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE, null, msgs);
if (newValue != null)
msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE, null, msgs);
msgs = basicSetValue(newValue, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE, newValue, newValue));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE_ID:
return basicSetValueId(null, msgs);
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE:
return basicSetValue(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE_ID:
return getValueId();
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE:
return getValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE_ID:
setValueId((ReferenceT)newValue);
return;
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE:
setValue((LangStringSetT)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE_ID:
setValueId((ReferenceT)null);
return;
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE:
setValue((LangStringSetT)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE_ID:
return valueId != null;
case _0Package.MULTI_LANGUAGE_PROPERTY_T__VALUE:
return value != null;
}
return super.eIsSet(featureID);
}
} //MultiLanguagePropertyTImpl