/**
*/
package hu.bme.mit.inf.dslreasoner.logic.model.logicresult.impl;
import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.InsuficientResourcesResult;
import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Insuficient Resources Result'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.logic.model.logicresult.impl.InsuficientResourcesResultImpl#getResourceName Resource Name}
*
*
* @generated
*/
public class InsuficientResourcesResultImpl extends UnknownResultImpl implements InsuficientResourcesResult {
/**
* The default value of the '{@link #getResourceName() Resource Name}' attribute.
*
*
* @see #getResourceName()
* @generated
* @ordered
*/
protected static final String RESOURCE_NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getResourceName() Resource Name}' attribute.
*
*
* @see #getResourceName()
* @generated
* @ordered
*/
protected String resourceName = RESOURCE_NAME_EDEFAULT;
/**
*
*
* @generated
*/
protected InsuficientResourcesResultImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return LogicresultPackage.Literals.INSUFICIENT_RESOURCES_RESULT;
}
/**
*
*
* @generated
*/
@Override
public String getResourceName() {
return resourceName;
}
/**
*
*
* @generated
*/
@Override
public void setResourceName(String newResourceName) {
String oldResourceName = resourceName;
resourceName = newResourceName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, LogicresultPackage.INSUFICIENT_RESOURCES_RESULT__RESOURCE_NAME, oldResourceName, resourceName));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case LogicresultPackage.INSUFICIENT_RESOURCES_RESULT__RESOURCE_NAME:
return getResourceName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case LogicresultPackage.INSUFICIENT_RESOURCES_RESULT__RESOURCE_NAME:
setResourceName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case LogicresultPackage.INSUFICIENT_RESOURCES_RESULT__RESOURCE_NAME:
setResourceName(RESOURCE_NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case LogicresultPackage.INSUFICIENT_RESOURCES_RESULT__RESOURCE_NAME:
return RESOURCE_NAME_EDEFAULT == null ? resourceName != null : !RESOURCE_NAME_EDEFAULT.equals(resourceName);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (resourceName: ");
result.append(resourceName);
result.append(')');
return result.toString();
}
} //InsuficientResourcesResultImpl