/**
* <copyright>
* </copyright>
*
* $Id$
*/
package process.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.InternalEList;
import process.Activity;
import process.ProcessPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Process</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link process.impl.ProcessImpl#getContents <em>Contents</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ProcessImpl extends ProcessElementImpl implements process.Process {
/**
* The cached value of the '{@link #getContents() <em>Contents</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getContents()
* @generated
* @ordered
*/
protected EList contents;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ProcessImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EClass eStaticClass() {
return ProcessPackage.Literals.PROCESS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList getContents() {
if (contents == null) {
contents = new EObjectContainmentWithInverseEList(Activity.class, this, ProcessPackage.PROCESS__CONTENTS, ProcessPackage.ACTIVITY__PARENT);
}
return contents;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ProcessPackage.PROCESS__CONTENTS:
return ((InternalEList)getContents()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ProcessPackage.PROCESS__CONTENTS:
return ((InternalEList)getContents()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ProcessPackage.PROCESS__CONTENTS:
return getContents();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ProcessPackage.PROCESS__CONTENTS:
getContents().clear();
getContents().addAll((Collection)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case ProcessPackage.PROCESS__CONTENTS:
getContents().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case ProcessPackage.PROCESS__CONTENTS:
return contents != null && !contents.isEmpty();
}
return super.eIsSet(featureID);
}
} //ProcessImpl