/**
* generated by Xtext 2.12.0
*/
package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.File;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PartialModelEntry;
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.MinimalEObjectImpl;
/**
*
* An implementation of the model object 'Partial Model Entry'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.PartialModelEntryImpl#getPath Path}
*
*
* @generated
*/
public class PartialModelEntryImpl extends MinimalEObjectImpl.Container implements PartialModelEntry
{
/**
* The cached value of the '{@link #getPath() Path}' containment reference.
*
*
* @see #getPath()
* @generated
* @ordered
*/
protected File path;
/**
*
*
* @generated
*/
protected PartialModelEntryImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return ApplicationConfigurationPackage.Literals.PARTIAL_MODEL_ENTRY;
}
/**
*
*
* @generated
*/
public File getPath()
{
return path;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetPath(File newPath, NotificationChain msgs)
{
File oldPath = path;
path = newPath;
if (eNotificationRequired())
{
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.PARTIAL_MODEL_ENTRY__PATH, oldPath, newPath);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
public void setPath(File newPath)
{
if (newPath != path)
{
NotificationChain msgs = null;
if (path != null)
msgs = ((InternalEObject)path).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplicationConfigurationPackage.PARTIAL_MODEL_ENTRY__PATH, null, msgs);
if (newPath != null)
msgs = ((InternalEObject)newPath).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplicationConfigurationPackage.PARTIAL_MODEL_ENTRY__PATH, null, msgs);
msgs = basicSetPath(newPath, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.PARTIAL_MODEL_ENTRY__PATH, newPath, newPath));
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PARTIAL_MODEL_ENTRY__PATH:
return basicSetPath(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PARTIAL_MODEL_ENTRY__PATH:
return getPath();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PARTIAL_MODEL_ENTRY__PATH:
setPath((File)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PARTIAL_MODEL_ENTRY__PATH:
setPath((File)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PARTIAL_MODEL_ENTRY__PATH:
return path != null;
}
return super.eIsSet(featureID);
}
} //PartialModelEntryImpl