/**
* Copyright (c) 2013 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* itemis AG - initial API and implementation
*
*/
package org.eclipse.rmf.tests.serialization.env.emf.myreqif.impl;
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.EObjectImpl;
import org.eclipse.rmf.tests.serialization.env.emf.myreqif.ALTERNATIVEID;
import org.eclipse.rmf.tests.serialization.env.emf.myreqif.ALTERNATIVEIDType23;
import org.eclipse.rmf.tests.serialization.env.emf.myreqif.MyreqifPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>ALTERNATIVEID Type23</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.rmf.tests.serialization.env.emf.myreqif.impl.ALTERNATIVEIDType23Impl#getALTERNATIVEID <em>ALTERNATIVEID</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ALTERNATIVEIDType23Impl extends EObjectImpl implements ALTERNATIVEIDType23 {
/**
* The cached value of the '{@link #getALTERNATIVEID() <em>ALTERNATIVEID</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getALTERNATIVEID()
* @generated
* @ordered
*/
protected ALTERNATIVEID aLTERNATIVEID;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ALTERNATIVEIDType23Impl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return MyreqifPackage.Literals.ALTERNATIVEID_TYPE23;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ALTERNATIVEID getALTERNATIVEID() {
return aLTERNATIVEID;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetALTERNATIVEID(ALTERNATIVEID newALTERNATIVEID, NotificationChain msgs) {
ALTERNATIVEID oldALTERNATIVEID = aLTERNATIVEID;
aLTERNATIVEID = newALTERNATIVEID;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, MyreqifPackage.ALTERNATIVEID_TYPE23__ALTERNATIVEID, oldALTERNATIVEID, newALTERNATIVEID);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setALTERNATIVEID(ALTERNATIVEID newALTERNATIVEID) {
if (newALTERNATIVEID != aLTERNATIVEID) {
NotificationChain msgs = null;
if (aLTERNATIVEID != null)
msgs = ((InternalEObject)aLTERNATIVEID).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MyreqifPackage.ALTERNATIVEID_TYPE23__ALTERNATIVEID, null, msgs);
if (newALTERNATIVEID != null)
msgs = ((InternalEObject)newALTERNATIVEID).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - MyreqifPackage.ALTERNATIVEID_TYPE23__ALTERNATIVEID, null, msgs);
msgs = basicSetALTERNATIVEID(newALTERNATIVEID, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MyreqifPackage.ALTERNATIVEID_TYPE23__ALTERNATIVEID, newALTERNATIVEID, newALTERNATIVEID));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case MyreqifPackage.ALTERNATIVEID_TYPE23__ALTERNATIVEID:
return basicSetALTERNATIVEID(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 MyreqifPackage.ALTERNATIVEID_TYPE23__ALTERNATIVEID:
return getALTERNATIVEID();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case MyreqifPackage.ALTERNATIVEID_TYPE23__ALTERNATIVEID:
setALTERNATIVEID((ALTERNATIVEID)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case MyreqifPackage.ALTERNATIVEID_TYPE23__ALTERNATIVEID:
setALTERNATIVEID((ALTERNATIVEID)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case MyreqifPackage.ALTERNATIVEID_TYPE23__ALTERNATIVEID:
return aLTERNATIVEID != null;
}
return super.eIsSet(featureID);
}
} //ALTERNATIVEIDType23Impl