content: /**
   * <copyright>
   * </copyright>
   *
   * $Id$
   */
  package oscfg.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 oscfg.Configuration;
  import oscfg.OS;
  import oscfg.OscfgPackage;
  
  /**
   * <!-- begin-user-doc -->
   * An implementation of the model object '<em><b>Configuration</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * <ul>
   *   <li>{@link oscfg.impl.ConfigurationImpl#getOS <em>OS</em>}</li>
   *   <li>{@link oscfg.impl.ConfigurationImpl#getVersion <em>Version</em>}</li>
   * </ul>
   * </p>
   *
   * @generated
   */
  public class ConfigurationImpl extends EObjectImpl implements Configuration {
  	/**
  	 * The cached value of the '{@link #getOS() <em>OS</em>}' containment reference.
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @see #getOS()
  	 * @generated
  	 * @ordered
  	 */
  	protected OS os;
  
  	/**
  	 * The default value of the '{@link #getVersion() <em>Version</em>}' attribute.
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @see #getVersion()
  	 * @generated
  	 * @ordered
  	 */
  	protected static final String VERSION_EDEFAULT = "1.0";
  	/**
  	 * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute.
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @see #getVersion()
  	 * @generated
  	 * @ordered
  	 */
  	protected String version = VERSION_EDEFAULT;
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	protected ConfigurationImpl() {
  		super();
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	protected EClass eStaticClass() {
  		return OscfgPackage.Literals.CONFIGURATION;
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	public OS getOS() {
  		return os;
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	public NotificationChain basicSetOS(OS newOS, NotificationChain msgs) {
  		OS oldOS = os;
  		os = newOS;
  		if (eNotificationRequired()) {
  			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OscfgPackage.CONFIGURATION__OS, oldOS, newOS);
  			if (msgs == null) msgs = notification; else msgs.add(notification);
  		}
  		return msgs;
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	public void setOS(OS newOS) {
  		if (newOS != os) {
  			NotificationChain msgs = null;
  			if (os != null)
  				msgs = ((InternalEObject)os).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OscfgPackage.CONFIGURATION__OS, null, msgs);
  			if (newOS != null)
  				msgs = ((InternalEObject)newOS).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OscfgPackage.CONFIGURATION__OS, null, msgs);
  			msgs = basicSetOS(newOS, msgs);
  			if (msgs != null) msgs.dispatch();
  		}
  		else if (eNotificationRequired())
  			eNotify(new ENotificationImpl(this, Notification.SET, OscfgPackage.CONFIGURATION__OS, newOS, newOS));
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	public String getVersion() {
  		return version;
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	public void setVersion(String newVersion) {
  		String oldVersion = version;
  		version = newVersion;
  		if (eNotificationRequired())
  			eNotify(new ENotificationImpl(this, Notification.SET, OscfgPackage.CONFIGURATION__VERSION, oldVersion, version));
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
  		switch (featureID) {
  			case OscfgPackage.CONFIGURATION__OS:
  				return basicSetOS(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 OscfgPackage.CONFIGURATION__OS:
  				return getOS();
  			case OscfgPackage.CONFIGURATION__VERSION:
  				return getVersion();
  		}
  		return super.eGet(featureID, resolve, coreType);
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public void eSet(int featureID, Object newValue) {
  		switch (featureID) {
  			case OscfgPackage.CONFIGURATION__OS:
  				setOS((OS)newValue);
  				return;
  			case OscfgPackage.CONFIGURATION__VERSION:
  				setVersion((String)newValue);
  				return;
  		}
  		super.eSet(featureID, newValue);
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public void eUnset(int featureID) {
  		switch (featureID) {
  			case OscfgPackage.CONFIGURATION__OS:
  				setOS((OS)null);
  				return;
  			case OscfgPackage.CONFIGURATION__VERSION:
  				setVersion(VERSION_EDEFAULT);
  				return;
  		}
  		super.eUnset(featureID);
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public boolean eIsSet(int featureID) {
  		switch (featureID) {
  			case OscfgPackage.CONFIGURATION__OS:
  				return os != null;
  			case OscfgPackage.CONFIGURATION__VERSION:
  				return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
  		}
  		return super.eIsSet(featureID);
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public String toString() {
  		if (eIsProxy()) return super.toString();
  
  		StringBuffer result = new StringBuffer(super.toString());
  		result.append(" (Version: ");
  		result.append(version);
  		result.append(')');
  		return result.toString();
  	}
  
  } //ConfigurationImpl
  