blob: 055ce215fe56ad862e92f7991666098895710201 [file] [log] [blame]
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipse.stem.diseasemodels.standard.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.stem.core.model.STEMTime;
import org.eclipse.stem.core.model.impl.NodeDecoratorImpl;
import org.eclipse.stem.diseasemodels.standard.DiseaseInitializer;
import org.eclipse.stem.diseasemodels.standard.StandardPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Disease Initializer</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.stem.diseasemodels.standard.impl.DiseaseInitializerImpl#getDiseaseName <em>Disease Name</em>}</li>
* <li>{@link org.eclipse.stem.diseasemodels.standard.impl.DiseaseInitializerImpl#getPopulationIdentifier <em>Population Identifier</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public abstract class DiseaseInitializerImpl extends NodeDecoratorImpl implements DiseaseInitializer {
/**
* The default value of the '{@link #getDiseaseName() <em>Disease Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDiseaseName()
* @generated
* @ordered
*/
protected static final String DISEASE_NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getDiseaseName() <em>Disease Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDiseaseName()
* @generated
* @ordered
*/
protected String diseaseName = DISEASE_NAME_EDEFAULT;
/**
* The default value of the '{@link #getPopulationIdentifier() <em>Population Identifier</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPopulationIdentifier()
* @generated
* @ordered
*/
protected static final String POPULATION_IDENTIFIER_EDEFAULT = null;
/**
* The cached value of the '{@link #getPopulationIdentifier() <em>Population Identifier</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPopulationIdentifier()
* @generated
* @ordered
*/
protected String populationIdentifier = POPULATION_IDENTIFIER_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected DiseaseInitializerImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return StandardPackage.Literals.DISEASE_INITIALIZER;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getDiseaseName() {
return diseaseName;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDiseaseName(String newDiseaseName) {
String oldDiseaseName = diseaseName;
diseaseName = newDiseaseName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, StandardPackage.DISEASE_INITIALIZER__DISEASE_NAME, oldDiseaseName, diseaseName));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getPopulationIdentifier() {
return populationIdentifier;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPopulationIdentifier(String newPopulationIdentifier) {
String oldPopulationIdentifier = populationIdentifier;
populationIdentifier = newPopulationIdentifier;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, StandardPackage.DISEASE_INITIALIZER__POPULATION_IDENTIFIER, oldPopulationIdentifier, populationIdentifier));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StandardPackage.DISEASE_INITIALIZER__DISEASE_NAME:
return getDiseaseName();
case StandardPackage.DISEASE_INITIALIZER__POPULATION_IDENTIFIER:
return getPopulationIdentifier();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case StandardPackage.DISEASE_INITIALIZER__DISEASE_NAME:
setDiseaseName((String)newValue);
return;
case StandardPackage.DISEASE_INITIALIZER__POPULATION_IDENTIFIER:
setPopulationIdentifier((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case StandardPackage.DISEASE_INITIALIZER__DISEASE_NAME:
setDiseaseName(DISEASE_NAME_EDEFAULT);
return;
case StandardPackage.DISEASE_INITIALIZER__POPULATION_IDENTIFIER:
setPopulationIdentifier(POPULATION_IDENTIFIER_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case StandardPackage.DISEASE_INITIALIZER__DISEASE_NAME:
return DISEASE_NAME_EDEFAULT == null ? diseaseName != null : !DISEASE_NAME_EDEFAULT.equals(diseaseName);
case StandardPackage.DISEASE_INITIALIZER__POPULATION_IDENTIFIER:
return POPULATION_IDENTIFIER_EDEFAULT == null ? populationIdentifier != null : !POPULATION_IDENTIFIER_EDEFAULT.equals(populationIdentifier);
}
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(" (diseaseName: "); //$NON-NLS-1$
result.append(diseaseName);
result.append(", populationIdentifier: "); //$NON-NLS-1$
result.append(populationIdentifier);
result.append(')');
return result.toString();
}
@Override
public void updateLabels(STEMTime time, long timerPeriod, int cycle) {
// Do nothing
}
} //DiseaseInitializerImpl