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.CompositionPackage; |
15 | import de.uka.ipd.sdq.pcm.core.composition.SinkDelegationConnector; |
16 | import de.uka.ipd.sdq.pcm.repository.SinkRole; |
17 | import de.uka.ipd.sdq.pcm.repository.impl.DelegationConnectorImpl; |
18 | |
19 | /** |
20 | * <!-- begin-user-doc --> |
21 | * An implementation of the model object '<em><b>Sink Delegation 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.SinkDelegationConnectorImpl#getAssemblyContext__SinkDelegationConnector <em>Assembly Context Sink Delegation Connector</em>}</li> |
27 | * <li>{@link de.uka.ipd.sdq.pcm.core.composition.impl.SinkDelegationConnectorImpl#getInnerSinkRole__SinkRole <em>Inner Sink Role Sink Role</em>}</li> |
28 | * <li>{@link de.uka.ipd.sdq.pcm.core.composition.impl.SinkDelegationConnectorImpl#getOuterSinkRole__SinkRole <em>Outer Sink Role Sink Role</em>}</li> |
29 | * </ul> |
30 | * </p> |
31 | * |
32 | * @generated |
33 | */ |
34 | public class SinkDelegationConnectorImpl extends DelegationConnectorImpl implements SinkDelegationConnector { |
35 | /** |
36 | * <!-- begin-user-doc --> |
37 | * <!-- end-user-doc --> |
38 | * @generated |
39 | */ |
40 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
41 | |
42 | /** |
43 | * The cached value of the '{@link #getAssemblyContext__SinkDelegationConnector() <em>Assembly Context Sink Delegation Connector</em>}' reference. |
44 | * <!-- begin-user-doc --> |
45 | * <!-- end-user-doc --> |
46 | * @see #getAssemblyContext__SinkDelegationConnector() |
47 | * @generated |
48 | * @ordered |
49 | */ |
50 | protected AssemblyContext assemblyContext__SinkDelegationConnector; |
51 | |
52 | /** |
53 | * The cached value of the '{@link #getInnerSinkRole__SinkRole() <em>Inner Sink Role Sink Role</em>}' reference. |
54 | * <!-- begin-user-doc --> |
55 | * <!-- end-user-doc --> |
56 | * @see #getInnerSinkRole__SinkRole() |
57 | * @generated |
58 | * @ordered |
59 | */ |
60 | protected SinkRole innerSinkRole__SinkRole; |
61 | |
62 | /** |
63 | * The cached value of the '{@link #getOuterSinkRole__SinkRole() <em>Outer Sink Role Sink Role</em>}' reference. |
64 | * <!-- begin-user-doc --> |
65 | * <!-- end-user-doc --> |
66 | * @see #getOuterSinkRole__SinkRole() |
67 | * @generated |
68 | * @ordered |
69 | */ |
70 | protected SinkRole outerSinkRole__SinkRole; |
71 | |
72 | /** |
73 | * <!-- begin-user-doc --> |
74 | * <!-- end-user-doc --> |
75 | * @generated |
76 | */ |
77 | protected SinkDelegationConnectorImpl() { |
78 | super(); |
79 | } |
80 | |
81 | /** |
82 | * <!-- begin-user-doc --> |
83 | * <!-- end-user-doc --> |
84 | * @generated |
85 | */ |
86 | @Override |
87 | protected EClass eStaticClass() { |
88 | return CompositionPackage.Literals.SINK_DELEGATION_CONNECTOR; |
89 | } |
90 | |
91 | /** |
92 | * <!-- begin-user-doc --> |
93 | * <!-- end-user-doc --> |
94 | * @generated |
95 | */ |
96 | public AssemblyContext getAssemblyContext__SinkDelegationConnector() { |
97 | if (assemblyContext__SinkDelegationConnector != null && assemblyContext__SinkDelegationConnector.eIsProxy()) { |
98 | InternalEObject oldAssemblyContext__SinkDelegationConnector = (InternalEObject)assemblyContext__SinkDelegationConnector; |
99 | assemblyContext__SinkDelegationConnector = (AssemblyContext)eResolveProxy(oldAssemblyContext__SinkDelegationConnector); |
100 | if (assemblyContext__SinkDelegationConnector != oldAssemblyContext__SinkDelegationConnector) { |
101 | if (eNotificationRequired()) |
102 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompositionPackage.SINK_DELEGATION_CONNECTOR__ASSEMBLY_CONTEXT_SINK_DELEGATION_CONNECTOR, oldAssemblyContext__SinkDelegationConnector, assemblyContext__SinkDelegationConnector)); |
103 | } |
104 | } |
105 | return assemblyContext__SinkDelegationConnector; |
106 | } |
107 | |
108 | /** |
109 | * <!-- begin-user-doc --> |
110 | * <!-- end-user-doc --> |
111 | * @generated |
112 | */ |
113 | public AssemblyContext basicGetAssemblyContext__SinkDelegationConnector() { |
114 | return assemblyContext__SinkDelegationConnector; |
115 | } |
116 | |
117 | /** |
118 | * <!-- begin-user-doc --> |
119 | * <!-- end-user-doc --> |
120 | * @generated |
121 | */ |
122 | public void setAssemblyContext__SinkDelegationConnector(AssemblyContext newAssemblyContext__SinkDelegationConnector) { |
123 | AssemblyContext oldAssemblyContext__SinkDelegationConnector = assemblyContext__SinkDelegationConnector; |
124 | assemblyContext__SinkDelegationConnector = newAssemblyContext__SinkDelegationConnector; |
125 | if (eNotificationRequired()) |
126 | eNotify(new ENotificationImpl(this, Notification.SET, CompositionPackage.SINK_DELEGATION_CONNECTOR__ASSEMBLY_CONTEXT_SINK_DELEGATION_CONNECTOR, oldAssemblyContext__SinkDelegationConnector, assemblyContext__SinkDelegationConnector)); |
127 | } |
128 | |
129 | /** |
130 | * <!-- begin-user-doc --> |
131 | * <!-- end-user-doc --> |
132 | * @generated |
133 | */ |
134 | public SinkRole getInnerSinkRole__SinkRole() { |
135 | if (innerSinkRole__SinkRole != null && innerSinkRole__SinkRole.eIsProxy()) { |
136 | InternalEObject oldInnerSinkRole__SinkRole = (InternalEObject)innerSinkRole__SinkRole; |
137 | innerSinkRole__SinkRole = (SinkRole)eResolveProxy(oldInnerSinkRole__SinkRole); |
138 | if (innerSinkRole__SinkRole != oldInnerSinkRole__SinkRole) { |
139 | if (eNotificationRequired()) |
140 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompositionPackage.SINK_DELEGATION_CONNECTOR__INNER_SINK_ROLE_SINK_ROLE, oldInnerSinkRole__SinkRole, innerSinkRole__SinkRole)); |
141 | } |
142 | } |
143 | return innerSinkRole__SinkRole; |
144 | } |
145 | |
146 | /** |
147 | * <!-- begin-user-doc --> |
148 | * <!-- end-user-doc --> |
149 | * @generated |
150 | */ |
151 | public SinkRole basicGetInnerSinkRole__SinkRole() { |
152 | return innerSinkRole__SinkRole; |
153 | } |
154 | |
155 | /** |
156 | * <!-- begin-user-doc --> |
157 | * <!-- end-user-doc --> |
158 | * @generated |
159 | */ |
160 | public void setInnerSinkRole__SinkRole(SinkRole newInnerSinkRole__SinkRole) { |
161 | SinkRole oldInnerSinkRole__SinkRole = innerSinkRole__SinkRole; |
162 | innerSinkRole__SinkRole = newInnerSinkRole__SinkRole; |
163 | if (eNotificationRequired()) |
164 | eNotify(new ENotificationImpl(this, Notification.SET, CompositionPackage.SINK_DELEGATION_CONNECTOR__INNER_SINK_ROLE_SINK_ROLE, oldInnerSinkRole__SinkRole, innerSinkRole__SinkRole)); |
165 | } |
166 | |
167 | /** |
168 | * <!-- begin-user-doc --> |
169 | * <!-- end-user-doc --> |
170 | * @generated |
171 | */ |
172 | public SinkRole getOuterSinkRole__SinkRole() { |
173 | if (outerSinkRole__SinkRole != null && outerSinkRole__SinkRole.eIsProxy()) { |
174 | InternalEObject oldOuterSinkRole__SinkRole = (InternalEObject)outerSinkRole__SinkRole; |
175 | outerSinkRole__SinkRole = (SinkRole)eResolveProxy(oldOuterSinkRole__SinkRole); |
176 | if (outerSinkRole__SinkRole != oldOuterSinkRole__SinkRole) { |
177 | if (eNotificationRequired()) |
178 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompositionPackage.SINK_DELEGATION_CONNECTOR__OUTER_SINK_ROLE_SINK_ROLE, oldOuterSinkRole__SinkRole, outerSinkRole__SinkRole)); |
179 | } |
180 | } |
181 | return outerSinkRole__SinkRole; |
182 | } |
183 | |
184 | /** |
185 | * <!-- begin-user-doc --> |
186 | * <!-- end-user-doc --> |
187 | * @generated |
188 | */ |
189 | public SinkRole basicGetOuterSinkRole__SinkRole() { |
190 | return outerSinkRole__SinkRole; |
191 | } |
192 | |
193 | /** |
194 | * <!-- begin-user-doc --> |
195 | * <!-- end-user-doc --> |
196 | * @generated |
197 | */ |
198 | public void setOuterSinkRole__SinkRole(SinkRole newOuterSinkRole__SinkRole) { |
199 | SinkRole oldOuterSinkRole__SinkRole = outerSinkRole__SinkRole; |
200 | outerSinkRole__SinkRole = newOuterSinkRole__SinkRole; |
201 | if (eNotificationRequired()) |
202 | eNotify(new ENotificationImpl(this, Notification.SET, CompositionPackage.SINK_DELEGATION_CONNECTOR__OUTER_SINK_ROLE_SINK_ROLE, oldOuterSinkRole__SinkRole, outerSinkRole__SinkRole)); |
203 | } |
204 | |
205 | /** |
206 | * <!-- begin-user-doc --> |
207 | * <!-- end-user-doc --> |
208 | * @generated |
209 | */ |
210 | @Override |
211 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
212 | switch (featureID) { |
213 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__ASSEMBLY_CONTEXT_SINK_DELEGATION_CONNECTOR: |
214 | if (resolve) return getAssemblyContext__SinkDelegationConnector(); |
215 | return basicGetAssemblyContext__SinkDelegationConnector(); |
216 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__INNER_SINK_ROLE_SINK_ROLE: |
217 | if (resolve) return getInnerSinkRole__SinkRole(); |
218 | return basicGetInnerSinkRole__SinkRole(); |
219 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__OUTER_SINK_ROLE_SINK_ROLE: |
220 | if (resolve) return getOuterSinkRole__SinkRole(); |
221 | return basicGetOuterSinkRole__SinkRole(); |
222 | } |
223 | return super.eGet(featureID, resolve, coreType); |
224 | } |
225 | |
226 | /** |
227 | * <!-- begin-user-doc --> |
228 | * <!-- end-user-doc --> |
229 | * @generated |
230 | */ |
231 | @Override |
232 | public void eSet(int featureID, Object newValue) { |
233 | switch (featureID) { |
234 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__ASSEMBLY_CONTEXT_SINK_DELEGATION_CONNECTOR: |
235 | setAssemblyContext__SinkDelegationConnector((AssemblyContext)newValue); |
236 | return; |
237 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__INNER_SINK_ROLE_SINK_ROLE: |
238 | setInnerSinkRole__SinkRole((SinkRole)newValue); |
239 | return; |
240 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__OUTER_SINK_ROLE_SINK_ROLE: |
241 | setOuterSinkRole__SinkRole((SinkRole)newValue); |
242 | return; |
243 | } |
244 | super.eSet(featureID, newValue); |
245 | } |
246 | |
247 | /** |
248 | * <!-- begin-user-doc --> |
249 | * <!-- end-user-doc --> |
250 | * @generated |
251 | */ |
252 | @Override |
253 | public void eUnset(int featureID) { |
254 | switch (featureID) { |
255 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__ASSEMBLY_CONTEXT_SINK_DELEGATION_CONNECTOR: |
256 | setAssemblyContext__SinkDelegationConnector((AssemblyContext)null); |
257 | return; |
258 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__INNER_SINK_ROLE_SINK_ROLE: |
259 | setInnerSinkRole__SinkRole((SinkRole)null); |
260 | return; |
261 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__OUTER_SINK_ROLE_SINK_ROLE: |
262 | setOuterSinkRole__SinkRole((SinkRole)null); |
263 | return; |
264 | } |
265 | super.eUnset(featureID); |
266 | } |
267 | |
268 | /** |
269 | * <!-- begin-user-doc --> |
270 | * <!-- end-user-doc --> |
271 | * @generated |
272 | */ |
273 | @Override |
274 | public boolean eIsSet(int featureID) { |
275 | switch (featureID) { |
276 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__ASSEMBLY_CONTEXT_SINK_DELEGATION_CONNECTOR: |
277 | return assemblyContext__SinkDelegationConnector != null; |
278 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__INNER_SINK_ROLE_SINK_ROLE: |
279 | return innerSinkRole__SinkRole != null; |
280 | case CompositionPackage.SINK_DELEGATION_CONNECTOR__OUTER_SINK_ROLE_SINK_ROLE: |
281 | return outerSinkRole__SinkRole != null; |
282 | } |
283 | return super.eIsSet(featureID); |
284 | } |
285 | |
286 | } //SinkDelegationConnectorImpl |