1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.core.composition.impl; |
7 | |
8 | import org.eclipse.emf.common.notify.Notification; |
9 | import org.eclipse.emf.ecore.EClass; |
10 | import org.eclipse.emf.ecore.InternalEObject; |
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
12 | |
13 | import de.uka.ipd.sdq.pcm.core.composition.AssemblyContext; |
14 | import de.uka.ipd.sdq.pcm.core.composition.AssemblyInfrastructureConnector; |
15 | import de.uka.ipd.sdq.pcm.core.composition.CompositionPackage; |
16 | import de.uka.ipd.sdq.pcm.repository.InfrastructureProvidedRole; |
17 | import de.uka.ipd.sdq.pcm.repository.InfrastructureRequiredRole; |
18 | |
19 | /** |
20 | * <!-- begin-user-doc --> |
21 | * An implementation of the model object '<em><b>Assembly Infrastructure Connector</b></em>'. |
22 | * <!-- end-user-doc --> |
23 | * <p> |
24 | * The following features are implemented: |
25 | * <ul> |
26 | * <li>{@link de.uka.ipd.sdq.pcm.core.composition.impl.AssemblyInfrastructureConnectorImpl#getProvidedRole__AssemblyInfrastructureConnector <em>Provided Role Assembly Infrastructure Connector</em>}</li> |
27 | * <li>{@link de.uka.ipd.sdq.pcm.core.composition.impl.AssemblyInfrastructureConnectorImpl#getRequiredRole__AssemblyInfrastructureConnector <em>Required Role Assembly Infrastructure Connector</em>}</li> |
28 | * <li>{@link de.uka.ipd.sdq.pcm.core.composition.impl.AssemblyInfrastructureConnectorImpl#getProvidingAssemblyContext__AssemblyInfrastructureConnector <em>Providing Assembly Context Assembly Infrastructure Connector</em>}</li> |
29 | * <li>{@link de.uka.ipd.sdq.pcm.core.composition.impl.AssemblyInfrastructureConnectorImpl#getRequiringAssemblyContext__AssemblyInfrastructureConnector <em>Requiring Assembly Context Assembly Infrastructure Connector</em>}</li> |
30 | * </ul> |
31 | * </p> |
32 | * |
33 | * @generated |
34 | */ |
35 | public class AssemblyInfrastructureConnectorImpl extends ConnectorImpl implements AssemblyInfrastructureConnector { |
36 | /** |
37 | * <!-- begin-user-doc --> |
38 | * <!-- end-user-doc --> |
39 | * @generated |
40 | */ |
41 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
42 | |
43 | /** |
44 | * The cached value of the '{@link #getProvidedRole__AssemblyInfrastructureConnector() <em>Provided Role Assembly Infrastructure Connector</em>}' reference. |
45 | * <!-- begin-user-doc --> |
46 | * <!-- end-user-doc --> |
47 | * @see #getProvidedRole__AssemblyInfrastructureConnector() |
48 | * @generated |
49 | * @ordered |
50 | */ |
51 | protected InfrastructureProvidedRole providedRole__AssemblyInfrastructureConnector; |
52 | |
53 | /** |
54 | * The cached value of the '{@link #getRequiredRole__AssemblyInfrastructureConnector() <em>Required Role Assembly Infrastructure Connector</em>}' reference. |
55 | * <!-- begin-user-doc --> |
56 | * <!-- end-user-doc --> |
57 | * @see #getRequiredRole__AssemblyInfrastructureConnector() |
58 | * @generated |
59 | * @ordered |
60 | */ |
61 | protected InfrastructureRequiredRole requiredRole__AssemblyInfrastructureConnector; |
62 | |
63 | /** |
64 | * The cached value of the '{@link #getProvidingAssemblyContext__AssemblyInfrastructureConnector() <em>Providing Assembly Context Assembly Infrastructure Connector</em>}' reference. |
65 | * <!-- begin-user-doc --> |
66 | * <!-- end-user-doc --> |
67 | * @see #getProvidingAssemblyContext__AssemblyInfrastructureConnector() |
68 | * @generated |
69 | * @ordered |
70 | */ |
71 | protected AssemblyContext providingAssemblyContext__AssemblyInfrastructureConnector; |
72 | |
73 | /** |
74 | * The cached value of the '{@link #getRequiringAssemblyContext__AssemblyInfrastructureConnector() <em>Requiring Assembly Context Assembly Infrastructure Connector</em>}' reference. |
75 | * <!-- begin-user-doc --> |
76 | * <!-- end-user-doc --> |
77 | * @see #getRequiringAssemblyContext__AssemblyInfrastructureConnector() |
78 | * @generated |
79 | * @ordered |
80 | */ |
81 | protected AssemblyContext requiringAssemblyContext__AssemblyInfrastructureConnector; |
82 | |
83 | /** |
84 | * <!-- begin-user-doc --> |
85 | * <!-- end-user-doc --> |
86 | * @generated |
87 | */ |
88 | protected AssemblyInfrastructureConnectorImpl() { |
89 | super(); |
90 | } |
91 | |
92 | /** |
93 | * <!-- begin-user-doc --> |
94 | * <!-- end-user-doc --> |
95 | * @generated |
96 | */ |
97 | @Override |
98 | protected EClass eStaticClass() { |
99 | return CompositionPackage.Literals.ASSEMBLY_INFRASTRUCTURE_CONNECTOR; |
100 | } |
101 | |
102 | /** |
103 | * <!-- begin-user-doc --> |
104 | * <!-- end-user-doc --> |
105 | * @generated |
106 | */ |
107 | public InfrastructureProvidedRole getProvidedRole__AssemblyInfrastructureConnector() { |
108 | if (providedRole__AssemblyInfrastructureConnector != null && providedRole__AssemblyInfrastructureConnector.eIsProxy()) { |
109 | InternalEObject oldProvidedRole__AssemblyInfrastructureConnector = (InternalEObject)providedRole__AssemblyInfrastructureConnector; |
110 | providedRole__AssemblyInfrastructureConnector = (InfrastructureProvidedRole)eResolveProxy(oldProvidedRole__AssemblyInfrastructureConnector); |
111 | if (providedRole__AssemblyInfrastructureConnector != oldProvidedRole__AssemblyInfrastructureConnector) { |
112 | if (eNotificationRequired()) |
113 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR, oldProvidedRole__AssemblyInfrastructureConnector, providedRole__AssemblyInfrastructureConnector)); |
114 | } |
115 | } |
116 | return providedRole__AssemblyInfrastructureConnector; |
117 | } |
118 | |
119 | /** |
120 | * <!-- begin-user-doc --> |
121 | * <!-- end-user-doc --> |
122 | * @generated |
123 | */ |
124 | public InfrastructureProvidedRole basicGetProvidedRole__AssemblyInfrastructureConnector() { |
125 | return providedRole__AssemblyInfrastructureConnector; |
126 | } |
127 | |
128 | /** |
129 | * <!-- begin-user-doc --> |
130 | * <!-- end-user-doc --> |
131 | * @generated |
132 | */ |
133 | public void setProvidedRole__AssemblyInfrastructureConnector(InfrastructureProvidedRole newProvidedRole__AssemblyInfrastructureConnector) { |
134 | InfrastructureProvidedRole oldProvidedRole__AssemblyInfrastructureConnector = providedRole__AssemblyInfrastructureConnector; |
135 | providedRole__AssemblyInfrastructureConnector = newProvidedRole__AssemblyInfrastructureConnector; |
136 | if (eNotificationRequired()) |
137 | eNotify(new ENotificationImpl(this, Notification.SET, CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR, oldProvidedRole__AssemblyInfrastructureConnector, providedRole__AssemblyInfrastructureConnector)); |
138 | } |
139 | |
140 | /** |
141 | * <!-- begin-user-doc --> |
142 | * <!-- end-user-doc --> |
143 | * @generated |
144 | */ |
145 | public InfrastructureRequiredRole getRequiredRole__AssemblyInfrastructureConnector() { |
146 | if (requiredRole__AssemblyInfrastructureConnector != null && requiredRole__AssemblyInfrastructureConnector.eIsProxy()) { |
147 | InternalEObject oldRequiredRole__AssemblyInfrastructureConnector = (InternalEObject)requiredRole__AssemblyInfrastructureConnector; |
148 | requiredRole__AssemblyInfrastructureConnector = (InfrastructureRequiredRole)eResolveProxy(oldRequiredRole__AssemblyInfrastructureConnector); |
149 | if (requiredRole__AssemblyInfrastructureConnector != oldRequiredRole__AssemblyInfrastructureConnector) { |
150 | if (eNotificationRequired()) |
151 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR, oldRequiredRole__AssemblyInfrastructureConnector, requiredRole__AssemblyInfrastructureConnector)); |
152 | } |
153 | } |
154 | return requiredRole__AssemblyInfrastructureConnector; |
155 | } |
156 | |
157 | /** |
158 | * <!-- begin-user-doc --> |
159 | * <!-- end-user-doc --> |
160 | * @generated |
161 | */ |
162 | public InfrastructureRequiredRole basicGetRequiredRole__AssemblyInfrastructureConnector() { |
163 | return requiredRole__AssemblyInfrastructureConnector; |
164 | } |
165 | |
166 | /** |
167 | * <!-- begin-user-doc --> |
168 | * <!-- end-user-doc --> |
169 | * @generated |
170 | */ |
171 | public void setRequiredRole__AssemblyInfrastructureConnector(InfrastructureRequiredRole newRequiredRole__AssemblyInfrastructureConnector) { |
172 | InfrastructureRequiredRole oldRequiredRole__AssemblyInfrastructureConnector = requiredRole__AssemblyInfrastructureConnector; |
173 | requiredRole__AssemblyInfrastructureConnector = newRequiredRole__AssemblyInfrastructureConnector; |
174 | if (eNotificationRequired()) |
175 | eNotify(new ENotificationImpl(this, Notification.SET, CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR, oldRequiredRole__AssemblyInfrastructureConnector, requiredRole__AssemblyInfrastructureConnector)); |
176 | } |
177 | |
178 | /** |
179 | * <!-- begin-user-doc --> |
180 | * <!-- end-user-doc --> |
181 | * @generated |
182 | */ |
183 | public AssemblyContext getProvidingAssemblyContext__AssemblyInfrastructureConnector() { |
184 | if (providingAssemblyContext__AssemblyInfrastructureConnector != null && providingAssemblyContext__AssemblyInfrastructureConnector.eIsProxy()) { |
185 | InternalEObject oldProvidingAssemblyContext__AssemblyInfrastructureConnector = (InternalEObject)providingAssemblyContext__AssemblyInfrastructureConnector; |
186 | providingAssemblyContext__AssemblyInfrastructureConnector = (AssemblyContext)eResolveProxy(oldProvidingAssemblyContext__AssemblyInfrastructureConnector); |
187 | if (providingAssemblyContext__AssemblyInfrastructureConnector != oldProvidingAssemblyContext__AssemblyInfrastructureConnector) { |
188 | if (eNotificationRequired()) |
189 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR, oldProvidingAssemblyContext__AssemblyInfrastructureConnector, providingAssemblyContext__AssemblyInfrastructureConnector)); |
190 | } |
191 | } |
192 | return providingAssemblyContext__AssemblyInfrastructureConnector; |
193 | } |
194 | |
195 | /** |
196 | * <!-- begin-user-doc --> |
197 | * <!-- end-user-doc --> |
198 | * @generated |
199 | */ |
200 | public AssemblyContext basicGetProvidingAssemblyContext__AssemblyInfrastructureConnector() { |
201 | return providingAssemblyContext__AssemblyInfrastructureConnector; |
202 | } |
203 | |
204 | /** |
205 | * <!-- begin-user-doc --> |
206 | * <!-- end-user-doc --> |
207 | * @generated |
208 | */ |
209 | public void setProvidingAssemblyContext__AssemblyInfrastructureConnector(AssemblyContext newProvidingAssemblyContext__AssemblyInfrastructureConnector) { |
210 | AssemblyContext oldProvidingAssemblyContext__AssemblyInfrastructureConnector = providingAssemblyContext__AssemblyInfrastructureConnector; |
211 | providingAssemblyContext__AssemblyInfrastructureConnector = newProvidingAssemblyContext__AssemblyInfrastructureConnector; |
212 | if (eNotificationRequired()) |
213 | eNotify(new ENotificationImpl(this, Notification.SET, CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR, oldProvidingAssemblyContext__AssemblyInfrastructureConnector, providingAssemblyContext__AssemblyInfrastructureConnector)); |
214 | } |
215 | |
216 | /** |
217 | * <!-- begin-user-doc --> |
218 | * <!-- end-user-doc --> |
219 | * @generated |
220 | */ |
221 | public AssemblyContext getRequiringAssemblyContext__AssemblyInfrastructureConnector() { |
222 | if (requiringAssemblyContext__AssemblyInfrastructureConnector != null && requiringAssemblyContext__AssemblyInfrastructureConnector.eIsProxy()) { |
223 | InternalEObject oldRequiringAssemblyContext__AssemblyInfrastructureConnector = (InternalEObject)requiringAssemblyContext__AssemblyInfrastructureConnector; |
224 | requiringAssemblyContext__AssemblyInfrastructureConnector = (AssemblyContext)eResolveProxy(oldRequiringAssemblyContext__AssemblyInfrastructureConnector); |
225 | if (requiringAssemblyContext__AssemblyInfrastructureConnector != oldRequiringAssemblyContext__AssemblyInfrastructureConnector) { |
226 | if (eNotificationRequired()) |
227 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR, oldRequiringAssemblyContext__AssemblyInfrastructureConnector, requiringAssemblyContext__AssemblyInfrastructureConnector)); |
228 | } |
229 | } |
230 | return requiringAssemblyContext__AssemblyInfrastructureConnector; |
231 | } |
232 | |
233 | /** |
234 | * <!-- begin-user-doc --> |
235 | * <!-- end-user-doc --> |
236 | * @generated |
237 | */ |
238 | public AssemblyContext basicGetRequiringAssemblyContext__AssemblyInfrastructureConnector() { |
239 | return requiringAssemblyContext__AssemblyInfrastructureConnector; |
240 | } |
241 | |
242 | /** |
243 | * <!-- begin-user-doc --> |
244 | * <!-- end-user-doc --> |
245 | * @generated |
246 | */ |
247 | public void setRequiringAssemblyContext__AssemblyInfrastructureConnector(AssemblyContext newRequiringAssemblyContext__AssemblyInfrastructureConnector) { |
248 | AssemblyContext oldRequiringAssemblyContext__AssemblyInfrastructureConnector = requiringAssemblyContext__AssemblyInfrastructureConnector; |
249 | requiringAssemblyContext__AssemblyInfrastructureConnector = newRequiringAssemblyContext__AssemblyInfrastructureConnector; |
250 | if (eNotificationRequired()) |
251 | eNotify(new ENotificationImpl(this, Notification.SET, CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR, oldRequiringAssemblyContext__AssemblyInfrastructureConnector, requiringAssemblyContext__AssemblyInfrastructureConnector)); |
252 | } |
253 | |
254 | /** |
255 | * <!-- begin-user-doc --> |
256 | * <!-- end-user-doc --> |
257 | * @generated |
258 | */ |
259 | @Override |
260 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
261 | switch (featureID) { |
262 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
263 | if (resolve) return getProvidedRole__AssemblyInfrastructureConnector(); |
264 | return basicGetProvidedRole__AssemblyInfrastructureConnector(); |
265 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
266 | if (resolve) return getRequiredRole__AssemblyInfrastructureConnector(); |
267 | return basicGetRequiredRole__AssemblyInfrastructureConnector(); |
268 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
269 | if (resolve) return getProvidingAssemblyContext__AssemblyInfrastructureConnector(); |
270 | return basicGetProvidingAssemblyContext__AssemblyInfrastructureConnector(); |
271 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
272 | if (resolve) return getRequiringAssemblyContext__AssemblyInfrastructureConnector(); |
273 | return basicGetRequiringAssemblyContext__AssemblyInfrastructureConnector(); |
274 | } |
275 | return super.eGet(featureID, resolve, coreType); |
276 | } |
277 | |
278 | /** |
279 | * <!-- begin-user-doc --> |
280 | * <!-- end-user-doc --> |
281 | * @generated |
282 | */ |
283 | @Override |
284 | public void eSet(int featureID, Object newValue) { |
285 | switch (featureID) { |
286 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
287 | setProvidedRole__AssemblyInfrastructureConnector((InfrastructureProvidedRole)newValue); |
288 | return; |
289 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
290 | setRequiredRole__AssemblyInfrastructureConnector((InfrastructureRequiredRole)newValue); |
291 | return; |
292 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
293 | setProvidingAssemblyContext__AssemblyInfrastructureConnector((AssemblyContext)newValue); |
294 | return; |
295 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
296 | setRequiringAssemblyContext__AssemblyInfrastructureConnector((AssemblyContext)newValue); |
297 | return; |
298 | } |
299 | super.eSet(featureID, newValue); |
300 | } |
301 | |
302 | /** |
303 | * <!-- begin-user-doc --> |
304 | * <!-- end-user-doc --> |
305 | * @generated |
306 | */ |
307 | @Override |
308 | public void eUnset(int featureID) { |
309 | switch (featureID) { |
310 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
311 | setProvidedRole__AssemblyInfrastructureConnector((InfrastructureProvidedRole)null); |
312 | return; |
313 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
314 | setRequiredRole__AssemblyInfrastructureConnector((InfrastructureRequiredRole)null); |
315 | return; |
316 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
317 | setProvidingAssemblyContext__AssemblyInfrastructureConnector((AssemblyContext)null); |
318 | return; |
319 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
320 | setRequiringAssemblyContext__AssemblyInfrastructureConnector((AssemblyContext)null); |
321 | return; |
322 | } |
323 | super.eUnset(featureID); |
324 | } |
325 | |
326 | /** |
327 | * <!-- begin-user-doc --> |
328 | * <!-- end-user-doc --> |
329 | * @generated |
330 | */ |
331 | @Override |
332 | public boolean eIsSet(int featureID) { |
333 | switch (featureID) { |
334 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
335 | return providedRole__AssemblyInfrastructureConnector != null; |
336 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRED_ROLE_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
337 | return requiredRole__AssemblyInfrastructureConnector != null; |
338 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__PROVIDING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
339 | return providingAssemblyContext__AssemblyInfrastructureConnector != null; |
340 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR__REQUIRING_ASSEMBLY_CONTEXT_ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
341 | return requiringAssemblyContext__AssemblyInfrastructureConnector != null; |
342 | } |
343 | return super.eIsSet(featureID); |
344 | } |
345 | |
346 | } //AssemblyInfrastructureConnectorImpl |