blob: 14b4729e4fa5129d3ea2b9fb8162a3cdf06c1a60 [file] [log] [blame]
/**
* <copyright>
* </copyright>
*
* $Id: DescriptorImpl.java,v 1.2 2008/01/30 00:41:47 klow Exp $
*/
package org.eclipse.epf.xml.uma.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.epf.xml.uma.Descriptor;
import org.eclipse.epf.xml.uma.UmaPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Descriptor</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.epf.xml.uma.impl.DescriptorImpl#isIsSynchronizedWithSource <em>Is Synchronized With Source</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class DescriptorImpl extends BreakdownElementImpl implements Descriptor {
/**
* The default value of the '{@link #isIsSynchronizedWithSource() <em>Is Synchronized With Source</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsSynchronizedWithSource()
* @generated
* @ordered
*/
protected static final boolean IS_SYNCHRONIZED_WITH_SOURCE_EDEFAULT = false;
/**
* The cached value of the '{@link #isIsSynchronizedWithSource() <em>Is Synchronized With Source</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsSynchronizedWithSource()
* @generated
* @ordered
*/
protected boolean isSynchronizedWithSource = IS_SYNCHRONIZED_WITH_SOURCE_EDEFAULT;
/**
* This is true if the Is Synchronized With Source attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean isSynchronizedWithSourceESet;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected DescriptorImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return UmaPackage.Literals.DESCRIPTOR;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isIsSynchronizedWithSource() {
return isSynchronizedWithSource;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIsSynchronizedWithSource(boolean newIsSynchronizedWithSource) {
boolean oldIsSynchronizedWithSource = isSynchronizedWithSource;
isSynchronizedWithSource = newIsSynchronizedWithSource;
boolean oldIsSynchronizedWithSourceESet = isSynchronizedWithSourceESet;
isSynchronizedWithSourceESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, UmaPackage.DESCRIPTOR__IS_SYNCHRONIZED_WITH_SOURCE, oldIsSynchronizedWithSource, isSynchronizedWithSource, !oldIsSynchronizedWithSourceESet));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void unsetIsSynchronizedWithSource() {
boolean oldIsSynchronizedWithSource = isSynchronizedWithSource;
boolean oldIsSynchronizedWithSourceESet = isSynchronizedWithSourceESet;
isSynchronizedWithSource = IS_SYNCHRONIZED_WITH_SOURCE_EDEFAULT;
isSynchronizedWithSourceESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, UmaPackage.DESCRIPTOR__IS_SYNCHRONIZED_WITH_SOURCE, oldIsSynchronizedWithSource, IS_SYNCHRONIZED_WITH_SOURCE_EDEFAULT, oldIsSynchronizedWithSourceESet));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetIsSynchronizedWithSource() {
return isSynchronizedWithSourceESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case UmaPackage.DESCRIPTOR__IS_SYNCHRONIZED_WITH_SOURCE:
return isIsSynchronizedWithSource() ? Boolean.TRUE : Boolean.FALSE;
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case UmaPackage.DESCRIPTOR__IS_SYNCHRONIZED_WITH_SOURCE:
setIsSynchronizedWithSource(((Boolean)newValue).booleanValue());
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case UmaPackage.DESCRIPTOR__IS_SYNCHRONIZED_WITH_SOURCE:
unsetIsSynchronizedWithSource();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case UmaPackage.DESCRIPTOR__IS_SYNCHRONIZED_WITH_SOURCE:
return isSetIsSynchronizedWithSource();
}
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(" (isSynchronizedWithSource: ");
if (isSynchronizedWithSourceESet) result.append(isSynchronizedWithSource); else result.append("<unset>");
result.append(')');
return result.toString();
}
} //DescriptorImpl