3 package org.opendaylight.nemo.tool.eclipse.plugin.editor.impl;
5 import org.eclipse.emf.common.notify.Notification;
7 import org.eclipse.emf.ecore.EClass;
9 import org.eclipse.emf.ecore.impl.ENotificationImpl;
11 import org.opendaylight.nemo.tool.eclipse.plugin.editor.EditorPackage;
12 import org.opendaylight.nemo.tool.eclipse.plugin.editor.Flow;
15 * <!-- begin-user-doc -->
16 * An implementation of the model object '<em><b>Flow</b></em>'.
17 * <!-- end-user-doc -->
19 * The following features are implemented:
22 * <li>{@link org.opendaylight.nemo.tool.eclipse.plugin.editor.impl.FlowImpl#getName <em>Name</em>}</li>
27 public class FlowImpl extends SentenceImpl implements Flow
30 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
31 * <!-- begin-user-doc -->
32 * <!-- end-user-doc -->
37 protected static final String NAME_EDEFAULT = null;
40 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
41 * <!-- begin-user-doc -->
42 * <!-- end-user-doc -->
47 protected String name = NAME_EDEFAULT;
50 * <!-- begin-user-doc -->
51 * <!-- end-user-doc -->
60 * <!-- begin-user-doc -->
61 * <!-- end-user-doc -->
65 protected EClass eStaticClass()
67 return EditorPackage.Literals.FLOW;
71 * <!-- begin-user-doc -->
72 * <!-- end-user-doc -->
75 public String getName()
81 * <!-- begin-user-doc -->
82 * <!-- end-user-doc -->
85 public void setName(String newName)
87 String oldName = name;
89 if (eNotificationRequired())
90 eNotify(new ENotificationImpl(this, Notification.SET, EditorPackage.FLOW__NAME, oldName, name));
94 * <!-- begin-user-doc -->
95 * <!-- end-user-doc -->
99 public Object eGet(int featureID, boolean resolve, boolean coreType)
103 case EditorPackage.FLOW__NAME:
106 return super.eGet(featureID, resolve, coreType);
110 * <!-- begin-user-doc -->
111 * <!-- end-user-doc -->
115 public void eSet(int featureID, Object newValue)
119 case EditorPackage.FLOW__NAME:
120 setName((String)newValue);
123 super.eSet(featureID, newValue);
127 * <!-- begin-user-doc -->
128 * <!-- end-user-doc -->
132 public void eUnset(int featureID)
136 case EditorPackage.FLOW__NAME:
137 setName(NAME_EDEFAULT);
140 super.eUnset(featureID);
144 * <!-- begin-user-doc -->
145 * <!-- end-user-doc -->
149 public boolean eIsSet(int featureID)
153 case EditorPackage.FLOW__NAME:
154 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
156 return super.eIsSet(featureID);
160 * <!-- begin-user-doc -->
161 * <!-- end-user-doc -->
165 public String toString()
167 if (eIsProxy()) return super.toString();
169 StringBuffer result = new StringBuffer(super.toString());
170 result.append(" (name: ");
173 return result.toString();