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.InternalEObject;
|
---|
8 | import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
---|
9 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
---|
10 |
|
---|
11 | import de.ugoe.cs.cpdp.decentApp.models.arffx.ARFFxPackage;
|
---|
12 | import de.ugoe.cs.cpdp.decentApp.models.arffx.Attribute;
|
---|
13 | import de.ugoe.cs.cpdp.decentApp.models.arffx.Value;
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * <!-- begin-user-doc -->
|
---|
17 | * An implementation of the model object '<em><b>Value</b></em>'.
|
---|
18 | * <!-- end-user-doc -->
|
---|
19 | * <p>
|
---|
20 | * The following features are implemented:
|
---|
21 | * <ul>
|
---|
22 | * <li>{@link de.ugoe.cs.cpdp.decentApp.models.arffx.impl.ValueImpl#getOfAttribute <em>Of Attribute</em>}</li>
|
---|
23 | * <li>{@link de.ugoe.cs.cpdp.decentApp.models.arffx.impl.ValueImpl#getContent <em>Content</em>}</li>
|
---|
24 | * </ul>
|
---|
25 | * </p>
|
---|
26 | *
|
---|
27 | * @generated
|
---|
28 | */
|
---|
29 | public class ValueImpl extends MinimalEObjectImpl.Container implements Value {
|
---|
30 | /**
|
---|
31 | * The cached value of the '{@link #getOfAttribute() <em>Of Attribute</em>}' reference.
|
---|
32 | * <!-- begin-user-doc -->
|
---|
33 | * <!-- end-user-doc -->
|
---|
34 | * @see #getOfAttribute()
|
---|
35 | * @generated
|
---|
36 | * @ordered
|
---|
37 | */
|
---|
38 | protected Attribute ofAttribute;
|
---|
39 |
|
---|
40 | /**
|
---|
41 | * The default value of the '{@link #getContent() <em>Content</em>}' attribute.
|
---|
42 | * <!-- begin-user-doc -->
|
---|
43 | * <!-- end-user-doc -->
|
---|
44 | * @see #getContent()
|
---|
45 | * @generated
|
---|
46 | * @ordered
|
---|
47 | */
|
---|
48 | protected static final String CONTENT_EDEFAULT = null;
|
---|
49 |
|
---|
50 | /**
|
---|
51 | * The cached value of the '{@link #getContent() <em>Content</em>}' attribute.
|
---|
52 | * <!-- begin-user-doc -->
|
---|
53 | * <!-- end-user-doc -->
|
---|
54 | * @see #getContent()
|
---|
55 | * @generated
|
---|
56 | * @ordered
|
---|
57 | */
|
---|
58 | protected String content = CONTENT_EDEFAULT;
|
---|
59 |
|
---|
60 | /**
|
---|
61 | * <!-- begin-user-doc -->
|
---|
62 | * <!-- end-user-doc -->
|
---|
63 | * @generated
|
---|
64 | */
|
---|
65 | protected ValueImpl() {
|
---|
66 | super();
|
---|
67 | }
|
---|
68 |
|
---|
69 | /**
|
---|
70 | * <!-- begin-user-doc -->
|
---|
71 | * <!-- end-user-doc -->
|
---|
72 | * @generated
|
---|
73 | */
|
---|
74 | @Override
|
---|
75 | protected EClass eStaticClass() {
|
---|
76 | return ARFFxPackage.Literals.VALUE;
|
---|
77 | }
|
---|
78 |
|
---|
79 | /**
|
---|
80 | * <!-- begin-user-doc -->
|
---|
81 | * <!-- end-user-doc -->
|
---|
82 | * @generated
|
---|
83 | */
|
---|
84 | public Attribute getOfAttribute() {
|
---|
85 | if (ofAttribute != null && ofAttribute.eIsProxy()) {
|
---|
86 | InternalEObject oldOfAttribute = (InternalEObject)ofAttribute;
|
---|
87 | ofAttribute = (Attribute)eResolveProxy(oldOfAttribute);
|
---|
88 | if (ofAttribute != oldOfAttribute) {
|
---|
89 | if (eNotificationRequired())
|
---|
90 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ARFFxPackage.VALUE__OF_ATTRIBUTE, oldOfAttribute, ofAttribute));
|
---|
91 | }
|
---|
92 | }
|
---|
93 | return ofAttribute;
|
---|
94 | }
|
---|
95 |
|
---|
96 | /**
|
---|
97 | * <!-- begin-user-doc -->
|
---|
98 | * <!-- end-user-doc -->
|
---|
99 | * @generated
|
---|
100 | */
|
---|
101 | public Attribute basicGetOfAttribute() {
|
---|
102 | return ofAttribute;
|
---|
103 | }
|
---|
104 |
|
---|
105 | /**
|
---|
106 | * <!-- begin-user-doc -->
|
---|
107 | * <!-- end-user-doc -->
|
---|
108 | * @generated
|
---|
109 | */
|
---|
110 | public void setOfAttribute(Attribute newOfAttribute) {
|
---|
111 | Attribute oldOfAttribute = ofAttribute;
|
---|
112 | ofAttribute = newOfAttribute;
|
---|
113 | if (eNotificationRequired())
|
---|
114 | eNotify(new ENotificationImpl(this, Notification.SET, ARFFxPackage.VALUE__OF_ATTRIBUTE, oldOfAttribute, ofAttribute));
|
---|
115 | }
|
---|
116 |
|
---|
117 | /**
|
---|
118 | * <!-- begin-user-doc -->
|
---|
119 | * <!-- end-user-doc -->
|
---|
120 | * @generated
|
---|
121 | */
|
---|
122 | public String getContent() {
|
---|
123 | return content;
|
---|
124 | }
|
---|
125 |
|
---|
126 | /**
|
---|
127 | * <!-- begin-user-doc -->
|
---|
128 | * <!-- end-user-doc -->
|
---|
129 | * @generated
|
---|
130 | */
|
---|
131 | public void setContent(String newContent) {
|
---|
132 | String oldContent = content;
|
---|
133 | content = newContent;
|
---|
134 | if (eNotificationRequired())
|
---|
135 | eNotify(new ENotificationImpl(this, Notification.SET, ARFFxPackage.VALUE__CONTENT, oldContent, content));
|
---|
136 | }
|
---|
137 |
|
---|
138 | /**
|
---|
139 | * <!-- begin-user-doc -->
|
---|
140 | * <!-- end-user-doc -->
|
---|
141 | * @generated
|
---|
142 | */
|
---|
143 | @Override
|
---|
144 | public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
---|
145 | switch (featureID) {
|
---|
146 | case ARFFxPackage.VALUE__OF_ATTRIBUTE:
|
---|
147 | if (resolve) return getOfAttribute();
|
---|
148 | return basicGetOfAttribute();
|
---|
149 | case ARFFxPackage.VALUE__CONTENT:
|
---|
150 | return getContent();
|
---|
151 | }
|
---|
152 | return super.eGet(featureID, resolve, coreType);
|
---|
153 | }
|
---|
154 |
|
---|
155 | /**
|
---|
156 | * <!-- begin-user-doc -->
|
---|
157 | * <!-- end-user-doc -->
|
---|
158 | * @generated
|
---|
159 | */
|
---|
160 | @Override
|
---|
161 | public void eSet(int featureID, Object newValue) {
|
---|
162 | switch (featureID) {
|
---|
163 | case ARFFxPackage.VALUE__OF_ATTRIBUTE:
|
---|
164 | setOfAttribute((Attribute)newValue);
|
---|
165 | return;
|
---|
166 | case ARFFxPackage.VALUE__CONTENT:
|
---|
167 | setContent((String)newValue);
|
---|
168 | return;
|
---|
169 | }
|
---|
170 | super.eSet(featureID, newValue);
|
---|
171 | }
|
---|
172 |
|
---|
173 | /**
|
---|
174 | * <!-- begin-user-doc -->
|
---|
175 | * <!-- end-user-doc -->
|
---|
176 | * @generated
|
---|
177 | */
|
---|
178 | @Override
|
---|
179 | public void eUnset(int featureID) {
|
---|
180 | switch (featureID) {
|
---|
181 | case ARFFxPackage.VALUE__OF_ATTRIBUTE:
|
---|
182 | setOfAttribute((Attribute)null);
|
---|
183 | return;
|
---|
184 | case ARFFxPackage.VALUE__CONTENT:
|
---|
185 | setContent(CONTENT_EDEFAULT);
|
---|
186 | return;
|
---|
187 | }
|
---|
188 | super.eUnset(featureID);
|
---|
189 | }
|
---|
190 |
|
---|
191 | /**
|
---|
192 | * <!-- begin-user-doc -->
|
---|
193 | * <!-- end-user-doc -->
|
---|
194 | * @generated
|
---|
195 | */
|
---|
196 | @Override
|
---|
197 | public boolean eIsSet(int featureID) {
|
---|
198 | switch (featureID) {
|
---|
199 | case ARFFxPackage.VALUE__OF_ATTRIBUTE:
|
---|
200 | return ofAttribute != null;
|
---|
201 | case ARFFxPackage.VALUE__CONTENT:
|
---|
202 | return CONTENT_EDEFAULT == null ? content != null : !CONTENT_EDEFAULT.equals(content);
|
---|
203 | }
|
---|
204 | return super.eIsSet(featureID);
|
---|
205 | }
|
---|
206 |
|
---|
207 | /**
|
---|
208 | * <!-- begin-user-doc -->
|
---|
209 | * <!-- end-user-doc -->
|
---|
210 | * @generated
|
---|
211 | */
|
---|
212 | @Override
|
---|
213 | public String toString() {
|
---|
214 | if (eIsProxy()) return super.toString();
|
---|
215 |
|
---|
216 | StringBuffer result = new StringBuffer(super.toString());
|
---|
217 | result.append(" (content: ");
|
---|
218 | result.append(content);
|
---|
219 | result.append(')');
|
---|
220 | return result.toString();
|
---|
221 | }
|
---|
222 |
|
---|
223 | } //ValueImpl
|
---|