/** | |
* <copyright> | |
* </copyright> | |
* | |
* $Id$ | |
*/ | |
package org.eclipse.gmf.examples.taipan.impl; | |
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; | |
import org.eclipse.gmf.examples.taipan.Building; | |
import org.eclipse.gmf.examples.taipan.TaiPanPackage; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Building</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link org.eclipse.gmf.examples.taipan.impl.BuildingImpl#getInfo <em>Info</em>}</li> | |
* <li>{@link org.eclipse.gmf.examples.taipan.impl.BuildingImpl#getStreet <em>Street</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class BuildingImpl extends EObjectImpl implements Building { | |
/** | |
* The default value of the '{@link #getInfo() <em>Info</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getInfo() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String INFO_EDEFAULT = null; | |
/** | |
* The cached value of the '{@link #getInfo() <em>Info</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getInfo() | |
* @generated | |
* @ordered | |
*/ | |
protected String info = INFO_EDEFAULT; | |
/** | |
* The default value of the '{@link #getStreet() <em>Street</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getStreet() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String STREET_EDEFAULT = null; | |
/** | |
* The cached value of the '{@link #getStreet() <em>Street</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getStreet() | |
* @generated | |
* @ordered | |
*/ | |
protected String street = STREET_EDEFAULT; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected BuildingImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return TaiPanPackage.Literals.BUILDING; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getInfo() { | |
return info; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setInfo(String newInfo) { | |
String oldInfo = info; | |
info = newInfo; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, TaiPanPackage.BUILDING__INFO, oldInfo, info)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getStreet() { | |
return street; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setStreet(String newStreet) { | |
String oldStreet = street; | |
street = newStreet; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, TaiPanPackage.BUILDING__STREET, oldStreet, street)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case TaiPanPackage.BUILDING__INFO: | |
return getInfo(); | |
case TaiPanPackage.BUILDING__STREET: | |
return getStreet(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case TaiPanPackage.BUILDING__INFO: | |
setInfo((String) newValue); | |
return; | |
case TaiPanPackage.BUILDING__STREET: | |
setStreet((String) newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case TaiPanPackage.BUILDING__INFO: | |
setInfo(INFO_EDEFAULT); | |
return; | |
case TaiPanPackage.BUILDING__STREET: | |
setStreet(STREET_EDEFAULT); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case TaiPanPackage.BUILDING__INFO: | |
return INFO_EDEFAULT == null ? info != null : !INFO_EDEFAULT.equals(info); | |
case TaiPanPackage.BUILDING__STREET: | |
return STREET_EDEFAULT == null ? street != null : !STREET_EDEFAULT.equals(street); | |
} | |
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(" (info: "); //$NON-NLS-1$ | |
result.append(info); | |
result.append(", street: "); //$NON-NLS-1$ | |
result.append(street); | |
result.append(')'); | |
return result.toString(); | |
} | |
} //BuildingImpl |