| 1 | /** |
| 2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.pcm.seff.seff_reliability.impl; |
| 7 | |
| 8 | import de.uka.ipd.sdq.pcm.seff.AbstractAction; |
| 9 | import de.uka.ipd.sdq.pcm.seff.AbstractBranchTransition; |
| 10 | import de.uka.ipd.sdq.pcm.seff.AbstractLoopAction; |
| 11 | import de.uka.ipd.sdq.pcm.seff.ResourceDemandingBehaviour; |
| 12 | import de.uka.ipd.sdq.pcm.seff.SeffPackage; |
| 13 | |
| 14 | import de.uka.ipd.sdq.pcm.seff.seff_reliability.RecoveryAction; |
| 15 | import de.uka.ipd.sdq.pcm.seff.seff_reliability.RecoveryActionBehaviour; |
| 16 | import de.uka.ipd.sdq.pcm.seff.seff_reliability.Seff_reliabilityPackage; |
| 17 | |
| 18 | import de.uka.ipd.sdq.pcm.seff.seff_reliability.util.Seff_reliabilityValidator; |
| 19 | import de.uka.ipd.sdq.pcm.seff.util.SeffValidator; |
| 20 | |
| 21 | import java.util.Collection; |
| 22 | import java.util.Map; |
| 23 | |
| 24 | import org.eclipse.emf.common.notify.Notification; |
| 25 | import org.eclipse.emf.common.notify.NotificationChain; |
| 26 | |
| 27 | import org.eclipse.emf.common.util.BasicDiagnostic; |
| 28 | import org.eclipse.emf.common.util.Diagnostic; |
| 29 | import org.eclipse.emf.common.util.DiagnosticChain; |
| 30 | import org.eclipse.emf.common.util.EList; |
| 31 | |
| 32 | import org.eclipse.emf.ecore.EClass; |
| 33 | import org.eclipse.emf.ecore.InternalEObject; |
| 34 | |
| 35 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| 36 | |
| 37 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| 38 | |
| 39 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; |
| 40 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
| 41 | import org.eclipse.emf.ecore.util.EObjectValidator; |
| 42 | import org.eclipse.emf.ecore.util.EcoreUtil; |
| 43 | import org.eclipse.emf.ecore.util.InternalEList; |
| 44 | |
| 45 | import org.eclipse.ocl.ParserException; |
| 46 | |
| 47 | import org.eclipse.ocl.ecore.Constraint; |
| 48 | import org.eclipse.ocl.ecore.OCL; |
| 49 | |
| 50 | /** |
| 51 | * <!-- begin-user-doc --> |
| 52 | * An implementation of the model object '<em><b>Recovery Action Behaviour</b></em>'. |
| 53 | * <!-- end-user-doc --> |
| 54 | * <p> |
| 55 | * The following features are implemented: |
| 56 | * <ul> |
| 57 | * <li>{@link de.uka.ipd.sdq.pcm.seff.seff_reliability.impl.RecoveryActionBehaviourImpl#getAbstractLoopAction_ResourceDemandingBehaviour <em>Abstract Loop Action Resource Demanding Behaviour</em>}</li> |
| 58 | * <li>{@link de.uka.ipd.sdq.pcm.seff.seff_reliability.impl.RecoveryActionBehaviourImpl#getAbstractBranchTransition_ResourceDemandingBehaviour <em>Abstract Branch Transition Resource Demanding Behaviour</em>}</li> |
| 59 | * <li>{@link de.uka.ipd.sdq.pcm.seff.seff_reliability.impl.RecoveryActionBehaviourImpl#getSteps_Behaviour <em>Steps Behaviour</em>}</li> |
| 60 | * <li>{@link de.uka.ipd.sdq.pcm.seff.seff_reliability.impl.RecoveryActionBehaviourImpl#getFailureHandlingAlternatives__RecoveryActionBehaviour <em>Failure Handling Alternatives Recovery Action Behaviour</em>}</li> |
| 61 | * <li>{@link de.uka.ipd.sdq.pcm.seff.seff_reliability.impl.RecoveryActionBehaviourImpl#getRecoveryAction__RecoveryActionBehaviour <em>Recovery Action Recovery Action Behaviour</em>}</li> |
| 62 | * </ul> |
| 63 | * </p> |
| 64 | * |
| 65 | * @generated |
| 66 | */ |
| 67 | public class RecoveryActionBehaviourImpl extends FailureHandlingEntityImpl implements RecoveryActionBehaviour { |
| 68 | /** |
| 69 | * <!-- begin-user-doc --> |
| 70 | * <!-- end-user-doc --> |
| 71 | * @generated |
| 72 | */ |
| 73 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
| 74 | |
| 75 | /** |
| 76 | * The cached value of the '{@link #getSteps_Behaviour() <em>Steps Behaviour</em>}' containment reference list. |
| 77 | * <!-- begin-user-doc --> |
| 78 | * <!-- end-user-doc --> |
| 79 | * @see #getSteps_Behaviour() |
| 80 | * @generated |
| 81 | * @ordered |
| 82 | */ |
| 83 | protected EList<AbstractAction> steps_Behaviour; |
| 84 | |
| 85 | /** |
| 86 | * The cached value of the '{@link #getFailureHandlingAlternatives__RecoveryActionBehaviour() <em>Failure Handling Alternatives Recovery Action Behaviour</em>}' reference list. |
| 87 | * <!-- begin-user-doc --> |
| 88 | * <!-- end-user-doc --> |
| 89 | * @see #getFailureHandlingAlternatives__RecoveryActionBehaviour() |
| 90 | * @generated |
| 91 | * @ordered |
| 92 | */ |
| 93 | protected EList<RecoveryActionBehaviour> failureHandlingAlternatives__RecoveryActionBehaviour; |
| 94 | |
| 95 | /** |
| 96 | * <!-- begin-user-doc --> |
| 97 | * <!-- end-user-doc --> |
| 98 | * @generated |
| 99 | */ |
| 100 | protected RecoveryActionBehaviourImpl() { |
| 101 | super(); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * <!-- begin-user-doc --> |
| 106 | * <!-- end-user-doc --> |
| 107 | * @generated |
| 108 | */ |
| 109 | @Override |
| 110 | protected EClass eStaticClass() { |
| 111 | return Seff_reliabilityPackage.Literals.RECOVERY_ACTION_BEHAVIOUR; |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * <!-- begin-user-doc --> |
| 116 | * <!-- end-user-doc --> |
| 117 | * @generated |
| 118 | */ |
| 119 | public AbstractLoopAction getAbstractLoopAction_ResourceDemandingBehaviour() { |
| 120 | if (eContainerFeatureID() != Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR) return null; |
| 121 | return (AbstractLoopAction)eContainer(); |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * <!-- begin-user-doc --> |
| 126 | * <!-- end-user-doc --> |
| 127 | * @generated |
| 128 | */ |
| 129 | public NotificationChain basicSetAbstractLoopAction_ResourceDemandingBehaviour(AbstractLoopAction newAbstractLoopAction_ResourceDemandingBehaviour, NotificationChain msgs) { |
| 130 | msgs = eBasicSetContainer((InternalEObject)newAbstractLoopAction_ResourceDemandingBehaviour, Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR, msgs); |
| 131 | return msgs; |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * <!-- begin-user-doc --> |
| 136 | * <!-- end-user-doc --> |
| 137 | * @generated |
| 138 | */ |
| 139 | public void setAbstractLoopAction_ResourceDemandingBehaviour(AbstractLoopAction newAbstractLoopAction_ResourceDemandingBehaviour) { |
| 140 | if (newAbstractLoopAction_ResourceDemandingBehaviour != eInternalContainer() || (eContainerFeatureID() != Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR && newAbstractLoopAction_ResourceDemandingBehaviour != null)) { |
| 141 | if (EcoreUtil.isAncestor(this, newAbstractLoopAction_ResourceDemandingBehaviour)) |
| 142 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); |
| 143 | NotificationChain msgs = null; |
| 144 | if (eInternalContainer() != null) |
| 145 | msgs = eBasicRemoveFromContainer(msgs); |
| 146 | if (newAbstractLoopAction_ResourceDemandingBehaviour != null) |
| 147 | msgs = ((InternalEObject)newAbstractLoopAction_ResourceDemandingBehaviour).eInverseAdd(this, SeffPackage.ABSTRACT_LOOP_ACTION__BODY_BEHAVIOUR_LOOP, AbstractLoopAction.class, msgs); |
| 148 | msgs = basicSetAbstractLoopAction_ResourceDemandingBehaviour(newAbstractLoopAction_ResourceDemandingBehaviour, msgs); |
| 149 | if (msgs != null) msgs.dispatch(); |
| 150 | } |
| 151 | else if (eNotificationRequired()) |
| 152 | eNotify(new ENotificationImpl(this, Notification.SET, Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR, newAbstractLoopAction_ResourceDemandingBehaviour, newAbstractLoopAction_ResourceDemandingBehaviour)); |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * <!-- begin-user-doc --> |
| 157 | * <!-- end-user-doc --> |
| 158 | * @generated |
| 159 | */ |
| 160 | public AbstractBranchTransition getAbstractBranchTransition_ResourceDemandingBehaviour() { |
| 161 | if (eContainerFeatureID() != Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR) return null; |
| 162 | return (AbstractBranchTransition)eContainer(); |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * <!-- begin-user-doc --> |
| 167 | * <!-- end-user-doc --> |
| 168 | * @generated |
| 169 | */ |
| 170 | public NotificationChain basicSetAbstractBranchTransition_ResourceDemandingBehaviour(AbstractBranchTransition newAbstractBranchTransition_ResourceDemandingBehaviour, NotificationChain msgs) { |
| 171 | msgs = eBasicSetContainer((InternalEObject)newAbstractBranchTransition_ResourceDemandingBehaviour, Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR, msgs); |
| 172 | return msgs; |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * <!-- begin-user-doc --> |
| 177 | * <!-- end-user-doc --> |
| 178 | * @generated |
| 179 | */ |
| 180 | public void setAbstractBranchTransition_ResourceDemandingBehaviour(AbstractBranchTransition newAbstractBranchTransition_ResourceDemandingBehaviour) { |
| 181 | if (newAbstractBranchTransition_ResourceDemandingBehaviour != eInternalContainer() || (eContainerFeatureID() != Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR && newAbstractBranchTransition_ResourceDemandingBehaviour != null)) { |
| 182 | if (EcoreUtil.isAncestor(this, newAbstractBranchTransition_ResourceDemandingBehaviour)) |
| 183 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); |
| 184 | NotificationChain msgs = null; |
| 185 | if (eInternalContainer() != null) |
| 186 | msgs = eBasicRemoveFromContainer(msgs); |
| 187 | if (newAbstractBranchTransition_ResourceDemandingBehaviour != null) |
| 188 | msgs = ((InternalEObject)newAbstractBranchTransition_ResourceDemandingBehaviour).eInverseAdd(this, SeffPackage.ABSTRACT_BRANCH_TRANSITION__BRANCH_BEHAVIOUR_BRANCH_TRANSITION, AbstractBranchTransition.class, msgs); |
| 189 | msgs = basicSetAbstractBranchTransition_ResourceDemandingBehaviour(newAbstractBranchTransition_ResourceDemandingBehaviour, msgs); |
| 190 | if (msgs != null) msgs.dispatch(); |
| 191 | } |
| 192 | else if (eNotificationRequired()) |
| 193 | eNotify(new ENotificationImpl(this, Notification.SET, Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR, newAbstractBranchTransition_ResourceDemandingBehaviour, newAbstractBranchTransition_ResourceDemandingBehaviour)); |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * <!-- begin-user-doc --> |
| 198 | * <!-- end-user-doc --> |
| 199 | * @generated |
| 200 | */ |
| 201 | public EList<AbstractAction> getSteps_Behaviour() { |
| 202 | if (steps_Behaviour == null) { |
| 203 | steps_Behaviour = new EObjectContainmentWithInverseEList<AbstractAction>(AbstractAction.class, this, Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__STEPS_BEHAVIOUR, SeffPackage.ABSTRACT_ACTION__RESOURCE_DEMANDING_BEHAVIOUR_ABSTRACT_ACTION); |
| 204 | } |
| 205 | return steps_Behaviour; |
| 206 | } |
| 207 | |
| 208 | /** |
| 209 | * <!-- begin-user-doc --> |
| 210 | * <!-- end-user-doc --> |
| 211 | * @generated |
| 212 | */ |
| 213 | public EList<RecoveryActionBehaviour> getFailureHandlingAlternatives__RecoveryActionBehaviour() { |
| 214 | if (failureHandlingAlternatives__RecoveryActionBehaviour == null) { |
| 215 | failureHandlingAlternatives__RecoveryActionBehaviour = new EObjectResolvingEList<RecoveryActionBehaviour>(RecoveryActionBehaviour.class, this, Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__FAILURE_HANDLING_ALTERNATIVES_RECOVERY_ACTION_BEHAVIOUR); |
| 216 | } |
| 217 | return failureHandlingAlternatives__RecoveryActionBehaviour; |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * <!-- begin-user-doc --> |
| 222 | * <!-- end-user-doc --> |
| 223 | * @generated |
| 224 | */ |
| 225 | public RecoveryAction getRecoveryAction__RecoveryActionBehaviour() { |
| 226 | if (eContainerFeatureID() != Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR) return null; |
| 227 | return (RecoveryAction)eContainer(); |
| 228 | } |
| 229 | |
| 230 | /** |
| 231 | * <!-- begin-user-doc --> |
| 232 | * <!-- end-user-doc --> |
| 233 | * @generated |
| 234 | */ |
| 235 | public NotificationChain basicSetRecoveryAction__RecoveryActionBehaviour(RecoveryAction newRecoveryAction__RecoveryActionBehaviour, NotificationChain msgs) { |
| 236 | msgs = eBasicSetContainer((InternalEObject)newRecoveryAction__RecoveryActionBehaviour, Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR, msgs); |
| 237 | return msgs; |
| 238 | } |
| 239 | |
| 240 | /** |
| 241 | * <!-- begin-user-doc --> |
| 242 | * <!-- end-user-doc --> |
| 243 | * @generated |
| 244 | */ |
| 245 | public void setRecoveryAction__RecoveryActionBehaviour(RecoveryAction newRecoveryAction__RecoveryActionBehaviour) { |
| 246 | if (newRecoveryAction__RecoveryActionBehaviour != eInternalContainer() || (eContainerFeatureID() != Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR && newRecoveryAction__RecoveryActionBehaviour != null)) { |
| 247 | if (EcoreUtil.isAncestor(this, newRecoveryAction__RecoveryActionBehaviour)) |
| 248 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); |
| 249 | NotificationChain msgs = null; |
| 250 | if (eInternalContainer() != null) |
| 251 | msgs = eBasicRemoveFromContainer(msgs); |
| 252 | if (newRecoveryAction__RecoveryActionBehaviour != null) |
| 253 | msgs = ((InternalEObject)newRecoveryAction__RecoveryActionBehaviour).eInverseAdd(this, Seff_reliabilityPackage.RECOVERY_ACTION__RECOVERY_ACTION_BEHAVIOURS_RECOVERY_ACTION, RecoveryAction.class, msgs); |
| 254 | msgs = basicSetRecoveryAction__RecoveryActionBehaviour(newRecoveryAction__RecoveryActionBehaviour, msgs); |
| 255 | if (msgs != null) msgs.dispatch(); |
| 256 | } |
| 257 | else if (eNotificationRequired()) |
| 258 | eNotify(new ENotificationImpl(this, Notification.SET, Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR, newRecoveryAction__RecoveryActionBehaviour, newRecoveryAction__RecoveryActionBehaviour)); |
| 259 | } |
| 260 | |
| 261 | /** |
| 262 | * The cached OCL expression body for the '{@link #ExactlyOneStopAction(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Exactly One Stop Action</em>}' operation. |
| 263 | * <!-- begin-user-doc --> |
| 264 | * <!-- end-user-doc --> |
| 265 | * @see #ExactlyOneStopAction(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 266 | * @generated |
| 267 | * @ordered |
| 268 | */ |
| 269 | protected static final String EXACTLY_ONE_STOP_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "self.steps_Behaviour->select(s|s.oclIsTypeOf(StopAction))->size() = 1"; |
| 270 | |
| 271 | /** |
| 272 | * The cached OCL invariant for the '{@link #ExactlyOneStopAction(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Exactly One Stop Action</em>}' invariant operation. |
| 273 | * <!-- begin-user-doc --> |
| 274 | * <!-- end-user-doc --> |
| 275 | * @see #ExactlyOneStopAction(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 276 | * @generated |
| 277 | * @ordered |
| 278 | */ |
| 279 | protected static Constraint EXACTLY_ONE_STOP_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 280 | |
| 281 | /** |
| 282 | * <!-- begin-user-doc --> |
| 283 | * <!-- end-user-doc --> |
| 284 | * @generated |
| 285 | */ |
| 286 | public boolean ExactlyOneStopAction(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 287 | if (EXACTLY_ONE_STOP_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 288 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 289 | helper.setContext(SeffPackage.Literals.RESOURCE_DEMANDING_BEHAVIOUR); |
| 290 | try { |
| 291 | EXACTLY_ONE_STOP_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(EXACTLY_ONE_STOP_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 292 | } |
| 293 | catch (ParserException pe) { |
| 294 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 295 | } |
| 296 | } |
| 297 | if (!EOCL_ENV.createQuery(EXACTLY_ONE_STOP_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 298 | if (diagnostics != null) { |
| 299 | diagnostics.add |
| 300 | (new BasicDiagnostic |
| 301 | (Diagnostic.ERROR, |
| 302 | SeffValidator.DIAGNOSTIC_SOURCE, |
| 303 | SeffValidator.RESOURCE_DEMANDING_BEHAVIOUR__EXACTLY_ONE_STOP_ACTION, |
| 304 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "ExactlyOneStopAction", EObjectValidator.getObjectLabel(this, context) }), |
| 305 | new Object [] { this })); |
| 306 | } |
| 307 | return false; |
| 308 | } |
| 309 | return true; |
| 310 | } |
| 311 | |
| 312 | /** |
| 313 | * The cached OCL expression body for the '{@link #ExactlyOneStartAction(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Exactly One Start Action</em>}' operation. |
| 314 | * <!-- begin-user-doc --> |
| 315 | * <!-- end-user-doc --> |
| 316 | * @see #ExactlyOneStartAction(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 317 | * @generated |
| 318 | * @ordered |
| 319 | */ |
| 320 | protected static final String EXACTLY_ONE_START_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "self.steps_Behaviour->select(s|s.oclIsTypeOf(StartAction))->size() = 1"; |
| 321 | |
| 322 | /** |
| 323 | * The cached OCL invariant for the '{@link #ExactlyOneStartAction(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Exactly One Start Action</em>}' invariant operation. |
| 324 | * <!-- begin-user-doc --> |
| 325 | * <!-- end-user-doc --> |
| 326 | * @see #ExactlyOneStartAction(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 327 | * @generated |
| 328 | * @ordered |
| 329 | */ |
| 330 | protected static Constraint EXACTLY_ONE_START_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 331 | |
| 332 | /** |
| 333 | * <!-- begin-user-doc --> |
| 334 | * <!-- end-user-doc --> |
| 335 | * @generated |
| 336 | */ |
| 337 | public boolean ExactlyOneStartAction(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 338 | if (EXACTLY_ONE_START_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 339 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 340 | helper.setContext(SeffPackage.Literals.RESOURCE_DEMANDING_BEHAVIOUR); |
| 341 | try { |
| 342 | EXACTLY_ONE_START_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(EXACTLY_ONE_START_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 343 | } |
| 344 | catch (ParserException pe) { |
| 345 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 346 | } |
| 347 | } |
| 348 | if (!EOCL_ENV.createQuery(EXACTLY_ONE_START_ACTION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 349 | if (diagnostics != null) { |
| 350 | diagnostics.add |
| 351 | (new BasicDiagnostic |
| 352 | (Diagnostic.ERROR, |
| 353 | SeffValidator.DIAGNOSTIC_SOURCE, |
| 354 | SeffValidator.RESOURCE_DEMANDING_BEHAVIOUR__EXACTLY_ONE_START_ACTION, |
| 355 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "ExactlyOneStartAction", EObjectValidator.getObjectLabel(this, context) }), |
| 356 | new Object [] { this })); |
| 357 | } |
| 358 | return false; |
| 359 | } |
| 360 | return true; |
| 361 | } |
| 362 | |
| 363 | /** |
| 364 | * The cached OCL expression body for the '{@link #EachActionExceptStartActionandStopActionMustHhaveAPredecessorAndSuccessor(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Each Action Except Start Actionand Stop Action Must Hhave APredecessor And Successor</em>}' operation. |
| 365 | * <!-- begin-user-doc --> |
| 366 | * <!-- end-user-doc --> |
| 367 | * @see #EachActionExceptStartActionandStopActionMustHhaveAPredecessorAndSuccessor(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 368 | * @generated |
| 369 | * @ordered |
| 370 | */ |
| 371 | protected static final String EACH_ACTION_EXCEPT_START_ACTIONAND_STOP_ACTION_MUST_HHAVE_APREDECESSOR_AND_SUCCESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "not self.steps_Behaviour->select(s|not s.oclIsTypeOf(StartAction) and not s.oclIsTypeOf(StopAction))->exists(a|a.oclAsType(AbstractAction).predecessor_AbstractAction.oclIsUndefined()) and not self.steps_Behaviour->select(s|not s.oclIsTypeOf(StartAction) and not s.oclIsTypeOf(StopAction))->exists(a|a.oclAsType(AbstractAction).successor_AbstractAction.oclIsUndefined())"; |
| 372 | |
| 373 | /** |
| 374 | * The cached OCL invariant for the '{@link #EachActionExceptStartActionandStopActionMustHhaveAPredecessorAndSuccessor(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Each Action Except Start Actionand Stop Action Must Hhave APredecessor And Successor</em>}' invariant operation. |
| 375 | * <!-- begin-user-doc --> |
| 376 | * <!-- end-user-doc --> |
| 377 | * @see #EachActionExceptStartActionandStopActionMustHhaveAPredecessorAndSuccessor(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 378 | * @generated |
| 379 | * @ordered |
| 380 | */ |
| 381 | protected static Constraint EACH_ACTION_EXCEPT_START_ACTIONAND_STOP_ACTION_MUST_HHAVE_APREDECESSOR_AND_SUCCESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 382 | |
| 383 | /** |
| 384 | * <!-- begin-user-doc --> |
| 385 | * <!-- end-user-doc --> |
| 386 | * @generated |
| 387 | */ |
| 388 | public boolean EachActionExceptStartActionandStopActionMustHhaveAPredecessorAndSuccessor(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 389 | if (EACH_ACTION_EXCEPT_START_ACTIONAND_STOP_ACTION_MUST_HHAVE_APREDECESSOR_AND_SUCCESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 390 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 391 | helper.setContext(SeffPackage.Literals.RESOURCE_DEMANDING_BEHAVIOUR); |
| 392 | try { |
| 393 | EACH_ACTION_EXCEPT_START_ACTIONAND_STOP_ACTION_MUST_HHAVE_APREDECESSOR_AND_SUCCESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(EACH_ACTION_EXCEPT_START_ACTIONAND_STOP_ACTION_MUST_HHAVE_APREDECESSOR_AND_SUCCESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 394 | } |
| 395 | catch (ParserException pe) { |
| 396 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 397 | } |
| 398 | } |
| 399 | if (!EOCL_ENV.createQuery(EACH_ACTION_EXCEPT_START_ACTIONAND_STOP_ACTION_MUST_HHAVE_APREDECESSOR_AND_SUCCESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 400 | if (diagnostics != null) { |
| 401 | diagnostics.add |
| 402 | (new BasicDiagnostic |
| 403 | (Diagnostic.ERROR, |
| 404 | SeffValidator.DIAGNOSTIC_SOURCE, |
| 405 | SeffValidator.RESOURCE_DEMANDING_BEHAVIOUR__EACH_ACTION_EXCEPT_START_ACTIONAND_STOP_ACTION_MUST_HHAVE_APREDECESSOR_AND_SUCCESSOR, |
| 406 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "EachActionExceptStartActionandStopActionMustHhaveAPredecessorAndSuccessor", EObjectValidator.getObjectLabel(this, context) }), |
| 407 | new Object [] { this })); |
| 408 | } |
| 409 | return false; |
| 410 | } |
| 411 | return true; |
| 412 | } |
| 413 | |
| 414 | /** |
| 415 | * The cached OCL expression body for the '{@link #RecoveryActionBehaviourHasOnlyOnePredecessor(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Recovery Action Behaviour Has Only One Predecessor</em>}' operation. |
| 416 | * <!-- begin-user-doc --> |
| 417 | * <!-- end-user-doc --> |
| 418 | * @see #RecoveryActionBehaviourHasOnlyOnePredecessor(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 419 | * @generated |
| 420 | * @ordered |
| 421 | */ |
| 422 | protected static final String RECOVERY_ACTION_BEHAVIOUR_HAS_ONLY_ONE_PREDECESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "not self.recoveryAction__RecoveryActionBehaviour.recoveryActionBehaviours__RecoveryAction->\n"+" exists(x,y:RecoveryActionBehaviour | x<>y\n"+" and x.failureHandlingAlternatives__RecoveryActionBehaviour->includes(self)\n"+" and y.failureHandlingAlternatives__RecoveryActionBehaviour->includes(self))"; |
| 423 | |
| 424 | /** |
| 425 | * The cached OCL invariant for the '{@link #RecoveryActionBehaviourHasOnlyOnePredecessor(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Recovery Action Behaviour Has Only One Predecessor</em>}' invariant operation. |
| 426 | * <!-- begin-user-doc --> |
| 427 | * <!-- end-user-doc --> |
| 428 | * @see #RecoveryActionBehaviourHasOnlyOnePredecessor(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 429 | * @generated |
| 430 | * @ordered |
| 431 | */ |
| 432 | protected static Constraint RECOVERY_ACTION_BEHAVIOUR_HAS_ONLY_ONE_PREDECESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 433 | |
| 434 | /** |
| 435 | * <!-- begin-user-doc --> |
| 436 | * <!-- end-user-doc --> |
| 437 | * @generated |
| 438 | */ |
| 439 | public boolean RecoveryActionBehaviourHasOnlyOnePredecessor(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 440 | if (RECOVERY_ACTION_BEHAVIOUR_HAS_ONLY_ONE_PREDECESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 441 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 442 | helper.setContext(Seff_reliabilityPackage.Literals.RECOVERY_ACTION_BEHAVIOUR); |
| 443 | try { |
| 444 | RECOVERY_ACTION_BEHAVIOUR_HAS_ONLY_ONE_PREDECESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(RECOVERY_ACTION_BEHAVIOUR_HAS_ONLY_ONE_PREDECESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 445 | } |
| 446 | catch (ParserException pe) { |
| 447 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 448 | } |
| 449 | } |
| 450 | if (!EOCL_ENV.createQuery(RECOVERY_ACTION_BEHAVIOUR_HAS_ONLY_ONE_PREDECESSOR__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 451 | if (diagnostics != null) { |
| 452 | diagnostics.add |
| 453 | (new BasicDiagnostic |
| 454 | (Diagnostic.ERROR, |
| 455 | Seff_reliabilityValidator.DIAGNOSTIC_SOURCE, |
| 456 | Seff_reliabilityValidator.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_BEHAVIOUR_HAS_ONLY_ONE_PREDECESSOR, |
| 457 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "RecoveryActionBehaviourHasOnlyOnePredecessor", EObjectValidator.getObjectLabel(this, context) }), |
| 458 | new Object [] { this })); |
| 459 | } |
| 460 | return false; |
| 461 | } |
| 462 | return true; |
| 463 | } |
| 464 | |
| 465 | /** |
| 466 | * The cached OCL expression body for the '{@link #RecoveryActionBehaviourIsNotSuccessorOfItself(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Recovery Action Behaviour Is Not Successor Of Itself</em>}' operation. |
| 467 | * <!-- begin-user-doc --> |
| 468 | * <!-- end-user-doc --> |
| 469 | * @see #RecoveryActionBehaviourIsNotSuccessorOfItself(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 470 | * @generated |
| 471 | * @ordered |
| 472 | */ |
| 473 | protected static final String RECOVERY_ACTION_BEHAVIOUR_IS_NOT_SUCCESSOR_OF_ITSELF__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "not self.failureHandlingAlternatives__RecoveryActionBehaviour->includes(self)"; |
| 474 | |
| 475 | /** |
| 476 | * The cached OCL invariant for the '{@link #RecoveryActionBehaviourIsNotSuccessorOfItself(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Recovery Action Behaviour Is Not Successor Of Itself</em>}' invariant operation. |
| 477 | * <!-- begin-user-doc --> |
| 478 | * <!-- end-user-doc --> |
| 479 | * @see #RecoveryActionBehaviourIsNotSuccessorOfItself(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 480 | * @generated |
| 481 | * @ordered |
| 482 | */ |
| 483 | protected static Constraint RECOVERY_ACTION_BEHAVIOUR_IS_NOT_SUCCESSOR_OF_ITSELF__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 484 | |
| 485 | /** |
| 486 | * <!-- begin-user-doc --> |
| 487 | * <!-- end-user-doc --> |
| 488 | * @generated |
| 489 | */ |
| 490 | public boolean RecoveryActionBehaviourIsNotSuccessorOfItself(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 491 | if (RECOVERY_ACTION_BEHAVIOUR_IS_NOT_SUCCESSOR_OF_ITSELF__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 492 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 493 | helper.setContext(Seff_reliabilityPackage.Literals.RECOVERY_ACTION_BEHAVIOUR); |
| 494 | try { |
| 495 | RECOVERY_ACTION_BEHAVIOUR_IS_NOT_SUCCESSOR_OF_ITSELF__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(RECOVERY_ACTION_BEHAVIOUR_IS_NOT_SUCCESSOR_OF_ITSELF__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 496 | } |
| 497 | catch (ParserException pe) { |
| 498 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 499 | } |
| 500 | } |
| 501 | if (!EOCL_ENV.createQuery(RECOVERY_ACTION_BEHAVIOUR_IS_NOT_SUCCESSOR_OF_ITSELF__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 502 | if (diagnostics != null) { |
| 503 | diagnostics.add |
| 504 | (new BasicDiagnostic |
| 505 | (Diagnostic.ERROR, |
| 506 | Seff_reliabilityValidator.DIAGNOSTIC_SOURCE, |
| 507 | Seff_reliabilityValidator.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_BEHAVIOUR_IS_NOT_SUCCESSOR_OF_ITSELF, |
| 508 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "RecoveryActionBehaviourIsNotSuccessorOfItself", EObjectValidator.getObjectLabel(this, context) }), |
| 509 | new Object [] { this })); |
| 510 | } |
| 511 | return false; |
| 512 | } |
| 513 | return true; |
| 514 | } |
| 515 | |
| 516 | /** |
| 517 | * The cached OCL expression body for the '{@link #SuccessorsOfRecoveryActionBehaviourHandleDisjointFailureTypes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Successors Of Recovery Action Behaviour Handle Disjoint Failure Types</em>}' operation. |
| 518 | * <!-- begin-user-doc --> |
| 519 | * <!-- end-user-doc --> |
| 520 | * @see #SuccessorsOfRecoveryActionBehaviourHandleDisjointFailureTypes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 521 | * @generated |
| 522 | * @ordered |
| 523 | */ |
| 524 | protected static final String SUCCESSORS_OF_RECOVERY_ACTION_BEHAVIOUR_HANDLE_DISJOINT_FAILURE_TYPES__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "not self.failureHandlingAlternatives__RecoveryActionBehaviour->\n"+" exists(x,y:RecoveryActionBehaviour | x<>y and\n"+" x.failureTypes_FailureHandlingEntity->\n"+" exists(f:pcm::reliability::FailureType |\n"+" y.failureTypes_FailureHandlingEntity->includes(f)))"; |
| 525 | |
| 526 | /** |
| 527 | * The cached OCL invariant for the '{@link #SuccessorsOfRecoveryActionBehaviourHandleDisjointFailureTypes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Successors Of Recovery Action Behaviour Handle Disjoint Failure Types</em>}' invariant operation. |
| 528 | * <!-- begin-user-doc --> |
| 529 | * <!-- end-user-doc --> |
| 530 | * @see #SuccessorsOfRecoveryActionBehaviourHandleDisjointFailureTypes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 531 | * @generated |
| 532 | * @ordered |
| 533 | */ |
| 534 | protected static Constraint SUCCESSORS_OF_RECOVERY_ACTION_BEHAVIOUR_HANDLE_DISJOINT_FAILURE_TYPES__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 535 | |
| 536 | /** |
| 537 | * <!-- begin-user-doc --> |
| 538 | * <!-- end-user-doc --> |
| 539 | * @generated |
| 540 | */ |
| 541 | public boolean SuccessorsOfRecoveryActionBehaviourHandleDisjointFailureTypes(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 542 | if (SUCCESSORS_OF_RECOVERY_ACTION_BEHAVIOUR_HANDLE_DISJOINT_FAILURE_TYPES__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 543 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 544 | helper.setContext(Seff_reliabilityPackage.Literals.RECOVERY_ACTION_BEHAVIOUR); |
| 545 | try { |
| 546 | SUCCESSORS_OF_RECOVERY_ACTION_BEHAVIOUR_HANDLE_DISJOINT_FAILURE_TYPES__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(SUCCESSORS_OF_RECOVERY_ACTION_BEHAVIOUR_HANDLE_DISJOINT_FAILURE_TYPES__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 547 | } |
| 548 | catch (ParserException pe) { |
| 549 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 550 | } |
| 551 | } |
| 552 | if (!EOCL_ENV.createQuery(SUCCESSORS_OF_RECOVERY_ACTION_BEHAVIOUR_HANDLE_DISJOINT_FAILURE_TYPES__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 553 | if (diagnostics != null) { |
| 554 | diagnostics.add |
| 555 | (new BasicDiagnostic |
| 556 | (Diagnostic.ERROR, |
| 557 | Seff_reliabilityValidator.DIAGNOSTIC_SOURCE, |
| 558 | Seff_reliabilityValidator.RECOVERY_ACTION_BEHAVIOUR__SUCCESSORS_OF_RECOVERY_ACTION_BEHAVIOUR_HANDLE_DISJOINT_FAILURE_TYPES, |
| 559 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "SuccessorsOfRecoveryActionBehaviourHandleDisjointFailureTypes", EObjectValidator.getObjectLabel(this, context) }), |
| 560 | new Object [] { this })); |
| 561 | } |
| 562 | return false; |
| 563 | } |
| 564 | return true; |
| 565 | } |
| 566 | |
| 567 | /** |
| 568 | * <!-- begin-user-doc --> |
| 569 | * <!-- end-user-doc --> |
| 570 | * @generated |
| 571 | */ |
| 572 | @SuppressWarnings("unchecked") |
| 573 | @Override |
| 574 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 575 | switch (featureID) { |
| 576 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 577 | if (eInternalContainer() != null) |
| 578 | msgs = eBasicRemoveFromContainer(msgs); |
| 579 | return basicSetAbstractLoopAction_ResourceDemandingBehaviour((AbstractLoopAction)otherEnd, msgs); |
| 580 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 581 | if (eInternalContainer() != null) |
| 582 | msgs = eBasicRemoveFromContainer(msgs); |
| 583 | return basicSetAbstractBranchTransition_ResourceDemandingBehaviour((AbstractBranchTransition)otherEnd, msgs); |
| 584 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__STEPS_BEHAVIOUR: |
| 585 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getSteps_Behaviour()).basicAdd(otherEnd, msgs); |
| 586 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR: |
| 587 | if (eInternalContainer() != null) |
| 588 | msgs = eBasicRemoveFromContainer(msgs); |
| 589 | return basicSetRecoveryAction__RecoveryActionBehaviour((RecoveryAction)otherEnd, msgs); |
| 590 | } |
| 591 | return super.eInverseAdd(otherEnd, featureID, msgs); |
| 592 | } |
| 593 | |
| 594 | /** |
| 595 | * <!-- begin-user-doc --> |
| 596 | * <!-- end-user-doc --> |
| 597 | * @generated |
| 598 | */ |
| 599 | @Override |
| 600 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 601 | switch (featureID) { |
| 602 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 603 | return basicSetAbstractLoopAction_ResourceDemandingBehaviour(null, msgs); |
| 604 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 605 | return basicSetAbstractBranchTransition_ResourceDemandingBehaviour(null, msgs); |
| 606 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__STEPS_BEHAVIOUR: |
| 607 | return ((InternalEList<?>)getSteps_Behaviour()).basicRemove(otherEnd, msgs); |
| 608 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR: |
| 609 | return basicSetRecoveryAction__RecoveryActionBehaviour(null, msgs); |
| 610 | } |
| 611 | return super.eInverseRemove(otherEnd, featureID, msgs); |
| 612 | } |
| 613 | |
| 614 | /** |
| 615 | * <!-- begin-user-doc --> |
| 616 | * <!-- end-user-doc --> |
| 617 | * @generated |
| 618 | */ |
| 619 | @Override |
| 620 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { |
| 621 | switch (eContainerFeatureID()) { |
| 622 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 623 | return eInternalContainer().eInverseRemove(this, SeffPackage.ABSTRACT_LOOP_ACTION__BODY_BEHAVIOUR_LOOP, AbstractLoopAction.class, msgs); |
| 624 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 625 | return eInternalContainer().eInverseRemove(this, SeffPackage.ABSTRACT_BRANCH_TRANSITION__BRANCH_BEHAVIOUR_BRANCH_TRANSITION, AbstractBranchTransition.class, msgs); |
| 626 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR: |
| 627 | return eInternalContainer().eInverseRemove(this, Seff_reliabilityPackage.RECOVERY_ACTION__RECOVERY_ACTION_BEHAVIOURS_RECOVERY_ACTION, RecoveryAction.class, msgs); |
| 628 | } |
| 629 | return super.eBasicRemoveFromContainerFeature(msgs); |
| 630 | } |
| 631 | |
| 632 | /** |
| 633 | * <!-- begin-user-doc --> |
| 634 | * <!-- end-user-doc --> |
| 635 | * @generated |
| 636 | */ |
| 637 | @Override |
| 638 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| 639 | switch (featureID) { |
| 640 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 641 | return getAbstractLoopAction_ResourceDemandingBehaviour(); |
| 642 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 643 | return getAbstractBranchTransition_ResourceDemandingBehaviour(); |
| 644 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__STEPS_BEHAVIOUR: |
| 645 | return getSteps_Behaviour(); |
| 646 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__FAILURE_HANDLING_ALTERNATIVES_RECOVERY_ACTION_BEHAVIOUR: |
| 647 | return getFailureHandlingAlternatives__RecoveryActionBehaviour(); |
| 648 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR: |
| 649 | return getRecoveryAction__RecoveryActionBehaviour(); |
| 650 | } |
| 651 | return super.eGet(featureID, resolve, coreType); |
| 652 | } |
| 653 | |
| 654 | /** |
| 655 | * <!-- begin-user-doc --> |
| 656 | * <!-- end-user-doc --> |
| 657 | * @generated |
| 658 | */ |
| 659 | @SuppressWarnings("unchecked") |
| 660 | @Override |
| 661 | public void eSet(int featureID, Object newValue) { |
| 662 | switch (featureID) { |
| 663 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 664 | setAbstractLoopAction_ResourceDemandingBehaviour((AbstractLoopAction)newValue); |
| 665 | return; |
| 666 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 667 | setAbstractBranchTransition_ResourceDemandingBehaviour((AbstractBranchTransition)newValue); |
| 668 | return; |
| 669 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__STEPS_BEHAVIOUR: |
| 670 | getSteps_Behaviour().clear(); |
| 671 | getSteps_Behaviour().addAll((Collection<? extends AbstractAction>)newValue); |
| 672 | return; |
| 673 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__FAILURE_HANDLING_ALTERNATIVES_RECOVERY_ACTION_BEHAVIOUR: |
| 674 | getFailureHandlingAlternatives__RecoveryActionBehaviour().clear(); |
| 675 | getFailureHandlingAlternatives__RecoveryActionBehaviour().addAll((Collection<? extends RecoveryActionBehaviour>)newValue); |
| 676 | return; |
| 677 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR: |
| 678 | setRecoveryAction__RecoveryActionBehaviour((RecoveryAction)newValue); |
| 679 | return; |
| 680 | } |
| 681 | super.eSet(featureID, newValue); |
| 682 | } |
| 683 | |
| 684 | /** |
| 685 | * <!-- begin-user-doc --> |
| 686 | * <!-- end-user-doc --> |
| 687 | * @generated |
| 688 | */ |
| 689 | @Override |
| 690 | public void eUnset(int featureID) { |
| 691 | switch (featureID) { |
| 692 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 693 | setAbstractLoopAction_ResourceDemandingBehaviour((AbstractLoopAction)null); |
| 694 | return; |
| 695 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 696 | setAbstractBranchTransition_ResourceDemandingBehaviour((AbstractBranchTransition)null); |
| 697 | return; |
| 698 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__STEPS_BEHAVIOUR: |
| 699 | getSteps_Behaviour().clear(); |
| 700 | return; |
| 701 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__FAILURE_HANDLING_ALTERNATIVES_RECOVERY_ACTION_BEHAVIOUR: |
| 702 | getFailureHandlingAlternatives__RecoveryActionBehaviour().clear(); |
| 703 | return; |
| 704 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR: |
| 705 | setRecoveryAction__RecoveryActionBehaviour((RecoveryAction)null); |
| 706 | return; |
| 707 | } |
| 708 | super.eUnset(featureID); |
| 709 | } |
| 710 | |
| 711 | /** |
| 712 | * <!-- begin-user-doc --> |
| 713 | * <!-- end-user-doc --> |
| 714 | * @generated |
| 715 | */ |
| 716 | @Override |
| 717 | public boolean eIsSet(int featureID) { |
| 718 | switch (featureID) { |
| 719 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 720 | return getAbstractLoopAction_ResourceDemandingBehaviour() != null; |
| 721 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR: |
| 722 | return getAbstractBranchTransition_ResourceDemandingBehaviour() != null; |
| 723 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__STEPS_BEHAVIOUR: |
| 724 | return steps_Behaviour != null && !steps_Behaviour.isEmpty(); |
| 725 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__FAILURE_HANDLING_ALTERNATIVES_RECOVERY_ACTION_BEHAVIOUR: |
| 726 | return failureHandlingAlternatives__RecoveryActionBehaviour != null && !failureHandlingAlternatives__RecoveryActionBehaviour.isEmpty(); |
| 727 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__RECOVERY_ACTION_RECOVERY_ACTION_BEHAVIOUR: |
| 728 | return getRecoveryAction__RecoveryActionBehaviour() != null; |
| 729 | } |
| 730 | return super.eIsSet(featureID); |
| 731 | } |
| 732 | |
| 733 | /** |
| 734 | * <!-- begin-user-doc --> |
| 735 | * <!-- end-user-doc --> |
| 736 | * @generated |
| 737 | */ |
| 738 | @Override |
| 739 | public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { |
| 740 | if (baseClass == ResourceDemandingBehaviour.class) { |
| 741 | switch (derivedFeatureID) { |
| 742 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR: return SeffPackage.RESOURCE_DEMANDING_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR; |
| 743 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR: return SeffPackage.RESOURCE_DEMANDING_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR; |
| 744 | case Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__STEPS_BEHAVIOUR: return SeffPackage.RESOURCE_DEMANDING_BEHAVIOUR__STEPS_BEHAVIOUR; |
| 745 | default: return -1; |
| 746 | } |
| 747 | } |
| 748 | return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); |
| 749 | } |
| 750 | |
| 751 | /** |
| 752 | * <!-- begin-user-doc --> |
| 753 | * <!-- end-user-doc --> |
| 754 | * @generated |
| 755 | */ |
| 756 | @Override |
| 757 | public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { |
| 758 | if (baseClass == ResourceDemandingBehaviour.class) { |
| 759 | switch (baseFeatureID) { |
| 760 | case SeffPackage.RESOURCE_DEMANDING_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR: return Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_LOOP_ACTION_RESOURCE_DEMANDING_BEHAVIOUR; |
| 761 | case SeffPackage.RESOURCE_DEMANDING_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR: return Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__ABSTRACT_BRANCH_TRANSITION_RESOURCE_DEMANDING_BEHAVIOUR; |
| 762 | case SeffPackage.RESOURCE_DEMANDING_BEHAVIOUR__STEPS_BEHAVIOUR: return Seff_reliabilityPackage.RECOVERY_ACTION_BEHAVIOUR__STEPS_BEHAVIOUR; |
| 763 | default: return -1; |
| 764 | } |
| 765 | } |
| 766 | return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); |
| 767 | } |
| 768 | |
| 769 | /** |
| 770 | * The cached environment for evaluating OCL expressions. |
| 771 | * <!-- begin-user-doc --> |
| 772 | * <!-- end-user-doc --> |
| 773 | * @generated |
| 774 | * @ordered |
| 775 | */ |
| 776 | protected static final OCL EOCL_ENV = OCL.newInstance(); |
| 777 | |
| 778 | } //RecoveryActionBehaviourImpl |