/** | |
* <copyright> | |
* </copyright> | |
* | |
* $Id$ | |
*/ | |
package comrel.impl; | |
import comrel.ComrelPackage; | |
import comrel.ConditionCheck; | |
import comrel.DescribedElement; | |
import org.eclipse.emf.common.notify.Notification; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.impl.ENotificationImpl; | |
import org.eclipse.emf.ecore.impl.EObjectImpl; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Condition Check</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link comrel.impl.ConditionCheckImpl#getName <em>Name</em>}</li> | |
* <li>{@link comrel.impl.ConditionCheckImpl#getDescription <em>Description</em>}</li> | |
* <li>{@link comrel.impl.ConditionCheckImpl#getType <em>Type</em>}</li> | |
* <li>{@link comrel.impl.ConditionCheckImpl#getSpec <em>Spec</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class ConditionCheckImpl extends EObjectImpl implements ConditionCheck { | |
/** | |
* The default value of the '{@link #getName() <em>Name</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getName() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String NAME_EDEFAULT = null; | |
/** | |
* The cached value of the '{@link #getName() <em>Name</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getName() | |
* @generated | |
* @ordered | |
*/ | |
protected String name = NAME_EDEFAULT; | |
/** | |
* The default value of the '{@link #getDescription() <em>Description</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getDescription() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String DESCRIPTION_EDEFAULT = null; | |
/** | |
* The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getDescription() | |
* @generated | |
* @ordered | |
*/ | |
protected String description = DESCRIPTION_EDEFAULT; | |
/** | |
* The default value of the '{@link #getType() <em>Type</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getType() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String TYPE_EDEFAULT = "Condition Check"; | |
/** | |
* The cached value of the '{@link #getType() <em>Type</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getType() | |
* @generated | |
* @ordered | |
*/ | |
protected String type = TYPE_EDEFAULT; | |
/** | |
* The default value of the '{@link #getSpec() <em>Spec</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getSpec() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String SPEC_EDEFAULT = null; | |
/** | |
* The cached value of the '{@link #getSpec() <em>Spec</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getSpec() | |
* @generated | |
* @ordered | |
*/ | |
protected String spec = SPEC_EDEFAULT; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected ConditionCheckImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return ComrelPackage.Literals.CONDITION_CHECK; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getName() { | |
return name; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setName(String newName) { | |
String oldName = name; | |
name = newName; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, ComrelPackage.CONDITION_CHECK__NAME, oldName, name)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getDescription() { | |
return description; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setDescription(String newDescription) { | |
String oldDescription = description; | |
description = newDescription; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, ComrelPackage.CONDITION_CHECK__DESCRIPTION, oldDescription, description)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getType() { | |
return type; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getSpec() { | |
return spec; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setSpec(String newSpec) { | |
String oldSpec = spec; | |
spec = newSpec; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, ComrelPackage.CONDITION_CHECK__SPEC, oldSpec, spec)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case ComrelPackage.CONDITION_CHECK__NAME: | |
return getName(); | |
case ComrelPackage.CONDITION_CHECK__DESCRIPTION: | |
return getDescription(); | |
case ComrelPackage.CONDITION_CHECK__TYPE: | |
return getType(); | |
case ComrelPackage.CONDITION_CHECK__SPEC: | |
return getSpec(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case ComrelPackage.CONDITION_CHECK__NAME: | |
setName((String)newValue); | |
return; | |
case ComrelPackage.CONDITION_CHECK__DESCRIPTION: | |
setDescription((String)newValue); | |
return; | |
case ComrelPackage.CONDITION_CHECK__SPEC: | |
setSpec((String)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case ComrelPackage.CONDITION_CHECK__NAME: | |
setName(NAME_EDEFAULT); | |
return; | |
case ComrelPackage.CONDITION_CHECK__DESCRIPTION: | |
setDescription(DESCRIPTION_EDEFAULT); | |
return; | |
case ComrelPackage.CONDITION_CHECK__SPEC: | |
setSpec(SPEC_EDEFAULT); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case ComrelPackage.CONDITION_CHECK__NAME: | |
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | |
case ComrelPackage.CONDITION_CHECK__DESCRIPTION: | |
return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); | |
case ComrelPackage.CONDITION_CHECK__TYPE: | |
return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); | |
case ComrelPackage.CONDITION_CHECK__SPEC: | |
return SPEC_EDEFAULT == null ? spec != null : !SPEC_EDEFAULT.equals(spec); | |
} | |
return super.eIsSet(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { | |
if (baseClass == DescribedElement.class) { | |
switch (derivedFeatureID) { | |
case ComrelPackage.CONDITION_CHECK__DESCRIPTION: return ComrelPackage.DESCRIBED_ELEMENT__DESCRIPTION; | |
default: return -1; | |
} | |
} | |
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { | |
if (baseClass == DescribedElement.class) { | |
switch (baseFeatureID) { | |
case ComrelPackage.DESCRIBED_ELEMENT__DESCRIPTION: return ComrelPackage.CONDITION_CHECK__DESCRIPTION; | |
default: return -1; | |
} | |
} | |
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public String toString() { | |
if (eIsProxy()) return super.toString(); | |
StringBuffer result = new StringBuffer(super.toString()); | |
result.append(" (name: "); | |
result.append(name); | |
result.append(", description: "); | |
result.append(description); | |
result.append(", type: "); | |
result.append(type); | |
result.append(", spec: "); | |
result.append(spec); | |
result.append(')'); | |
return result.toString(); | |
} | |
} //ConditionCheckImpl |