1 | /**
|
---|
2 | */
|
---|
3 | package de.ugoe.cs.cpdp.decentApp.models.arffx.impl;
|
---|
4 |
|
---|
5 | import org.eclipse.emf.common.notify.Notification;
|
---|
6 | import org.eclipse.emf.ecore.EClass;
|
---|
7 | import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
---|
8 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
---|
9 |
|
---|
10 | import de.ugoe.cs.cpdp.decentApp.models.arffx.ARFFxPackage;
|
---|
11 | import de.ugoe.cs.cpdp.decentApp.models.arffx.Dimension;
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * <!-- begin-user-doc -->
|
---|
15 | * An implementation of the model object '<em><b>Dimension</b></em>'.
|
---|
16 | * <!-- end-user-doc -->
|
---|
17 | * <p>
|
---|
18 | * The following features are implemented:
|
---|
19 | * <ul>
|
---|
20 | * <li>{@link de.ugoe.cs.cpdp.decentApp.models.arffx.impl.DimensionImpl#getName <em>Name</em>}</li>
|
---|
21 | * </ul>
|
---|
22 | * </p>
|
---|
23 | *
|
---|
24 | * @generated
|
---|
25 | */
|
---|
26 | public class DimensionImpl extends MinimalEObjectImpl.Container implements Dimension {
|
---|
27 | /**
|
---|
28 | * The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
---|
29 | * <!-- begin-user-doc -->
|
---|
30 | * <!-- end-user-doc -->
|
---|
31 | * @see #getName()
|
---|
32 | * @generated
|
---|
33 | * @ordered
|
---|
34 | */
|
---|
35 | protected static final String NAME_EDEFAULT = null;
|
---|
36 |
|
---|
37 | /**
|
---|
38 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
---|
39 | * <!-- begin-user-doc -->
|
---|
40 | * <!-- end-user-doc -->
|
---|
41 | * @see #getName()
|
---|
42 | * @generated
|
---|
43 | * @ordered
|
---|
44 | */
|
---|
45 | protected String name = NAME_EDEFAULT;
|
---|
46 |
|
---|
47 | /**
|
---|
48 | * <!-- begin-user-doc -->
|
---|
49 | * <!-- end-user-doc -->
|
---|
50 | * @generated
|
---|
51 | */
|
---|
52 | protected DimensionImpl() {
|
---|
53 | super();
|
---|
54 | }
|
---|
55 |
|
---|
56 | /**
|
---|
57 | * <!-- begin-user-doc -->
|
---|
58 | * <!-- end-user-doc -->
|
---|
59 | * @generated
|
---|
60 | */
|
---|
61 | @Override
|
---|
62 | protected EClass eStaticClass() {
|
---|
63 | return ARFFxPackage.Literals.DIMENSION;
|
---|
64 | }
|
---|
65 |
|
---|
66 | /**
|
---|
67 | * <!-- begin-user-doc -->
|
---|
68 | * <!-- end-user-doc -->
|
---|
69 | * @generated
|
---|
70 | */
|
---|
71 | public String getName() {
|
---|
72 | return name;
|
---|
73 | }
|
---|
74 |
|
---|
75 | /**
|
---|
76 | * <!-- begin-user-doc -->
|
---|
77 | * <!-- end-user-doc -->
|
---|
78 | * @generated
|
---|
79 | */
|
---|
80 | public void setName(String newName) {
|
---|
81 | String oldName = name;
|
---|
82 | name = newName;
|
---|
83 | if (eNotificationRequired())
|
---|
84 | eNotify(new ENotificationImpl(this, Notification.SET, ARFFxPackage.DIMENSION__NAME, oldName, name));
|
---|
85 | }
|
---|
86 |
|
---|
87 | /**
|
---|
88 | * <!-- begin-user-doc -->
|
---|
89 | * <!-- end-user-doc -->
|
---|
90 | * @generated
|
---|
91 | */
|
---|
92 | @Override
|
---|
93 | public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
---|
94 | switch (featureID) {
|
---|
95 | case ARFFxPackage.DIMENSION__NAME:
|
---|
96 | return getName();
|
---|
97 | }
|
---|
98 | return super.eGet(featureID, resolve, coreType);
|
---|
99 | }
|
---|
100 |
|
---|
101 | /**
|
---|
102 | * <!-- begin-user-doc -->
|
---|
103 | * <!-- end-user-doc -->
|
---|
104 | * @generated
|
---|
105 | */
|
---|
106 | @Override
|
---|
107 | public void eSet(int featureID, Object newValue) {
|
---|
108 | switch (featureID) {
|
---|
109 | case ARFFxPackage.DIMENSION__NAME:
|
---|
110 | setName((String)newValue);
|
---|
111 | return;
|
---|
112 | }
|
---|
113 | super.eSet(featureID, newValue);
|
---|
114 | }
|
---|
115 |
|
---|
116 | /**
|
---|
117 | * <!-- begin-user-doc -->
|
---|
118 | * <!-- end-user-doc -->
|
---|
119 | * @generated
|
---|
120 | */
|
---|
121 | @Override
|
---|
122 | public void eUnset(int featureID) {
|
---|
123 | switch (featureID) {
|
---|
124 | case ARFFxPackage.DIMENSION__NAME:
|
---|
125 | setName(NAME_EDEFAULT);
|
---|
126 | return;
|
---|
127 | }
|
---|
128 | super.eUnset(featureID);
|
---|
129 | }
|
---|
130 |
|
---|
131 | /**
|
---|
132 | * <!-- begin-user-doc -->
|
---|
133 | * <!-- end-user-doc -->
|
---|
134 | * @generated
|
---|
135 | */
|
---|
136 | @Override
|
---|
137 | public boolean eIsSet(int featureID) {
|
---|
138 | switch (featureID) {
|
---|
139 | case ARFFxPackage.DIMENSION__NAME:
|
---|
140 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
---|
141 | }
|
---|
142 | return super.eIsSet(featureID);
|
---|
143 | }
|
---|
144 |
|
---|
145 | /**
|
---|
146 | * <!-- begin-user-doc -->
|
---|
147 | * <!-- end-user-doc -->
|
---|
148 | * @generated
|
---|
149 | */
|
---|
150 | @Override
|
---|
151 | public String toString() {
|
---|
152 | if (eIsProxy()) return super.toString();
|
---|
153 |
|
---|
154 | StringBuffer result = new StringBuffer(super.toString());
|
---|
155 | result.append(" (name: ");
|
---|
156 | result.append(name);
|
---|
157 | result.append(')');
|
---|
158 | return result.toString();
|
---|
159 | }
|
---|
160 |
|
---|
161 | } //DimensionImpl
|
---|