/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package fr.femtost.disc.eclipse.vhdlamslibrary.vhdlamsforsysmlprofile.impl;

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;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.topcased.sysml.Requirement;

import fr.femtost.disc.eclipse.vhdlamslibrary.vhdlamsforsysmlprofile.PSL;
import fr.femtost.disc.eclipse.vhdlamslibrary.vhdlamsforsysmlprofile.VhdlamsforsysmlprofilePackage;


/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>PSL</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link fr.femtost.disc.eclipse.vhdlamslibrary.vhdlamsforsysmlprofile.impl.PSLImpl#getBase_Requirement <em>Base Requirement</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class PSLImpl extends EObjectImpl implements PSL {
	/**
	 * The cached value of the '{@link #getBase_Requirement() <em>Base Requirement</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBase_Requirement()
	 * @generated
	 * @ordered
	 */
	protected Requirement base_Requirement;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected PSLImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return VhdlamsforsysmlprofilePackage.Literals.PSL;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Requirement getBase_Requirement() {
		if (base_Requirement != null && base_Requirement.eIsProxy()) {
			InternalEObject oldBase_Requirement = (InternalEObject)base_Requirement;
			base_Requirement = (Requirement)eResolveProxy(oldBase_Requirement);
			if (base_Requirement != oldBase_Requirement) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, VhdlamsforsysmlprofilePackage.PSL__BASE_REQUIREMENT, oldBase_Requirement, base_Requirement));
			}
		}
		return base_Requirement;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Requirement basicGetBase_Requirement() {
		return base_Requirement;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setBase_Requirement(Requirement newBase_Requirement) {
		Requirement oldBase_Requirement = base_Requirement;
		base_Requirement = newBase_Requirement;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, VhdlamsforsysmlprofilePackage.PSL__BASE_REQUIREMENT, oldBase_Requirement, base_Requirement));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case VhdlamsforsysmlprofilePackage.PSL__BASE_REQUIREMENT:
				if (resolve) return getBase_Requirement();
				return basicGetBase_Requirement();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case VhdlamsforsysmlprofilePackage.PSL__BASE_REQUIREMENT:
				setBase_Requirement((Requirement)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case VhdlamsforsysmlprofilePackage.PSL__BASE_REQUIREMENT:
				setBase_Requirement((Requirement)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case VhdlamsforsysmlprofilePackage.PSL__BASE_REQUIREMENT:
				return base_Requirement != null;
		}
		return super.eIsSet(featureID);
	}

} //PSLImpl
