/** * <copyright> * </copyright> * * $Id$ */ package com.hundsun.ares.studio.usermacro.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 com.hundsun.ares.studio.usermacro.UserMacroItem; import com.hundsun.ares.studio.usermacro.UserMacroPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Item</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link com.hundsun.ares.studio.usermacro.impl.UserMacroItemImpl#getName <em>Name</em>}</li> * <li>{@link com.hundsun.ares.studio.usermacro.impl.UserMacroItemImpl#getSequence <em>Sequence</em>}</li> * <li>{@link com.hundsun.ares.studio.usermacro.impl.UserMacroItemImpl#getContent <em>Content</em>}</li> * <li>{@link com.hundsun.ares.studio.usermacro.impl.UserMacroItemImpl#getType <em>Type</em>}</li> * <li>{@link com.hundsun.ares.studio.usermacro.impl.UserMacroItemImpl#getDescription <em>Description</em>}</li> * </ul> * </p> * * @generated */ public class UserMacroItemImpl extends EObjectImpl implements UserMacroItem { /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = ""; /** * The cached value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * The default value of the '{@link #getSequence() <em>Sequence</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getSequence() * @generated * @ordered */ protected static final String SEQUENCE_EDEFAULT = ""; /** * The cached value of the '{@link #getSequence() <em>Sequence</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getSequence() * @generated * @ordered */ protected String sequence = SEQUENCE_EDEFAULT; /** * 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 = ""; /** * 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; /** * The default value of the '{@link #getType() <em>Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected static final String TYPE_EDEFAULT = ""; /** * The cached value of the '{@link #getType() <em>Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected String type = TYPE_EDEFAULT; /** * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDescription() * @generated * @ordered */ protected static final String DESCRIPTION_EDEFAULT = ""; /** * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDescription() * @generated * @ordered */ protected String description = DESCRIPTION_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public UserMacroItemImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return UserMacroPackage.Literals.USER_MACRO_ITEM; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UserMacroPackage.USER_MACRO_ITEM__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getSequence() { return sequence; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setSequence(String newSequence) { String oldSequence = sequence; sequence = newSequence; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UserMacroPackage.USER_MACRO_ITEM__SEQUENCE, oldSequence, sequence)); } /** * <!-- 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, UserMacroPackage.USER_MACRO_ITEM__CONTENT, oldContent, content)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getType() { return type; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setType(String newType) { String oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UserMacroPackage.USER_MACRO_ITEM__TYPE, oldType, type)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getDescription() { return description; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDescription(String newDescription) { String oldDescription = description; description = newDescription; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UserMacroPackage.USER_MACRO_ITEM__DESCRIPTION, oldDescription, description)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case UserMacroPackage.USER_MACRO_ITEM__NAME: return getName(); case UserMacroPackage.USER_MACRO_ITEM__SEQUENCE: return getSequence(); case UserMacroPackage.USER_MACRO_ITEM__CONTENT: return getContent(); case UserMacroPackage.USER_MACRO_ITEM__TYPE: return getType(); case UserMacroPackage.USER_MACRO_ITEM__DESCRIPTION: return getDescription(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case UserMacroPackage.USER_MACRO_ITEM__NAME: setName((String)newValue); return; case UserMacroPackage.USER_MACRO_ITEM__SEQUENCE: setSequence((String)newValue); return; case UserMacroPackage.USER_MACRO_ITEM__CONTENT: setContent((String)newValue); return; case UserMacroPackage.USER_MACRO_ITEM__TYPE: setType((String)newValue); return; case UserMacroPackage.USER_MACRO_ITEM__DESCRIPTION: setDescription((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case UserMacroPackage.USER_MACRO_ITEM__NAME: setName(NAME_EDEFAULT); return; case UserMacroPackage.USER_MACRO_ITEM__SEQUENCE: setSequence(SEQUENCE_EDEFAULT); return; case UserMacroPackage.USER_MACRO_ITEM__CONTENT: setContent(CONTENT_EDEFAULT); return; case UserMacroPackage.USER_MACRO_ITEM__TYPE: setType(TYPE_EDEFAULT); return; case UserMacroPackage.USER_MACRO_ITEM__DESCRIPTION: setDescription(DESCRIPTION_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case UserMacroPackage.USER_MACRO_ITEM__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case UserMacroPackage.USER_MACRO_ITEM__SEQUENCE: return SEQUENCE_EDEFAULT == null ? sequence != null : !SEQUENCE_EDEFAULT.equals(sequence); case UserMacroPackage.USER_MACRO_ITEM__CONTENT: return CONTENT_EDEFAULT == null ? content != null : !CONTENT_EDEFAULT.equals(content); case UserMacroPackage.USER_MACRO_ITEM__TYPE: return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); case UserMacroPackage.USER_MACRO_ITEM__DESCRIPTION: return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); } 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(" (name: "); result.append(name); result.append(", sequence: "); result.append(sequence); result.append(", content: "); result.append(content); result.append(", type: "); result.append(type); result.append(", description: "); result.append(description); result.append(')'); return result.toString(); } } //UserMacroItemImpl