| 1 | /** |
| 2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.pcm.resourceenvironment.impl; |
| 7 | |
| 8 | import org.eclipse.emf.common.notify.Notification; |
| 9 | import org.eclipse.emf.common.notify.NotificationChain; |
| 10 | import org.eclipse.emf.ecore.EClass; |
| 11 | import org.eclipse.emf.ecore.InternalEObject; |
| 12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| 13 | import org.eclipse.emf.ecore.util.EcoreUtil; |
| 14 | |
| 15 | import de.uka.ipd.sdq.identifier.impl.IdentifierImpl; |
| 16 | import de.uka.ipd.sdq.pcm.core.CorePackage; |
| 17 | import de.uka.ipd.sdq.pcm.core.PCMRandomVariable; |
| 18 | import de.uka.ipd.sdq.pcm.resourceenvironment.CommunicationLinkResourceSpecification; |
| 19 | import de.uka.ipd.sdq.pcm.resourceenvironment.LinkingResource; |
| 20 | import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceenvironmentPackage; |
| 21 | import de.uka.ipd.sdq.pcm.resourcetype.CommunicationLinkResourceType; |
| 22 | |
| 23 | /** |
| 24 | * <!-- begin-user-doc --> |
| 25 | * An implementation of the model object '<em><b>Communication Link Resource Specification</b></em>'. |
| 26 | * <!-- end-user-doc --> |
| 27 | * <p> |
| 28 | * The following features are implemented: |
| 29 | * <ul> |
| 30 | * <li>{@link de.uka.ipd.sdq.pcm.resourceenvironment.impl.CommunicationLinkResourceSpecificationImpl#getLinkingResource_CommunicationLinkResourceSpecification <em>Linking Resource Communication Link Resource Specification</em>}</li> |
| 31 | * <li>{@link de.uka.ipd.sdq.pcm.resourceenvironment.impl.CommunicationLinkResourceSpecificationImpl#getFailureProbability <em>Failure Probability</em>}</li> |
| 32 | * <li>{@link de.uka.ipd.sdq.pcm.resourceenvironment.impl.CommunicationLinkResourceSpecificationImpl#getCommunicationLinkResourceType_CommunicationLinkResourceSpecification <em>Communication Link Resource Type Communication Link Resource Specification</em>}</li> |
| 33 | * <li>{@link de.uka.ipd.sdq.pcm.resourceenvironment.impl.CommunicationLinkResourceSpecificationImpl#getLatency_CommunicationLinkResourceSpecification <em>Latency Communication Link Resource Specification</em>}</li> |
| 34 | * <li>{@link de.uka.ipd.sdq.pcm.resourceenvironment.impl.CommunicationLinkResourceSpecificationImpl#getThroughput_CommunicationLinkResourceSpecification <em>Throughput Communication Link Resource Specification</em>}</li> |
| 35 | * </ul> |
| 36 | * </p> |
| 37 | * |
| 38 | * @generated |
| 39 | */ |
| 40 | public class CommunicationLinkResourceSpecificationImpl extends IdentifierImpl implements CommunicationLinkResourceSpecification { |
| 41 | /** |
| 42 | * <!-- begin-user-doc --> |
| 43 | * <!-- end-user-doc --> |
| 44 | * @generated |
| 45 | */ |
| 46 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
| 47 | |
| 48 | /** |
| 49 | * The default value of the '{@link #getFailureProbability() <em>Failure Probability</em>}' attribute. |
| 50 | * <!-- begin-user-doc --> |
| 51 | * <!-- end-user-doc --> |
| 52 | * @see #getFailureProbability() |
| 53 | * @generated |
| 54 | * @ordered |
| 55 | */ |
| 56 | protected static final double FAILURE_PROBABILITY_EDEFAULT = 0.0; |
| 57 | |
| 58 | /** |
| 59 | * The cached value of the '{@link #getFailureProbability() <em>Failure Probability</em>}' attribute. |
| 60 | * <!-- begin-user-doc --> |
| 61 | * <!-- end-user-doc --> |
| 62 | * @see #getFailureProbability() |
| 63 | * @generated |
| 64 | * @ordered |
| 65 | */ |
| 66 | protected double failureProbability = FAILURE_PROBABILITY_EDEFAULT; |
| 67 | |
| 68 | /** |
| 69 | * The cached value of the '{@link #getCommunicationLinkResourceType_CommunicationLinkResourceSpecification() <em>Communication Link Resource Type Communication Link Resource Specification</em>}' reference. |
| 70 | * <!-- begin-user-doc --> |
| 71 | * <!-- end-user-doc --> |
| 72 | * @see #getCommunicationLinkResourceType_CommunicationLinkResourceSpecification() |
| 73 | * @generated |
| 74 | * @ordered |
| 75 | */ |
| 76 | protected CommunicationLinkResourceType communicationLinkResourceType_CommunicationLinkResourceSpecification; |
| 77 | |
| 78 | /** |
| 79 | * The cached value of the '{@link #getLatency_CommunicationLinkResourceSpecification() <em>Latency Communication Link Resource Specification</em>}' containment reference. |
| 80 | * <!-- begin-user-doc --> |
| 81 | * <!-- end-user-doc --> |
| 82 | * @see #getLatency_CommunicationLinkResourceSpecification() |
| 83 | * @generated |
| 84 | * @ordered |
| 85 | */ |
| 86 | protected PCMRandomVariable latency_CommunicationLinkResourceSpecification; |
| 87 | |
| 88 | /** |
| 89 | * The cached value of the '{@link #getThroughput_CommunicationLinkResourceSpecification() <em>Throughput Communication Link Resource Specification</em>}' containment reference. |
| 90 | * <!-- begin-user-doc --> |
| 91 | * <!-- end-user-doc --> |
| 92 | * @see #getThroughput_CommunicationLinkResourceSpecification() |
| 93 | * @generated |
| 94 | * @ordered |
| 95 | */ |
| 96 | protected PCMRandomVariable throughput_CommunicationLinkResourceSpecification; |
| 97 | |
| 98 | /** |
| 99 | * <!-- begin-user-doc --> |
| 100 | * <!-- end-user-doc --> |
| 101 | * @generated |
| 102 | */ |
| 103 | protected CommunicationLinkResourceSpecificationImpl() { |
| 104 | super(); |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * <!-- begin-user-doc --> |
| 109 | * <!-- end-user-doc --> |
| 110 | * @generated |
| 111 | */ |
| 112 | @Override |
| 113 | protected EClass eStaticClass() { |
| 114 | return ResourceenvironmentPackage.Literals.COMMUNICATION_LINK_RESOURCE_SPECIFICATION; |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * <!-- begin-user-doc --> |
| 119 | * <!-- end-user-doc --> |
| 120 | * @generated |
| 121 | */ |
| 122 | public LinkingResource getLinkingResource_CommunicationLinkResourceSpecification() { |
| 123 | if (eContainerFeatureID() != ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION) return null; |
| 124 | return (LinkingResource)eContainer(); |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * <!-- begin-user-doc --> |
| 129 | * <!-- end-user-doc --> |
| 130 | * @generated |
| 131 | */ |
| 132 | public NotificationChain basicSetLinkingResource_CommunicationLinkResourceSpecification(LinkingResource newLinkingResource_CommunicationLinkResourceSpecification, NotificationChain msgs) { |
| 133 | msgs = eBasicSetContainer((InternalEObject)newLinkingResource_CommunicationLinkResourceSpecification, ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, msgs); |
| 134 | return msgs; |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * <!-- begin-user-doc --> |
| 139 | * <!-- end-user-doc --> |
| 140 | * @generated |
| 141 | */ |
| 142 | public void setLinkingResource_CommunicationLinkResourceSpecification(LinkingResource newLinkingResource_CommunicationLinkResourceSpecification) { |
| 143 | if (newLinkingResource_CommunicationLinkResourceSpecification != eInternalContainer() || (eContainerFeatureID() != ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION && newLinkingResource_CommunicationLinkResourceSpecification != null)) { |
| 144 | if (EcoreUtil.isAncestor(this, newLinkingResource_CommunicationLinkResourceSpecification)) |
| 145 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); |
| 146 | NotificationChain msgs = null; |
| 147 | if (eInternalContainer() != null) |
| 148 | msgs = eBasicRemoveFromContainer(msgs); |
| 149 | if (newLinkingResource_CommunicationLinkResourceSpecification != null) |
| 150 | msgs = ((InternalEObject)newLinkingResource_CommunicationLinkResourceSpecification).eInverseAdd(this, ResourceenvironmentPackage.LINKING_RESOURCE__COMMUNICATION_LINK_RESOURCE_SPECIFICATIONS_LINKING_RESOURCE, LinkingResource.class, msgs); |
| 151 | msgs = basicSetLinkingResource_CommunicationLinkResourceSpecification(newLinkingResource_CommunicationLinkResourceSpecification, msgs); |
| 152 | if (msgs != null) msgs.dispatch(); |
| 153 | } |
| 154 | else if (eNotificationRequired()) |
| 155 | eNotify(new ENotificationImpl(this, Notification.SET, ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, newLinkingResource_CommunicationLinkResourceSpecification, newLinkingResource_CommunicationLinkResourceSpecification)); |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * <!-- begin-user-doc --> |
| 160 | * <!-- end-user-doc --> |
| 161 | * @generated |
| 162 | */ |
| 163 | public double getFailureProbability() { |
| 164 | return failureProbability; |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * <!-- begin-user-doc --> |
| 169 | * <!-- end-user-doc --> |
| 170 | * @generated |
| 171 | */ |
| 172 | public void setFailureProbability(double newFailureProbability) { |
| 173 | double oldFailureProbability = failureProbability; |
| 174 | failureProbability = newFailureProbability; |
| 175 | if (eNotificationRequired()) |
| 176 | eNotify(new ENotificationImpl(this, Notification.SET, ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__FAILURE_PROBABILITY, oldFailureProbability, failureProbability)); |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * <!-- begin-user-doc --> |
| 181 | * <!-- end-user-doc --> |
| 182 | * @generated |
| 183 | */ |
| 184 | public CommunicationLinkResourceType getCommunicationLinkResourceType_CommunicationLinkResourceSpecification() { |
| 185 | if (communicationLinkResourceType_CommunicationLinkResourceSpecification != null && communicationLinkResourceType_CommunicationLinkResourceSpecification.eIsProxy()) { |
| 186 | InternalEObject oldCommunicationLinkResourceType_CommunicationLinkResourceSpecification = (InternalEObject)communicationLinkResourceType_CommunicationLinkResourceSpecification; |
| 187 | communicationLinkResourceType_CommunicationLinkResourceSpecification = (CommunicationLinkResourceType)eResolveProxy(oldCommunicationLinkResourceType_CommunicationLinkResourceSpecification); |
| 188 | if (communicationLinkResourceType_CommunicationLinkResourceSpecification != oldCommunicationLinkResourceType_CommunicationLinkResourceSpecification) { |
| 189 | if (eNotificationRequired()) |
| 190 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, oldCommunicationLinkResourceType_CommunicationLinkResourceSpecification, communicationLinkResourceType_CommunicationLinkResourceSpecification)); |
| 191 | } |
| 192 | } |
| 193 | return communicationLinkResourceType_CommunicationLinkResourceSpecification; |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * <!-- begin-user-doc --> |
| 198 | * <!-- end-user-doc --> |
| 199 | * @generated |
| 200 | */ |
| 201 | public CommunicationLinkResourceType basicGetCommunicationLinkResourceType_CommunicationLinkResourceSpecification() { |
| 202 | return communicationLinkResourceType_CommunicationLinkResourceSpecification; |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * <!-- begin-user-doc --> |
| 207 | * <!-- end-user-doc --> |
| 208 | * @generated |
| 209 | */ |
| 210 | public void setCommunicationLinkResourceType_CommunicationLinkResourceSpecification(CommunicationLinkResourceType newCommunicationLinkResourceType_CommunicationLinkResourceSpecification) { |
| 211 | CommunicationLinkResourceType oldCommunicationLinkResourceType_CommunicationLinkResourceSpecification = communicationLinkResourceType_CommunicationLinkResourceSpecification; |
| 212 | communicationLinkResourceType_CommunicationLinkResourceSpecification = newCommunicationLinkResourceType_CommunicationLinkResourceSpecification; |
| 213 | if (eNotificationRequired()) |
| 214 | eNotify(new ENotificationImpl(this, Notification.SET, ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, oldCommunicationLinkResourceType_CommunicationLinkResourceSpecification, communicationLinkResourceType_CommunicationLinkResourceSpecification)); |
| 215 | } |
| 216 | |
| 217 | /** |
| 218 | * <!-- begin-user-doc --> |
| 219 | * <!-- end-user-doc --> |
| 220 | * @generated |
| 221 | */ |
| 222 | public PCMRandomVariable getLatency_CommunicationLinkResourceSpecification() { |
| 223 | return latency_CommunicationLinkResourceSpecification; |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * <!-- begin-user-doc --> |
| 228 | * <!-- end-user-doc --> |
| 229 | * @generated |
| 230 | */ |
| 231 | public NotificationChain basicSetLatency_CommunicationLinkResourceSpecification(PCMRandomVariable newLatency_CommunicationLinkResourceSpecification, NotificationChain msgs) { |
| 232 | PCMRandomVariable oldLatency_CommunicationLinkResourceSpecification = latency_CommunicationLinkResourceSpecification; |
| 233 | latency_CommunicationLinkResourceSpecification = newLatency_CommunicationLinkResourceSpecification; |
| 234 | if (eNotificationRequired()) { |
| 235 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LATENCY_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, oldLatency_CommunicationLinkResourceSpecification, newLatency_CommunicationLinkResourceSpecification); |
| 236 | if (msgs == null) msgs = notification; else msgs.add(notification); |
| 237 | } |
| 238 | return msgs; |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * <!-- begin-user-doc --> |
| 243 | * <!-- end-user-doc --> |
| 244 | * @generated |
| 245 | */ |
| 246 | public void setLatency_CommunicationLinkResourceSpecification(PCMRandomVariable newLatency_CommunicationLinkResourceSpecification) { |
| 247 | if (newLatency_CommunicationLinkResourceSpecification != latency_CommunicationLinkResourceSpecification) { |
| 248 | NotificationChain msgs = null; |
| 249 | if (latency_CommunicationLinkResourceSpecification != null) |
| 250 | msgs = ((InternalEObject)latency_CommunicationLinkResourceSpecification).eInverseRemove(this, CorePackage.PCM_RANDOM_VARIABLE__COMMUNICATION_LINK_RESOURCE_SPECIFICATION_LATENCY_PCM_RANDOM_VARIABLE, PCMRandomVariable.class, msgs); |
| 251 | if (newLatency_CommunicationLinkResourceSpecification != null) |
| 252 | msgs = ((InternalEObject)newLatency_CommunicationLinkResourceSpecification).eInverseAdd(this, CorePackage.PCM_RANDOM_VARIABLE__COMMUNICATION_LINK_RESOURCE_SPECIFICATION_LATENCY_PCM_RANDOM_VARIABLE, PCMRandomVariable.class, msgs); |
| 253 | msgs = basicSetLatency_CommunicationLinkResourceSpecification(newLatency_CommunicationLinkResourceSpecification, msgs); |
| 254 | if (msgs != null) msgs.dispatch(); |
| 255 | } |
| 256 | else if (eNotificationRequired()) |
| 257 | eNotify(new ENotificationImpl(this, Notification.SET, ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LATENCY_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, newLatency_CommunicationLinkResourceSpecification, newLatency_CommunicationLinkResourceSpecification)); |
| 258 | } |
| 259 | |
| 260 | /** |
| 261 | * <!-- begin-user-doc --> |
| 262 | * <!-- end-user-doc --> |
| 263 | * @generated |
| 264 | */ |
| 265 | public PCMRandomVariable getThroughput_CommunicationLinkResourceSpecification() { |
| 266 | return throughput_CommunicationLinkResourceSpecification; |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * <!-- begin-user-doc --> |
| 271 | * <!-- end-user-doc --> |
| 272 | * @generated |
| 273 | */ |
| 274 | public NotificationChain basicSetThroughput_CommunicationLinkResourceSpecification(PCMRandomVariable newThroughput_CommunicationLinkResourceSpecification, NotificationChain msgs) { |
| 275 | PCMRandomVariable oldThroughput_CommunicationLinkResourceSpecification = throughput_CommunicationLinkResourceSpecification; |
| 276 | throughput_CommunicationLinkResourceSpecification = newThroughput_CommunicationLinkResourceSpecification; |
| 277 | if (eNotificationRequired()) { |
| 278 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__THROUGHPUT_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, oldThroughput_CommunicationLinkResourceSpecification, newThroughput_CommunicationLinkResourceSpecification); |
| 279 | if (msgs == null) msgs = notification; else msgs.add(notification); |
| 280 | } |
| 281 | return msgs; |
| 282 | } |
| 283 | |
| 284 | /** |
| 285 | * <!-- begin-user-doc --> |
| 286 | * <!-- end-user-doc --> |
| 287 | * @generated |
| 288 | */ |
| 289 | public void setThroughput_CommunicationLinkResourceSpecification(PCMRandomVariable newThroughput_CommunicationLinkResourceSpecification) { |
| 290 | if (newThroughput_CommunicationLinkResourceSpecification != throughput_CommunicationLinkResourceSpecification) { |
| 291 | NotificationChain msgs = null; |
| 292 | if (throughput_CommunicationLinkResourceSpecification != null) |
| 293 | msgs = ((InternalEObject)throughput_CommunicationLinkResourceSpecification).eInverseRemove(this, CorePackage.PCM_RANDOM_VARIABLE__COMMUNICATION_LINK_RESOURCE_SPECIFCATION_THROUGHPUT_PCM_RANDOM_VARIABLE, PCMRandomVariable.class, msgs); |
| 294 | if (newThroughput_CommunicationLinkResourceSpecification != null) |
| 295 | msgs = ((InternalEObject)newThroughput_CommunicationLinkResourceSpecification).eInverseAdd(this, CorePackage.PCM_RANDOM_VARIABLE__COMMUNICATION_LINK_RESOURCE_SPECIFCATION_THROUGHPUT_PCM_RANDOM_VARIABLE, PCMRandomVariable.class, msgs); |
| 296 | msgs = basicSetThroughput_CommunicationLinkResourceSpecification(newThroughput_CommunicationLinkResourceSpecification, msgs); |
| 297 | if (msgs != null) msgs.dispatch(); |
| 298 | } |
| 299 | else if (eNotificationRequired()) |
| 300 | eNotify(new ENotificationImpl(this, Notification.SET, ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__THROUGHPUT_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, newThroughput_CommunicationLinkResourceSpecification, newThroughput_CommunicationLinkResourceSpecification)); |
| 301 | } |
| 302 | |
| 303 | /** |
| 304 | * <!-- begin-user-doc --> |
| 305 | * <!-- end-user-doc --> |
| 306 | * @generated |
| 307 | */ |
| 308 | @Override |
| 309 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 310 | switch (featureID) { |
| 311 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 312 | if (eInternalContainer() != null) |
| 313 | msgs = eBasicRemoveFromContainer(msgs); |
| 314 | return basicSetLinkingResource_CommunicationLinkResourceSpecification((LinkingResource)otherEnd, msgs); |
| 315 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LATENCY_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 316 | if (latency_CommunicationLinkResourceSpecification != null) |
| 317 | msgs = ((InternalEObject)latency_CommunicationLinkResourceSpecification).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LATENCY_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, null, msgs); |
| 318 | return basicSetLatency_CommunicationLinkResourceSpecification((PCMRandomVariable)otherEnd, msgs); |
| 319 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__THROUGHPUT_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 320 | if (throughput_CommunicationLinkResourceSpecification != null) |
| 321 | msgs = ((InternalEObject)throughput_CommunicationLinkResourceSpecification).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__THROUGHPUT_COMMUNICATION_LINK_RESOURCE_SPECIFICATION, null, msgs); |
| 322 | return basicSetThroughput_CommunicationLinkResourceSpecification((PCMRandomVariable)otherEnd, msgs); |
| 323 | } |
| 324 | return super.eInverseAdd(otherEnd, featureID, msgs); |
| 325 | } |
| 326 | |
| 327 | /** |
| 328 | * <!-- begin-user-doc --> |
| 329 | * <!-- end-user-doc --> |
| 330 | * @generated |
| 331 | */ |
| 332 | @Override |
| 333 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 334 | switch (featureID) { |
| 335 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 336 | return basicSetLinkingResource_CommunicationLinkResourceSpecification(null, msgs); |
| 337 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LATENCY_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 338 | return basicSetLatency_CommunicationLinkResourceSpecification(null, msgs); |
| 339 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__THROUGHPUT_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 340 | return basicSetThroughput_CommunicationLinkResourceSpecification(null, msgs); |
| 341 | } |
| 342 | return super.eInverseRemove(otherEnd, featureID, msgs); |
| 343 | } |
| 344 | |
| 345 | /** |
| 346 | * <!-- begin-user-doc --> |
| 347 | * <!-- end-user-doc --> |
| 348 | * @generated |
| 349 | */ |
| 350 | @Override |
| 351 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { |
| 352 | switch (eContainerFeatureID()) { |
| 353 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 354 | return eInternalContainer().eInverseRemove(this, ResourceenvironmentPackage.LINKING_RESOURCE__COMMUNICATION_LINK_RESOURCE_SPECIFICATIONS_LINKING_RESOURCE, LinkingResource.class, msgs); |
| 355 | } |
| 356 | return super.eBasicRemoveFromContainerFeature(msgs); |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * <!-- begin-user-doc --> |
| 361 | * <!-- end-user-doc --> |
| 362 | * @generated |
| 363 | */ |
| 364 | @Override |
| 365 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| 366 | switch (featureID) { |
| 367 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 368 | return getLinkingResource_CommunicationLinkResourceSpecification(); |
| 369 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__FAILURE_PROBABILITY: |
| 370 | return getFailureProbability(); |
| 371 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 372 | if (resolve) return getCommunicationLinkResourceType_CommunicationLinkResourceSpecification(); |
| 373 | return basicGetCommunicationLinkResourceType_CommunicationLinkResourceSpecification(); |
| 374 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LATENCY_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 375 | return getLatency_CommunicationLinkResourceSpecification(); |
| 376 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__THROUGHPUT_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 377 | return getThroughput_CommunicationLinkResourceSpecification(); |
| 378 | } |
| 379 | return super.eGet(featureID, resolve, coreType); |
| 380 | } |
| 381 | |
| 382 | /** |
| 383 | * <!-- begin-user-doc --> |
| 384 | * <!-- end-user-doc --> |
| 385 | * @generated |
| 386 | */ |
| 387 | @Override |
| 388 | public void eSet(int featureID, Object newValue) { |
| 389 | switch (featureID) { |
| 390 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 391 | setLinkingResource_CommunicationLinkResourceSpecification((LinkingResource)newValue); |
| 392 | return; |
| 393 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__FAILURE_PROBABILITY: |
| 394 | setFailureProbability((Double)newValue); |
| 395 | return; |
| 396 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 397 | setCommunicationLinkResourceType_CommunicationLinkResourceSpecification((CommunicationLinkResourceType)newValue); |
| 398 | return; |
| 399 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LATENCY_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 400 | setLatency_CommunicationLinkResourceSpecification((PCMRandomVariable)newValue); |
| 401 | return; |
| 402 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__THROUGHPUT_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 403 | setThroughput_CommunicationLinkResourceSpecification((PCMRandomVariable)newValue); |
| 404 | return; |
| 405 | } |
| 406 | super.eSet(featureID, newValue); |
| 407 | } |
| 408 | |
| 409 | /** |
| 410 | * <!-- begin-user-doc --> |
| 411 | * <!-- end-user-doc --> |
| 412 | * @generated |
| 413 | */ |
| 414 | @Override |
| 415 | public void eUnset(int featureID) { |
| 416 | switch (featureID) { |
| 417 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 418 | setLinkingResource_CommunicationLinkResourceSpecification((LinkingResource)null); |
| 419 | return; |
| 420 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__FAILURE_PROBABILITY: |
| 421 | setFailureProbability(FAILURE_PROBABILITY_EDEFAULT); |
| 422 | return; |
| 423 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 424 | setCommunicationLinkResourceType_CommunicationLinkResourceSpecification((CommunicationLinkResourceType)null); |
| 425 | return; |
| 426 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LATENCY_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 427 | setLatency_CommunicationLinkResourceSpecification((PCMRandomVariable)null); |
| 428 | return; |
| 429 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__THROUGHPUT_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 430 | setThroughput_CommunicationLinkResourceSpecification((PCMRandomVariable)null); |
| 431 | return; |
| 432 | } |
| 433 | super.eUnset(featureID); |
| 434 | } |
| 435 | |
| 436 | /** |
| 437 | * <!-- begin-user-doc --> |
| 438 | * <!-- end-user-doc --> |
| 439 | * @generated |
| 440 | */ |
| 441 | @Override |
| 442 | public boolean eIsSet(int featureID) { |
| 443 | switch (featureID) { |
| 444 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LINKING_RESOURCE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 445 | return getLinkingResource_CommunicationLinkResourceSpecification() != null; |
| 446 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__FAILURE_PROBABILITY: |
| 447 | return failureProbability != FAILURE_PROBABILITY_EDEFAULT; |
| 448 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 449 | return communicationLinkResourceType_CommunicationLinkResourceSpecification != null; |
| 450 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__LATENCY_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 451 | return latency_CommunicationLinkResourceSpecification != null; |
| 452 | case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION__THROUGHPUT_COMMUNICATION_LINK_RESOURCE_SPECIFICATION: |
| 453 | return throughput_CommunicationLinkResourceSpecification != null; |
| 454 | } |
| 455 | return super.eIsSet(featureID); |
| 456 | } |
| 457 | |
| 458 | /** |
| 459 | * <!-- begin-user-doc --> |
| 460 | * <!-- end-user-doc --> |
| 461 | * @generated |
| 462 | */ |
| 463 | @Override |
| 464 | public String toString() { |
| 465 | if (eIsProxy()) return super.toString(); |
| 466 | |
| 467 | StringBuffer result = new StringBuffer(super.toString()); |
| 468 | result.append(" (failureProbability: "); |
| 469 | result.append(failureProbability); |
| 470 | result.append(')'); |
| 471 | return result.toString(); |
| 472 | } |
| 473 | |
| 474 | } //CommunicationLinkResourceSpecificationImpl |