| /** |
| * ******************************************************************************* |
| * Copyright (c) 2015-2021 Robert Bosch GmbH and others. |
| * |
| * This program and the accompanying materials are made |
| * available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Generated using Eclipse EMF |
| * |
| * ******************************************************************************* |
| */ |
| package org.eclipse.app4mc.amalthea.model.impl; |
| |
| import org.eclipse.app4mc.amalthea.model.AmaltheaPackage; |
| import org.eclipse.app4mc.amalthea.model.ProcessChain; |
| import org.eclipse.app4mc.amalthea.model.ProcessChainRequirement; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| 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>Process Chain Requirement</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.app4mc.amalthea.model.impl.ProcessChainRequirementImpl#getProcessChain <em>Process Chain</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ProcessChainRequirementImpl extends RequirementImpl implements ProcessChainRequirement { |
| /** |
| * The cached value of the '{@link #getProcessChain() <em>Process Chain</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getProcessChain() |
| * @generated |
| * @ordered |
| */ |
| protected ProcessChain processChain; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ProcessChainRequirementImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return AmaltheaPackage.eINSTANCE.getProcessChainRequirement(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public ProcessChain getProcessChain() { |
| if (processChain != null && processChain.eIsProxy()) { |
| InternalEObject oldProcessChain = (InternalEObject)processChain; |
| processChain = (ProcessChain)eResolveProxy(oldProcessChain); |
| if (processChain != oldProcessChain) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, AmaltheaPackage.PROCESS_CHAIN_REQUIREMENT__PROCESS_CHAIN, oldProcessChain, processChain)); |
| } |
| } |
| return processChain; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ProcessChain basicGetProcessChain() { |
| return processChain; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setProcessChain(ProcessChain newProcessChain) { |
| ProcessChain oldProcessChain = processChain; |
| processChain = newProcessChain; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, AmaltheaPackage.PROCESS_CHAIN_REQUIREMENT__PROCESS_CHAIN, oldProcessChain, processChain)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case AmaltheaPackage.PROCESS_CHAIN_REQUIREMENT__PROCESS_CHAIN: |
| if (resolve) return getProcessChain(); |
| return basicGetProcessChain(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case AmaltheaPackage.PROCESS_CHAIN_REQUIREMENT__PROCESS_CHAIN: |
| setProcessChain((ProcessChain)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case AmaltheaPackage.PROCESS_CHAIN_REQUIREMENT__PROCESS_CHAIN: |
| setProcessChain((ProcessChain)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case AmaltheaPackage.PROCESS_CHAIN_REQUIREMENT__PROCESS_CHAIN: |
| return processChain != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ProcessChainRequirementImpl |