/** * Copyright (c) 2013 United States Government as represented by the Administrator for The National Aeronautics and Space Administration. All Rights Reserved. * */ package net.certware.sacm.SACM.impl; import net.certware.sacm.SACM.Annotation; import net.certware.sacm.SACM.SACMPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Annotation</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.certware.sacm.SACM.impl.AnnotationImpl#getContent <em>Content</em>}</li> * </ul> * </p> * * @generated */ public class AnnotationImpl extends UtilityElementImpl implements Annotation { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final String copyright = "Copyright (c) 2013 United States Government as represented by the Administrator for The National Aeronautics and Space Administration. All Rights Reserved.\n"; //$NON-NLS-1$ /** * The default value of the '{@link #getContent() <em>Content</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getContent() * @generated * @ordered */ protected static final String CONTENT_EDEFAULT = null; /** * The cached value of the '{@link #getContent() <em>Content</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getContent() * @generated * @ordered */ protected String content = CONTENT_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected AnnotationImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return SACMPackage.Literals.ANNOTATION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getContent() { return content; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setContent(String newContent) { String oldContent = content; content = newContent; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SACMPackage.ANNOTATION__CONTENT, oldContent, content)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SACMPackage.ANNOTATION__CONTENT: return getContent(); } return eDynamicGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SACMPackage.ANNOTATION__CONTENT: setContent((String)newValue); return; } eDynamicSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SACMPackage.ANNOTATION__CONTENT: setContent(CONTENT_EDEFAULT); return; } eDynamicUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SACMPackage.ANNOTATION__CONTENT: return CONTENT_EDEFAULT == null ? content != null : !CONTENT_EDEFAULT.equals(content); } return eDynamicIsSet(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(" (content: "); //$NON-NLS-1$ result.append(content); result.append(')'); return result.toString(); } } //AnnotationImpl