| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.impl; |
| 8 | |
| 9 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.Criterion; |
| 10 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.EvaluationAspect; |
| 11 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.QMLContractPackage; |
| 12 | |
| 13 | import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.util.QMLContractValidator; |
| 14 | |
| 15 | import de.uka.ipd.sdq.dsexplore.qml.contracttype.QMLContractType.Dimension; |
| 16 | |
| 17 | import de.uka.ipd.sdq.identifier.impl.IdentifierImpl; |
| 18 | |
| 19 | import java.util.Collection; |
| 20 | import java.util.Map; |
| 21 | |
| 22 | import org.eclipse.emf.common.notify.Notification; |
| 23 | import org.eclipse.emf.common.notify.NotificationChain; |
| 24 | |
| 25 | import org.eclipse.emf.common.util.BasicDiagnostic; |
| 26 | import org.eclipse.emf.common.util.Diagnostic; |
| 27 | import org.eclipse.emf.common.util.DiagnosticChain; |
| 28 | import org.eclipse.emf.common.util.EList; |
| 29 | |
| 30 | import org.eclipse.emf.ecore.EClass; |
| 31 | import org.eclipse.emf.ecore.InternalEObject; |
| 32 | |
| 33 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| 34 | |
| 35 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| 36 | |
| 37 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| 38 | import org.eclipse.emf.ecore.util.EObjectValidator; |
| 39 | import org.eclipse.emf.ecore.util.InternalEList; |
| 40 | |
| 41 | import org.eclipse.ocl.ParserException; |
| 42 | |
| 43 | import org.eclipse.ocl.ecore.Constraint; |
| 44 | import org.eclipse.ocl.ecore.OCL; |
| 45 | |
| 46 | /** |
| 47 | * <!-- begin-user-doc --> |
| 48 | * An implementation of the model object '<em><b>Criterion</b></em>'. |
| 49 | * <!-- end-user-doc --> |
| 50 | * <p> |
| 51 | * The following features are implemented: |
| 52 | * <ul> |
| 53 | * <li>{@link de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.impl.CriterionImpl#getDimension <em>Dimension</em>}</li> |
| 54 | * <li>{@link de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.impl.CriterionImpl#getAspects <em>Aspects</em>}</li> |
| 55 | * </ul> |
| 56 | * </p> |
| 57 | * |
| 58 | * @generated |
| 59 | */ |
| 60 | public abstract class CriterionImpl extends IdentifierImpl implements Criterion { |
| 61 | /** |
| 62 | * The cached value of the '{@link #getDimension() <em>Dimension</em>}' reference. |
| 63 | * <!-- begin-user-doc --> |
| 64 | * <!-- end-user-doc --> |
| 65 | * @see #getDimension() |
| 66 | * @generated |
| 67 | * @ordered |
| 68 | */ |
| 69 | protected Dimension dimension; |
| 70 | |
| 71 | /** |
| 72 | * The cached value of the '{@link #getAspects() <em>Aspects</em>}' containment reference list. |
| 73 | * <!-- begin-user-doc --> |
| 74 | * <!-- end-user-doc --> |
| 75 | * @see #getAspects() |
| 76 | * @generated |
| 77 | * @ordered |
| 78 | */ |
| 79 | protected EList<EvaluationAspect> aspects; |
| 80 | |
| 81 | /** |
| 82 | * <!-- begin-user-doc --> |
| 83 | * <!-- end-user-doc --> |
| 84 | * @generated |
| 85 | */ |
| 86 | protected CriterionImpl() { |
| 87 | super(); |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * <!-- begin-user-doc --> |
| 92 | * <!-- end-user-doc --> |
| 93 | * @generated |
| 94 | */ |
| 95 | @Override |
| 96 | protected EClass eStaticClass() { |
| 97 | return QMLContractPackage.Literals.CRITERION; |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * <!-- begin-user-doc --> |
| 102 | * <!-- end-user-doc --> |
| 103 | * @generated |
| 104 | */ |
| 105 | public Dimension getDimension() { |
| 106 | if (dimension != null && dimension.eIsProxy()) { |
| 107 | InternalEObject oldDimension = (InternalEObject)dimension; |
| 108 | dimension = (Dimension)eResolveProxy(oldDimension); |
| 109 | if (dimension != oldDimension) { |
| 110 | if (eNotificationRequired()) |
| 111 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, QMLContractPackage.CRITERION__DIMENSION, oldDimension, dimension)); |
| 112 | } |
| 113 | } |
| 114 | return dimension; |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * <!-- begin-user-doc --> |
| 119 | * <!-- end-user-doc --> |
| 120 | * @generated |
| 121 | */ |
| 122 | public Dimension basicGetDimension() { |
| 123 | return dimension; |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * <!-- begin-user-doc --> |
| 128 | * <!-- end-user-doc --> |
| 129 | * @generated |
| 130 | */ |
| 131 | public void setDimension(Dimension newDimension) { |
| 132 | Dimension oldDimension = dimension; |
| 133 | dimension = newDimension; |
| 134 | if (eNotificationRequired()) |
| 135 | eNotify(new ENotificationImpl(this, Notification.SET, QMLContractPackage.CRITERION__DIMENSION, oldDimension, dimension)); |
| 136 | } |
| 137 | |
| 138 | /** |
| 139 | * <!-- begin-user-doc --> |
| 140 | * <!-- end-user-doc --> |
| 141 | * @generated |
| 142 | */ |
| 143 | public EList<EvaluationAspect> getAspects() { |
| 144 | if (aspects == null) { |
| 145 | aspects = new EObjectContainmentEList<EvaluationAspect>(EvaluationAspect.class, this, QMLContractPackage.CRITERION__ASPECTS); |
| 146 | } |
| 147 | return aspects; |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * The cached OCL expression body for the '{@link #Only_CONSTRAINTS_have_RESTRICTIONS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Only CONSTRAINTS have RESTRICTIONS</em>}' operation. |
| 152 | * <!-- begin-user-doc --> |
| 153 | * <!-- end-user-doc --> |
| 154 | * @see #Only_CONSTRAINTS_have_RESTRICTIONS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 155 | * @generated |
| 156 | * @ordered |
| 157 | */ |
| 158 | protected static final String ONLY_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "self.aspects->exists(a|a.aspectRequirement <> null and a.aspectRequirement.oclIsTypeOf(QMLContract::Restriction)) implies ("+ |
| 159 | " self.oclIsTypeOf(QMLContract::Constraint)"+ |
| 160 | ")"; |
| 161 | |
| 162 | /** |
| 163 | * The cached OCL invariant for the '{@link #Only_CONSTRAINTS_have_RESTRICTIONS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Only CONSTRAINTS have RESTRICTIONS</em>}' invariant operation. |
| 164 | * <!-- begin-user-doc --> |
| 165 | * <!-- end-user-doc --> |
| 166 | * @see #Only_CONSTRAINTS_have_RESTRICTIONS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 167 | * @generated |
| 168 | * @ordered |
| 169 | */ |
| 170 | protected static Constraint ONLY_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 171 | |
| 172 | /** |
| 173 | * <!-- begin-user-doc --> |
| 174 | * <!-- end-user-doc --> |
| 175 | * @generated |
| 176 | */ |
| 177 | public boolean Only_CONSTRAINTS_have_RESTRICTIONS(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 178 | if (ONLY_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 179 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 180 | helper.setContext(QMLContractPackage.Literals.CRITERION); |
| 181 | try { |
| 182 | ONLY_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(ONLY_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 183 | } |
| 184 | catch (ParserException pe) { |
| 185 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 186 | } |
| 187 | } |
| 188 | if (!EOCL_ENV.createQuery(ONLY_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 189 | if (diagnostics != null) { |
| 190 | diagnostics.add |
| 191 | (new BasicDiagnostic |
| 192 | (Diagnostic.ERROR, |
| 193 | QMLContractValidator.DIAGNOSTIC_SOURCE, |
| 194 | QMLContractValidator.CRITERION__ONLY_CONSTRAINTS_HAVE_RESTRICTIONS, |
| 195 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "Only_CONSTRAINTS_have_RESTRICTIONS", EObjectValidator.getObjectLabel(this, context) }), |
| 196 | new Object [] { this })); |
| 197 | } |
| 198 | return false; |
| 199 | } |
| 200 | return true; |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * The cached OCL expression body for the '{@link #FREQUENCY_only_possible_if_DIMENSION_is_ordered(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>FREQUENCY only possible if DIMENSION is ordered</em>}' operation. |
| 205 | * <!-- begin-user-doc --> |
| 206 | * <!-- end-user-doc --> |
| 207 | * @see #FREQUENCY_only_possible_if_DIMENSION_is_ordered(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 208 | * @generated |
| 209 | * @ordered |
| 210 | */ |
| 211 | protected static final String FREQUENCY_ONLY_POSSIBLE_IF_DIMENSION_IS_ORDERED__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "self.aspects->forAll(aspect|"+ |
| 212 | " aspect.oclIsTypeOf(QMLContract::Frequency) implies ("+ |
| 213 | " self.dimension.type.oclIsTypeOf(QMLContractType::DimensionTypeNumeric) or"+ |
| 214 | " (self.dimension.type.oclIsTypeOf(QMLContractType::DimensionTypeEnum) and self.dimension.type.oclAsType(QMLContractType::DimensionTypeEnum).order->size()>0 ) or "+ |
| 215 | " (self.dimension.type.oclIsTypeOf(QMLContractType::DimensionTypeSet) and self.dimension.type.oclAsType(QMLContractType::DimensionTypeSet).order->size()>0 )"+ |
| 216 | " )"+ |
| 217 | ")"; |
| 218 | |
| 219 | /** |
| 220 | * The cached OCL invariant for the '{@link #FREQUENCY_only_possible_if_DIMENSION_is_ordered(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>FREQUENCY only possible if DIMENSION is ordered</em>}' invariant operation. |
| 221 | * <!-- begin-user-doc --> |
| 222 | * <!-- end-user-doc --> |
| 223 | * @see #FREQUENCY_only_possible_if_DIMENSION_is_ordered(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 224 | * @generated |
| 225 | * @ordered |
| 226 | */ |
| 227 | protected static Constraint FREQUENCY_ONLY_POSSIBLE_IF_DIMENSION_IS_ORDERED__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 228 | |
| 229 | /** |
| 230 | * <!-- begin-user-doc --> |
| 231 | * <!-- end-user-doc --> |
| 232 | * @generated |
| 233 | */ |
| 234 | public boolean FREQUENCY_only_possible_if_DIMENSION_is_ordered(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 235 | if (FREQUENCY_ONLY_POSSIBLE_IF_DIMENSION_IS_ORDERED__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 236 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 237 | helper.setContext(QMLContractPackage.Literals.CRITERION); |
| 238 | try { |
| 239 | FREQUENCY_ONLY_POSSIBLE_IF_DIMENSION_IS_ORDERED__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(FREQUENCY_ONLY_POSSIBLE_IF_DIMENSION_IS_ORDERED__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 240 | } |
| 241 | catch (ParserException pe) { |
| 242 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 243 | } |
| 244 | } |
| 245 | if (!EOCL_ENV.createQuery(FREQUENCY_ONLY_POSSIBLE_IF_DIMENSION_IS_ORDERED__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 246 | if (diagnostics != null) { |
| 247 | diagnostics.add |
| 248 | (new BasicDiagnostic |
| 249 | (Diagnostic.ERROR, |
| 250 | QMLContractValidator.DIAGNOSTIC_SOURCE, |
| 251 | QMLContractValidator.CRITERION__FREQUENCY_ONLY_POSSIBLE_IF_DIMENSION_IS_ORDERED, |
| 252 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "FREQUENCY_only_possible_if_DIMENSION_is_ordered", EObjectValidator.getObjectLabel(this, context) }), |
| 253 | new Object [] { this })); |
| 254 | } |
| 255 | return false; |
| 256 | } |
| 257 | return true; |
| 258 | } |
| 259 | |
| 260 | /** |
| 261 | * The cached OCL expression body for the '{@link #POINTESTIMATOR_only_for_numeric_dimensions(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>POINTESTIMATOR only for numeric dimensions</em>}' operation. |
| 262 | * <!-- begin-user-doc --> |
| 263 | * <!-- end-user-doc --> |
| 264 | * @see #POINTESTIMATOR_only_for_numeric_dimensions(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 265 | * @generated |
| 266 | * @ordered |
| 267 | */ |
| 268 | protected static final String POINTESTIMATOR_ONLY_FOR_NUMERIC_DIMENSIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "self.aspects->forAll(aspect|"+ |
| 269 | " aspect.oclIsTypeOf(QMLContract::PointEstimator) implies ("+ |
| 270 | " self.dimension.type.oclIsTypeOf(QMLContractType::DimensionTypeNumeric)"+ |
| 271 | " )"+ |
| 272 | ")"; |
| 273 | |
| 274 | /** |
| 275 | * The cached OCL invariant for the '{@link #POINTESTIMATOR_only_for_numeric_dimensions(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>POINTESTIMATOR only for numeric dimensions</em>}' invariant operation. |
| 276 | * <!-- begin-user-doc --> |
| 277 | * <!-- end-user-doc --> |
| 278 | * @see #POINTESTIMATOR_only_for_numeric_dimensions(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 279 | * @generated |
| 280 | * @ordered |
| 281 | */ |
| 282 | protected static Constraint POINTESTIMATOR_ONLY_FOR_NUMERIC_DIMENSIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 283 | |
| 284 | /** |
| 285 | * <!-- begin-user-doc --> |
| 286 | * <!-- end-user-doc --> |
| 287 | * @generated |
| 288 | */ |
| 289 | public boolean POINTESTIMATOR_only_for_numeric_dimensions(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 290 | if (POINTESTIMATOR_ONLY_FOR_NUMERIC_DIMENSIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 291 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 292 | helper.setContext(QMLContractPackage.Literals.CRITERION); |
| 293 | try { |
| 294 | POINTESTIMATOR_ONLY_FOR_NUMERIC_DIMENSIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(POINTESTIMATOR_ONLY_FOR_NUMERIC_DIMENSIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 295 | } |
| 296 | catch (ParserException pe) { |
| 297 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 298 | } |
| 299 | } |
| 300 | if (!EOCL_ENV.createQuery(POINTESTIMATOR_ONLY_FOR_NUMERIC_DIMENSIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 301 | if (diagnostics != null) { |
| 302 | diagnostics.add |
| 303 | (new BasicDiagnostic |
| 304 | (Diagnostic.ERROR, |
| 305 | QMLContractValidator.DIAGNOSTIC_SOURCE, |
| 306 | QMLContractValidator.CRITERION__POINTESTIMATOR_ONLY_FOR_NUMERIC_DIMENSIONS, |
| 307 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "POINTESTIMATOR_only_for_numeric_dimensions", EObjectValidator.getObjectLabel(this, context) }), |
| 308 | new Object [] { this })); |
| 309 | } |
| 310 | return false; |
| 311 | } |
| 312 | return true; |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * The cached OCL expression body for the '{@link #Only_OBJECTIVES_have_GOALS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Only OBJECTIVES have GOALS</em>}' operation. |
| 317 | * <!-- begin-user-doc --> |
| 318 | * <!-- end-user-doc --> |
| 319 | * @see #Only_OBJECTIVES_have_GOALS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 320 | * @generated |
| 321 | * @ordered |
| 322 | */ |
| 323 | protected static final String ONLY_OBJECTIVES_HAVE_GOALS__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "self.aspects->exists(a|a.aspectRequirement <> null and a.aspectRequirement.oclIsTypeOf(QMLContract::Goal)) implies ("+ |
| 324 | " self.oclIsTypeOf(QMLContract::Objective)"+ |
| 325 | ")"; |
| 326 | |
| 327 | /** |
| 328 | * The cached OCL invariant for the '{@link #Only_OBJECTIVES_have_GOALS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Only OBJECTIVES have GOALS</em>}' invariant operation. |
| 329 | * <!-- begin-user-doc --> |
| 330 | * <!-- end-user-doc --> |
| 331 | * @see #Only_OBJECTIVES_have_GOALS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) |
| 332 | * @generated |
| 333 | * @ordered |
| 334 | */ |
| 335 | protected static Constraint ONLY_OBJECTIVES_HAVE_GOALS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV; |
| 336 | |
| 337 | /** |
| 338 | * <!-- begin-user-doc --> |
| 339 | * <!-- end-user-doc --> |
| 340 | * @generated |
| 341 | */ |
| 342 | public boolean Only_OBJECTIVES_have_GOALS(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 343 | if (ONLY_OBJECTIVES_HAVE_GOALS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { |
| 344 | OCL.Helper helper = EOCL_ENV.createOCLHelper(); |
| 345 | helper.setContext(QMLContractPackage.Literals.CRITERION); |
| 346 | try { |
| 347 | ONLY_OBJECTIVES_HAVE_GOALS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(ONLY_OBJECTIVES_HAVE_GOALS__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP); |
| 348 | } |
| 349 | catch (ParserException pe) { |
| 350 | throw new UnsupportedOperationException(pe.getLocalizedMessage()); |
| 351 | } |
| 352 | } |
| 353 | if (!EOCL_ENV.createQuery(ONLY_OBJECTIVES_HAVE_GOALS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) { |
| 354 | if (diagnostics != null) { |
| 355 | diagnostics.add |
| 356 | (new BasicDiagnostic |
| 357 | (Diagnostic.ERROR, |
| 358 | QMLContractValidator.DIAGNOSTIC_SOURCE, |
| 359 | QMLContractValidator.CRITERION__ONLY_OBJECTIVES_HAVE_GOALS, |
| 360 | EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "Only_OBJECTIVES_have_GOALS", EObjectValidator.getObjectLabel(this, context) }), |
| 361 | new Object [] { this })); |
| 362 | } |
| 363 | return false; |
| 364 | } |
| 365 | return true; |
| 366 | } |
| 367 | |
| 368 | /** |
| 369 | * <!-- begin-user-doc --> |
| 370 | * <!-- end-user-doc --> |
| 371 | * @generated |
| 372 | */ |
| 373 | @Override |
| 374 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 375 | switch (featureID) { |
| 376 | case QMLContractPackage.CRITERION__ASPECTS: |
| 377 | return ((InternalEList<?>)getAspects()).basicRemove(otherEnd, msgs); |
| 378 | } |
| 379 | return super.eInverseRemove(otherEnd, featureID, msgs); |
| 380 | } |
| 381 | |
| 382 | /** |
| 383 | * <!-- begin-user-doc --> |
| 384 | * <!-- end-user-doc --> |
| 385 | * @generated |
| 386 | */ |
| 387 | @Override |
| 388 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| 389 | switch (featureID) { |
| 390 | case QMLContractPackage.CRITERION__DIMENSION: |
| 391 | if (resolve) return getDimension(); |
| 392 | return basicGetDimension(); |
| 393 | case QMLContractPackage.CRITERION__ASPECTS: |
| 394 | return getAspects(); |
| 395 | } |
| 396 | return super.eGet(featureID, resolve, coreType); |
| 397 | } |
| 398 | |
| 399 | /** |
| 400 | * <!-- begin-user-doc --> |
| 401 | * <!-- end-user-doc --> |
| 402 | * @generated |
| 403 | */ |
| 404 | @SuppressWarnings("unchecked") |
| 405 | @Override |
| 406 | public void eSet(int featureID, Object newValue) { |
| 407 | switch (featureID) { |
| 408 | case QMLContractPackage.CRITERION__DIMENSION: |
| 409 | setDimension((Dimension)newValue); |
| 410 | return; |
| 411 | case QMLContractPackage.CRITERION__ASPECTS: |
| 412 | getAspects().clear(); |
| 413 | getAspects().addAll((Collection<? extends EvaluationAspect>)newValue); |
| 414 | return; |
| 415 | } |
| 416 | super.eSet(featureID, newValue); |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * <!-- begin-user-doc --> |
| 421 | * <!-- end-user-doc --> |
| 422 | * @generated |
| 423 | */ |
| 424 | @Override |
| 425 | public void eUnset(int featureID) { |
| 426 | switch (featureID) { |
| 427 | case QMLContractPackage.CRITERION__DIMENSION: |
| 428 | setDimension((Dimension)null); |
| 429 | return; |
| 430 | case QMLContractPackage.CRITERION__ASPECTS: |
| 431 | getAspects().clear(); |
| 432 | return; |
| 433 | } |
| 434 | super.eUnset(featureID); |
| 435 | } |
| 436 | |
| 437 | /** |
| 438 | * <!-- begin-user-doc --> |
| 439 | * <!-- end-user-doc --> |
| 440 | * @generated |
| 441 | */ |
| 442 | @Override |
| 443 | public boolean eIsSet(int featureID) { |
| 444 | switch (featureID) { |
| 445 | case QMLContractPackage.CRITERION__DIMENSION: |
| 446 | return dimension != null; |
| 447 | case QMLContractPackage.CRITERION__ASPECTS: |
| 448 | return aspects != null && !aspects.isEmpty(); |
| 449 | } |
| 450 | return super.eIsSet(featureID); |
| 451 | } |
| 452 | |
| 453 | /** |
| 454 | * The cached environment for evaluating OCL expressions. |
| 455 | * <!-- begin-user-doc --> |
| 456 | * <!-- end-user-doc --> |
| 457 | * @generated |
| 458 | * @ordered |
| 459 | */ |
| 460 | protected static final OCL EOCL_ENV = OCL.newInstance(); |
| 461 | |
| 462 | } //CriterionImpl |