//------------------------------------------------------------------------------ // Copyright (c) 2005, 2006 IBM Corporation and others. // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at // http://www.eclipse.org/legal/epl-v10.html // // Contributors: // IBM Corporation - initial implementation //------------------------------------------------------------------------------ package org.eclipse.epf.uma.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.epf.uma.GuidanceDescription; import org.eclipse.epf.uma.UmaPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Guidance Description</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.epf.uma.impl.GuidanceDescriptionImpl#getAttachments <em>Attachments</em>}</li> * </ul> * </p> * * @generated */ public class GuidanceDescriptionImpl extends ContentDescriptionImpl implements GuidanceDescription { /** * The default value of the '{@link #getAttachments() <em>Attachments</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAttachments() * @generated * @ordered */ protected static final String ATTACHMENTS_EDEFAULT = ""; /** * The cached value of the '{@link #getAttachments() <em>Attachments</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAttachments() * @generated * @ordered */ protected String attachments = ATTACHMENTS_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected GuidanceDescriptionImpl() { super(); //UMA--> reassignDefaultValues(); //UMA<-- } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return UmaPackage.Literals.GUIDANCE_DESCRIPTION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getAttachments() { return attachments; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAttachments(String newAttachments) { String oldAttachments = attachments; attachments = newAttachments; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UmaPackage.GUIDANCE_DESCRIPTION__ATTACHMENTS, oldAttachments, attachments)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case UmaPackage.GUIDANCE_DESCRIPTION__ATTACHMENTS: return getAttachments(); } 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.GUIDANCE_DESCRIPTION__ATTACHMENTS: setAttachments((String) newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case UmaPackage.GUIDANCE_DESCRIPTION__ATTACHMENTS: setAttachments(ATTACHMENTS_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { //UMA--> EStructuralFeature feature = getFeatureWithOverridenDefaultValue(featureID); if (feature != null) { return isFeatureWithOverridenDefaultValueSet(feature); } //UMA<-- switch (featureID) { case UmaPackage.GUIDANCE_DESCRIPTION__ATTACHMENTS: return ATTACHMENTS_EDEFAULT == null ? attachments != null : !ATTACHMENTS_EDEFAULT.equals(attachments); } 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(" (attachments: "); //$NON-NLS-1$ result.append(attachments); result.append(')'); return result.toString(); } } //GuidanceDescriptionImpl