/**
*
*
*
* $Id$
*/
package net.opengis.ows10.impl;
import net.opengis.ows10.Ows10Package;
import net.opengis.ows10.TelephoneType;
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;
/**
*
* An implementation of the model object 'Telephone Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.ows10.impl.TelephoneTypeImpl#getVoice Voice}
* - {@link net.opengis.ows10.impl.TelephoneTypeImpl#getFacsimile Facsimile}
*
*
*
* @generated
*/
public class TelephoneTypeImpl extends EObjectImpl implements TelephoneType {
/**
* The default value of the '{@link #getVoice() Voice}' attribute.
*
*
* @see #getVoice()
* @generated
* @ordered
*/
protected static final String VOICE_EDEFAULT = null;
/**
* The cached value of the '{@link #getVoice() Voice}' attribute.
*
*
* @see #getVoice()
* @generated
* @ordered
*/
protected String voice = VOICE_EDEFAULT;
/**
* The default value of the '{@link #getFacsimile() Facsimile}' attribute.
*
*
* @see #getFacsimile()
* @generated
* @ordered
*/
protected static final String FACSIMILE_EDEFAULT = null;
/**
* The cached value of the '{@link #getFacsimile() Facsimile}' attribute.
*
*
* @see #getFacsimile()
* @generated
* @ordered
*/
protected String facsimile = FACSIMILE_EDEFAULT;
/**
*
*
* @generated
*/
protected TelephoneTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Ows10Package.eINSTANCE.getTelephoneType();
}
/**
*
*
* @generated
*/
public String getVoice() {
return voice;
}
/**
*
*
* @generated
*/
public void setVoice(String newVoice) {
String oldVoice = voice;
voice = newVoice;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.TELEPHONE_TYPE__VOICE, oldVoice, voice));
}
/**
*
*
* @generated
*/
public String getFacsimile() {
return facsimile;
}
/**
*
*
* @generated
*/
public void setFacsimile(String newFacsimile) {
String oldFacsimile = facsimile;
facsimile = newFacsimile;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.TELEPHONE_TYPE__FACSIMILE, oldFacsimile, facsimile));
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Ows10Package.TELEPHONE_TYPE__VOICE:
return getVoice();
case Ows10Package.TELEPHONE_TYPE__FACSIMILE:
return getFacsimile();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Ows10Package.TELEPHONE_TYPE__VOICE:
setVoice((String)newValue);
return;
case Ows10Package.TELEPHONE_TYPE__FACSIMILE:
setFacsimile((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Ows10Package.TELEPHONE_TYPE__VOICE:
setVoice(VOICE_EDEFAULT);
return;
case Ows10Package.TELEPHONE_TYPE__FACSIMILE:
setFacsimile(FACSIMILE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Ows10Package.TELEPHONE_TYPE__VOICE:
return VOICE_EDEFAULT == null ? voice != null : !VOICE_EDEFAULT.equals(voice);
case Ows10Package.TELEPHONE_TYPE__FACSIMILE:
return FACSIMILE_EDEFAULT == null ? facsimile != null : !FACSIMILE_EDEFAULT.equals(facsimile);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (voice: ");
result.append(voice);
result.append(", facsimile: ");
result.append(facsimile);
result.append(')');
return result.toString();
}
} //TelephoneTypeImpl