/** | |
* <copyright> | |
* | |
* Copyright (c) 2014 itemis and others. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v2.0 | |
* which accompanies this distribution, and is available at | |
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html | |
* | |
* Contributors: | |
* itemis - Initial API and implementation | |
* | |
* </copyright> | |
*/ | |
package org.eclipse.sphinx.tests.emf.serialization.env.emf.myreqif.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.sphinx.tests.emf.serialization.env.emf.myreqif.MyreqifPackage; | |
import org.eclipse.sphinx.tests.emf.serialization.env.emf.myreqif.SOURCEType; | |
/** | |
* <!-- begin-user-doc --> An implementation of the model object '<em><b>SOURCE Type</b></em>'. <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link org.eclipse.sphinx.tests.emf.serialization.env.emf.myreqif.impl.SOURCETypeImpl#getSPECOBJECTREF <em>SPECOBJECTREF | |
* </em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class SOURCETypeImpl extends EObjectImpl implements SOURCEType { | |
/** | |
* The default value of the '{@link #getSPECOBJECTREF() <em>SPECOBJECTREF</em>}' attribute. <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* | |
* @see #getSPECOBJECTREF() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String SPECOBJECTREF_EDEFAULT = null; | |
/** | |
* The cached value of the '{@link #getSPECOBJECTREF() <em>SPECOBJECTREF</em>}' attribute. <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* | |
* @see #getSPECOBJECTREF() | |
* @generated | |
* @ordered | |
*/ | |
protected String sPECOBJECTREF = SPECOBJECTREF_EDEFAULT; | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
protected SOURCETypeImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return MyreqifPackage.Literals.SOURCE_TYPE; | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public String getSPECOBJECTREF() { | |
return sPECOBJECTREF; | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public void setSPECOBJECTREF(String newSPECOBJECTREF) { | |
String oldSPECOBJECTREF = sPECOBJECTREF; | |
sPECOBJECTREF = newSPECOBJECTREF; | |
if (eNotificationRequired()) { | |
eNotify(new ENotificationImpl(this, Notification.SET, MyreqifPackage.SOURCE_TYPE__SPECOBJECTREF, oldSPECOBJECTREF, sPECOBJECTREF)); | |
} | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case MyreqifPackage.SOURCE_TYPE__SPECOBJECTREF: | |
return getSPECOBJECTREF(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case MyreqifPackage.SOURCE_TYPE__SPECOBJECTREF: | |
setSPECOBJECTREF((String) newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case MyreqifPackage.SOURCE_TYPE__SPECOBJECTREF: | |
setSPECOBJECTREF(SPECOBJECTREF_EDEFAULT); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case MyreqifPackage.SOURCE_TYPE__SPECOBJECTREF: | |
return SPECOBJECTREF_EDEFAULT == null ? sPECOBJECTREF != null : !SPECOBJECTREF_EDEFAULT.equals(sPECOBJECTREF); | |
} | |
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(" (sPECOBJECTREF: "); | |
result.append(sPECOBJECTREF); | |
result.append(')'); | |
return result.toString(); | |
} | |
} // SOURCETypeImpl |