/** * generated by Xtext 2.23.0 */ package fr.n7.pDL1.impl; import fr.n7.pDL1.PDL1Package; import fr.n7.pDL1.ProcessElement; import java.util.Collection; import org.eclipse.emf.common.notify.Notification; 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.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * * An implementation of the model object 'Process'. * *

* The following features are implemented: *

* * * @generated */ public class ProcessImpl extends MinimalEObjectImpl.Container implements fr.n7.pDL1.Process { /** * 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 cached value of the '{@link #getProcessElements() Process Elements}' containment reference list. * * * @see #getProcessElements() * @generated * @ordered */ protected EList processElements; /** * * * @generated */ protected ProcessImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return PDL1Package.Literals.PROCESS; } /** * * * @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, PDL1Package.PROCESS__NAME, oldName, name)); } /** * * * @generated */ @Override public EList getProcessElements() { if (processElements == null) { processElements = new EObjectContainmentEList(ProcessElement.class, this, PDL1Package.PROCESS__PROCESS_ELEMENTS); } return processElements; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case PDL1Package.PROCESS__PROCESS_ELEMENTS: return ((InternalEList)getProcessElements()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case PDL1Package.PROCESS__NAME: return getName(); case PDL1Package.PROCESS__PROCESS_ELEMENTS: return getProcessElements(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case PDL1Package.PROCESS__NAME: setName((String)newValue); return; case PDL1Package.PROCESS__PROCESS_ELEMENTS: getProcessElements().clear(); getProcessElements().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case PDL1Package.PROCESS__NAME: setName(NAME_EDEFAULT); return; case PDL1Package.PROCESS__PROCESS_ELEMENTS: getProcessElements().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case PDL1Package.PROCESS__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case PDL1Package.PROCESS__PROCESS_ELEMENTS: return processElements != null && !processElements.isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //ProcessImpl