| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package LqnCore.impl; |
| 8 | |
| 9 | import LqnCore.LqnCorePackage; |
| 10 | import LqnCore.LqnModelType; |
| 11 | import LqnCore.PlotControlType; |
| 12 | import LqnCore.ProcessorType; |
| 13 | import LqnCore.RunControlType; |
| 14 | import LqnCore.SlotType; |
| 15 | import LqnCore.SolverParamsType; |
| 16 | import LqnCore.XmlDebugType; |
| 17 | |
| 18 | import java.math.BigDecimal; |
| 19 | |
| 20 | import java.util.Collection; |
| 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.EList; |
| 26 | |
| 27 | import org.eclipse.emf.ecore.EClass; |
| 28 | import org.eclipse.emf.ecore.InternalEObject; |
| 29 | |
| 30 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| 31 | import org.eclipse.emf.ecore.impl.EObjectImpl; |
| 32 | |
| 33 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| 34 | import org.eclipse.emf.ecore.util.InternalEList; |
| 35 | |
| 36 | /** |
| 37 | * <!-- begin-user-doc --> |
| 38 | * An implementation of the model object '<em><b>Lqn Model Type</b></em>'. |
| 39 | * <!-- end-user-doc --> |
| 40 | * <p> |
| 41 | * The following features are implemented: |
| 42 | * <ul> |
| 43 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getRunControl <em>Run Control</em>}</li> |
| 44 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getPlotControl <em>Plot Control</em>}</li> |
| 45 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getSolverParams <em>Solver Params</em>}</li> |
| 46 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getProcessor <em>Processor</em>}</li> |
| 47 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getSlot <em>Slot</em>}</li> |
| 48 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getDescription <em>Description</em>}</li> |
| 49 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getLqncoreSchemaVersion <em>Lqncore Schema Version</em>}</li> |
| 50 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getLqnSchemaVersion <em>Lqn Schema Version</em>}</li> |
| 51 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getName <em>Name</em>}</li> |
| 52 | * <li>{@link LqnCore.impl.LqnModelTypeImpl#getXmlDebug <em>Xml Debug</em>}</li> |
| 53 | * </ul> |
| 54 | * </p> |
| 55 | * |
| 56 | * @generated |
| 57 | */ |
| 58 | public class LqnModelTypeImpl extends EObjectImpl implements LqnModelType { |
| 59 | /** |
| 60 | * The cached value of the '{@link #getRunControl() <em>Run Control</em>}' containment reference. |
| 61 | * <!-- begin-user-doc --> |
| 62 | * <!-- end-user-doc --> |
| 63 | * @see #getRunControl() |
| 64 | * @generated |
| 65 | * @ordered |
| 66 | */ |
| 67 | protected RunControlType runControl; |
| 68 | |
| 69 | /** |
| 70 | * The cached value of the '{@link #getPlotControl() <em>Plot Control</em>}' containment reference. |
| 71 | * <!-- begin-user-doc --> |
| 72 | * <!-- end-user-doc --> |
| 73 | * @see #getPlotControl() |
| 74 | * @generated |
| 75 | * @ordered |
| 76 | */ |
| 77 | protected PlotControlType plotControl; |
| 78 | |
| 79 | /** |
| 80 | * The cached value of the '{@link #getSolverParams() <em>Solver Params</em>}' containment reference. |
| 81 | * <!-- begin-user-doc --> |
| 82 | * <!-- end-user-doc --> |
| 83 | * @see #getSolverParams() |
| 84 | * @generated |
| 85 | * @ordered |
| 86 | */ |
| 87 | protected SolverParamsType solverParams; |
| 88 | |
| 89 | /** |
| 90 | * The cached value of the '{@link #getProcessor() <em>Processor</em>}' containment reference list. |
| 91 | * <!-- begin-user-doc --> |
| 92 | * <!-- end-user-doc --> |
| 93 | * @see #getProcessor() |
| 94 | * @generated |
| 95 | * @ordered |
| 96 | */ |
| 97 | protected EList<ProcessorType> processor; |
| 98 | |
| 99 | /** |
| 100 | * The cached value of the '{@link #getSlot() <em>Slot</em>}' containment reference list. |
| 101 | * <!-- begin-user-doc --> |
| 102 | * <!-- end-user-doc --> |
| 103 | * @see #getSlot() |
| 104 | * @generated |
| 105 | * @ordered |
| 106 | */ |
| 107 | protected EList<SlotType> slot; |
| 108 | |
| 109 | /** |
| 110 | * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. |
| 111 | * <!-- begin-user-doc --> |
| 112 | * <!-- end-user-doc --> |
| 113 | * @see #getDescription() |
| 114 | * @generated |
| 115 | * @ordered |
| 116 | */ |
| 117 | protected static final String DESCRIPTION_EDEFAULT = null; |
| 118 | |
| 119 | /** |
| 120 | * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. |
| 121 | * <!-- begin-user-doc --> |
| 122 | * <!-- end-user-doc --> |
| 123 | * @see #getDescription() |
| 124 | * @generated |
| 125 | * @ordered |
| 126 | */ |
| 127 | protected String description = DESCRIPTION_EDEFAULT; |
| 128 | |
| 129 | /** |
| 130 | * The default value of the '{@link #getLqncoreSchemaVersion() <em>Lqncore Schema Version</em>}' attribute. |
| 131 | * <!-- begin-user-doc --> |
| 132 | * <!-- end-user-doc --> |
| 133 | * @see #getLqncoreSchemaVersion() |
| 134 | * @generated |
| 135 | * @ordered |
| 136 | */ |
| 137 | protected static final BigDecimal LQNCORE_SCHEMA_VERSION_EDEFAULT = new BigDecimal("1.0"); |
| 138 | |
| 139 | /** |
| 140 | * The cached value of the '{@link #getLqncoreSchemaVersion() <em>Lqncore Schema Version</em>}' attribute. |
| 141 | * <!-- begin-user-doc --> |
| 142 | * <!-- end-user-doc --> |
| 143 | * @see #getLqncoreSchemaVersion() |
| 144 | * @generated |
| 145 | * @ordered |
| 146 | */ |
| 147 | protected BigDecimal lqncoreSchemaVersion = LQNCORE_SCHEMA_VERSION_EDEFAULT; |
| 148 | |
| 149 | /** |
| 150 | * This is true if the Lqncore Schema Version attribute has been set. |
| 151 | * <!-- begin-user-doc --> |
| 152 | * <!-- end-user-doc --> |
| 153 | * @generated |
| 154 | * @ordered |
| 155 | */ |
| 156 | protected boolean lqncoreSchemaVersionESet; |
| 157 | |
| 158 | /** |
| 159 | * The default value of the '{@link #getLqnSchemaVersion() <em>Lqn Schema Version</em>}' attribute. |
| 160 | * <!-- begin-user-doc --> |
| 161 | * <!-- end-user-doc --> |
| 162 | * @see #getLqnSchemaVersion() |
| 163 | * @generated |
| 164 | * @ordered |
| 165 | */ |
| 166 | protected static final BigDecimal LQN_SCHEMA_VERSION_EDEFAULT = new BigDecimal("1.0"); |
| 167 | |
| 168 | /** |
| 169 | * The cached value of the '{@link #getLqnSchemaVersion() <em>Lqn Schema Version</em>}' attribute. |
| 170 | * <!-- begin-user-doc --> |
| 171 | * <!-- end-user-doc --> |
| 172 | * @see #getLqnSchemaVersion() |
| 173 | * @generated |
| 174 | * @ordered |
| 175 | */ |
| 176 | protected BigDecimal lqnSchemaVersion = LQN_SCHEMA_VERSION_EDEFAULT; |
| 177 | |
| 178 | /** |
| 179 | * This is true if the Lqn Schema Version attribute has been set. |
| 180 | * <!-- begin-user-doc --> |
| 181 | * <!-- end-user-doc --> |
| 182 | * @generated |
| 183 | * @ordered |
| 184 | */ |
| 185 | protected boolean lqnSchemaVersionESet; |
| 186 | |
| 187 | /** |
| 188 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. |
| 189 | * <!-- begin-user-doc --> |
| 190 | * <!-- end-user-doc --> |
| 191 | * @see #getName() |
| 192 | * @generated |
| 193 | * @ordered |
| 194 | */ |
| 195 | protected static final String NAME_EDEFAULT = null; |
| 196 | |
| 197 | /** |
| 198 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. |
| 199 | * <!-- begin-user-doc --> |
| 200 | * <!-- end-user-doc --> |
| 201 | * @see #getName() |
| 202 | * @generated |
| 203 | * @ordered |
| 204 | */ |
| 205 | protected String name = NAME_EDEFAULT; |
| 206 | |
| 207 | /** |
| 208 | * The default value of the '{@link #getXmlDebug() <em>Xml Debug</em>}' attribute. |
| 209 | * <!-- begin-user-doc --> |
| 210 | * <!-- end-user-doc --> |
| 211 | * @see #getXmlDebug() |
| 212 | * @generated |
| 213 | * @ordered |
| 214 | */ |
| 215 | protected static final XmlDebugType XML_DEBUG_EDEFAULT = XmlDebugType.TRUE; |
| 216 | |
| 217 | /** |
| 218 | * The cached value of the '{@link #getXmlDebug() <em>Xml Debug</em>}' attribute. |
| 219 | * <!-- begin-user-doc --> |
| 220 | * <!-- end-user-doc --> |
| 221 | * @see #getXmlDebug() |
| 222 | * @generated |
| 223 | * @ordered |
| 224 | */ |
| 225 | protected XmlDebugType xmlDebug = XML_DEBUG_EDEFAULT; |
| 226 | |
| 227 | /** |
| 228 | * This is true if the Xml Debug attribute has been set. |
| 229 | * <!-- begin-user-doc --> |
| 230 | * <!-- end-user-doc --> |
| 231 | * @generated |
| 232 | * @ordered |
| 233 | */ |
| 234 | protected boolean xmlDebugESet; |
| 235 | |
| 236 | /** |
| 237 | * <!-- begin-user-doc --> |
| 238 | * <!-- end-user-doc --> |
| 239 | * @generated |
| 240 | */ |
| 241 | protected LqnModelTypeImpl() { |
| 242 | super(); |
| 243 | } |
| 244 | |
| 245 | /** |
| 246 | * <!-- begin-user-doc --> |
| 247 | * <!-- end-user-doc --> |
| 248 | * @generated |
| 249 | */ |
| 250 | @Override |
| 251 | protected EClass eStaticClass() { |
| 252 | return LqnCorePackage.Literals.LQN_MODEL_TYPE; |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * <!-- begin-user-doc --> |
| 257 | * <!-- end-user-doc --> |
| 258 | * @generated |
| 259 | */ |
| 260 | public RunControlType getRunControl() { |
| 261 | return runControl; |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * <!-- begin-user-doc --> |
| 266 | * <!-- end-user-doc --> |
| 267 | * @generated |
| 268 | */ |
| 269 | public NotificationChain basicSetRunControl(RunControlType newRunControl, NotificationChain msgs) { |
| 270 | RunControlType oldRunControl = runControl; |
| 271 | runControl = newRunControl; |
| 272 | if (eNotificationRequired()) { |
| 273 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__RUN_CONTROL, oldRunControl, newRunControl); |
| 274 | if (msgs == null) msgs = notification; else msgs.add(notification); |
| 275 | } |
| 276 | return msgs; |
| 277 | } |
| 278 | |
| 279 | /** |
| 280 | * <!-- begin-user-doc --> |
| 281 | * <!-- end-user-doc --> |
| 282 | * @generated |
| 283 | */ |
| 284 | public void setRunControl(RunControlType newRunControl) { |
| 285 | if (newRunControl != runControl) { |
| 286 | NotificationChain msgs = null; |
| 287 | if (runControl != null) |
| 288 | msgs = ((InternalEObject)runControl).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LqnCorePackage.LQN_MODEL_TYPE__RUN_CONTROL, null, msgs); |
| 289 | if (newRunControl != null) |
| 290 | msgs = ((InternalEObject)newRunControl).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LqnCorePackage.LQN_MODEL_TYPE__RUN_CONTROL, null, msgs); |
| 291 | msgs = basicSetRunControl(newRunControl, msgs); |
| 292 | if (msgs != null) msgs.dispatch(); |
| 293 | } |
| 294 | else if (eNotificationRequired()) |
| 295 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__RUN_CONTROL, newRunControl, newRunControl)); |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * <!-- begin-user-doc --> |
| 300 | * <!-- end-user-doc --> |
| 301 | * @generated |
| 302 | */ |
| 303 | public PlotControlType getPlotControl() { |
| 304 | return plotControl; |
| 305 | } |
| 306 | |
| 307 | /** |
| 308 | * <!-- begin-user-doc --> |
| 309 | * <!-- end-user-doc --> |
| 310 | * @generated |
| 311 | */ |
| 312 | public NotificationChain basicSetPlotControl(PlotControlType newPlotControl, NotificationChain msgs) { |
| 313 | PlotControlType oldPlotControl = plotControl; |
| 314 | plotControl = newPlotControl; |
| 315 | if (eNotificationRequired()) { |
| 316 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__PLOT_CONTROL, oldPlotControl, newPlotControl); |
| 317 | if (msgs == null) msgs = notification; else msgs.add(notification); |
| 318 | } |
| 319 | return msgs; |
| 320 | } |
| 321 | |
| 322 | /** |
| 323 | * <!-- begin-user-doc --> |
| 324 | * <!-- end-user-doc --> |
| 325 | * @generated |
| 326 | */ |
| 327 | public void setPlotControl(PlotControlType newPlotControl) { |
| 328 | if (newPlotControl != plotControl) { |
| 329 | NotificationChain msgs = null; |
| 330 | if (plotControl != null) |
| 331 | msgs = ((InternalEObject)plotControl).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LqnCorePackage.LQN_MODEL_TYPE__PLOT_CONTROL, null, msgs); |
| 332 | if (newPlotControl != null) |
| 333 | msgs = ((InternalEObject)newPlotControl).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LqnCorePackage.LQN_MODEL_TYPE__PLOT_CONTROL, null, msgs); |
| 334 | msgs = basicSetPlotControl(newPlotControl, msgs); |
| 335 | if (msgs != null) msgs.dispatch(); |
| 336 | } |
| 337 | else if (eNotificationRequired()) |
| 338 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__PLOT_CONTROL, newPlotControl, newPlotControl)); |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * <!-- begin-user-doc --> |
| 343 | * <!-- end-user-doc --> |
| 344 | * @generated |
| 345 | */ |
| 346 | public SolverParamsType getSolverParams() { |
| 347 | return solverParams; |
| 348 | } |
| 349 | |
| 350 | /** |
| 351 | * <!-- begin-user-doc --> |
| 352 | * <!-- end-user-doc --> |
| 353 | * @generated |
| 354 | */ |
| 355 | public NotificationChain basicSetSolverParams(SolverParamsType newSolverParams, NotificationChain msgs) { |
| 356 | SolverParamsType oldSolverParams = solverParams; |
| 357 | solverParams = newSolverParams; |
| 358 | if (eNotificationRequired()) { |
| 359 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__SOLVER_PARAMS, oldSolverParams, newSolverParams); |
| 360 | if (msgs == null) msgs = notification; else msgs.add(notification); |
| 361 | } |
| 362 | return msgs; |
| 363 | } |
| 364 | |
| 365 | /** |
| 366 | * <!-- begin-user-doc --> |
| 367 | * <!-- end-user-doc --> |
| 368 | * @generated |
| 369 | */ |
| 370 | public void setSolverParams(SolverParamsType newSolverParams) { |
| 371 | if (newSolverParams != solverParams) { |
| 372 | NotificationChain msgs = null; |
| 373 | if (solverParams != null) |
| 374 | msgs = ((InternalEObject)solverParams).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LqnCorePackage.LQN_MODEL_TYPE__SOLVER_PARAMS, null, msgs); |
| 375 | if (newSolverParams != null) |
| 376 | msgs = ((InternalEObject)newSolverParams).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LqnCorePackage.LQN_MODEL_TYPE__SOLVER_PARAMS, null, msgs); |
| 377 | msgs = basicSetSolverParams(newSolverParams, msgs); |
| 378 | if (msgs != null) msgs.dispatch(); |
| 379 | } |
| 380 | else if (eNotificationRequired()) |
| 381 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__SOLVER_PARAMS, newSolverParams, newSolverParams)); |
| 382 | } |
| 383 | |
| 384 | /** |
| 385 | * <!-- begin-user-doc --> |
| 386 | * <!-- end-user-doc --> |
| 387 | * @generated |
| 388 | */ |
| 389 | public EList<ProcessorType> getProcessor() { |
| 390 | if (processor == null) { |
| 391 | processor = new EObjectContainmentEList<ProcessorType>(ProcessorType.class, this, LqnCorePackage.LQN_MODEL_TYPE__PROCESSOR); |
| 392 | } |
| 393 | return processor; |
| 394 | } |
| 395 | |
| 396 | /** |
| 397 | * <!-- begin-user-doc --> |
| 398 | * <!-- end-user-doc --> |
| 399 | * @generated |
| 400 | */ |
| 401 | public EList<SlotType> getSlot() { |
| 402 | if (slot == null) { |
| 403 | slot = new EObjectContainmentEList<SlotType>(SlotType.class, this, LqnCorePackage.LQN_MODEL_TYPE__SLOT); |
| 404 | } |
| 405 | return slot; |
| 406 | } |
| 407 | |
| 408 | /** |
| 409 | * <!-- begin-user-doc --> |
| 410 | * <!-- end-user-doc --> |
| 411 | * @generated |
| 412 | */ |
| 413 | public String getDescription() { |
| 414 | return description; |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * <!-- begin-user-doc --> |
| 419 | * <!-- end-user-doc --> |
| 420 | * @generated |
| 421 | */ |
| 422 | public void setDescription(String newDescription) { |
| 423 | String oldDescription = description; |
| 424 | description = newDescription; |
| 425 | if (eNotificationRequired()) |
| 426 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__DESCRIPTION, oldDescription, description)); |
| 427 | } |
| 428 | |
| 429 | /** |
| 430 | * <!-- begin-user-doc --> |
| 431 | * <!-- end-user-doc --> |
| 432 | * @generated |
| 433 | */ |
| 434 | public BigDecimal getLqncoreSchemaVersion() { |
| 435 | return lqncoreSchemaVersion; |
| 436 | } |
| 437 | |
| 438 | /** |
| 439 | * <!-- begin-user-doc --> |
| 440 | * <!-- end-user-doc --> |
| 441 | * @generated |
| 442 | */ |
| 443 | public void setLqncoreSchemaVersion(BigDecimal newLqncoreSchemaVersion) { |
| 444 | BigDecimal oldLqncoreSchemaVersion = lqncoreSchemaVersion; |
| 445 | lqncoreSchemaVersion = newLqncoreSchemaVersion; |
| 446 | boolean oldLqncoreSchemaVersionESet = lqncoreSchemaVersionESet; |
| 447 | lqncoreSchemaVersionESet = true; |
| 448 | if (eNotificationRequired()) |
| 449 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__LQNCORE_SCHEMA_VERSION, oldLqncoreSchemaVersion, lqncoreSchemaVersion, !oldLqncoreSchemaVersionESet)); |
| 450 | } |
| 451 | |
| 452 | /** |
| 453 | * <!-- begin-user-doc --> |
| 454 | * <!-- end-user-doc --> |
| 455 | * @generated |
| 456 | */ |
| 457 | public void unsetLqncoreSchemaVersion() { |
| 458 | BigDecimal oldLqncoreSchemaVersion = lqncoreSchemaVersion; |
| 459 | boolean oldLqncoreSchemaVersionESet = lqncoreSchemaVersionESet; |
| 460 | lqncoreSchemaVersion = LQNCORE_SCHEMA_VERSION_EDEFAULT; |
| 461 | lqncoreSchemaVersionESet = false; |
| 462 | if (eNotificationRequired()) |
| 463 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.LQN_MODEL_TYPE__LQNCORE_SCHEMA_VERSION, oldLqncoreSchemaVersion, LQNCORE_SCHEMA_VERSION_EDEFAULT, oldLqncoreSchemaVersionESet)); |
| 464 | } |
| 465 | |
| 466 | /** |
| 467 | * <!-- begin-user-doc --> |
| 468 | * <!-- end-user-doc --> |
| 469 | * @generated |
| 470 | */ |
| 471 | public boolean isSetLqncoreSchemaVersion() { |
| 472 | return lqncoreSchemaVersionESet; |
| 473 | } |
| 474 | |
| 475 | /** |
| 476 | * <!-- begin-user-doc --> |
| 477 | * <!-- end-user-doc --> |
| 478 | * @generated |
| 479 | */ |
| 480 | public BigDecimal getLqnSchemaVersion() { |
| 481 | return lqnSchemaVersion; |
| 482 | } |
| 483 | |
| 484 | /** |
| 485 | * <!-- begin-user-doc --> |
| 486 | * <!-- end-user-doc --> |
| 487 | * @generated |
| 488 | */ |
| 489 | public void setLqnSchemaVersion(BigDecimal newLqnSchemaVersion) { |
| 490 | BigDecimal oldLqnSchemaVersion = lqnSchemaVersion; |
| 491 | lqnSchemaVersion = newLqnSchemaVersion; |
| 492 | boolean oldLqnSchemaVersionESet = lqnSchemaVersionESet; |
| 493 | lqnSchemaVersionESet = true; |
| 494 | if (eNotificationRequired()) |
| 495 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__LQN_SCHEMA_VERSION, oldLqnSchemaVersion, lqnSchemaVersion, !oldLqnSchemaVersionESet)); |
| 496 | } |
| 497 | |
| 498 | /** |
| 499 | * <!-- begin-user-doc --> |
| 500 | * <!-- end-user-doc --> |
| 501 | * @generated |
| 502 | */ |
| 503 | public void unsetLqnSchemaVersion() { |
| 504 | BigDecimal oldLqnSchemaVersion = lqnSchemaVersion; |
| 505 | boolean oldLqnSchemaVersionESet = lqnSchemaVersionESet; |
| 506 | lqnSchemaVersion = LQN_SCHEMA_VERSION_EDEFAULT; |
| 507 | lqnSchemaVersionESet = false; |
| 508 | if (eNotificationRequired()) |
| 509 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.LQN_MODEL_TYPE__LQN_SCHEMA_VERSION, oldLqnSchemaVersion, LQN_SCHEMA_VERSION_EDEFAULT, oldLqnSchemaVersionESet)); |
| 510 | } |
| 511 | |
| 512 | /** |
| 513 | * <!-- begin-user-doc --> |
| 514 | * <!-- end-user-doc --> |
| 515 | * @generated |
| 516 | */ |
| 517 | public boolean isSetLqnSchemaVersion() { |
| 518 | return lqnSchemaVersionESet; |
| 519 | } |
| 520 | |
| 521 | /** |
| 522 | * <!-- begin-user-doc --> |
| 523 | * <!-- end-user-doc --> |
| 524 | * @generated |
| 525 | */ |
| 526 | public String getName() { |
| 527 | return name; |
| 528 | } |
| 529 | |
| 530 | /** |
| 531 | * <!-- begin-user-doc --> |
| 532 | * <!-- end-user-doc --> |
| 533 | * @generated |
| 534 | */ |
| 535 | public void setName(String newName) { |
| 536 | String oldName = name; |
| 537 | name = newName; |
| 538 | if (eNotificationRequired()) |
| 539 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__NAME, oldName, name)); |
| 540 | } |
| 541 | |
| 542 | /** |
| 543 | * <!-- begin-user-doc --> |
| 544 | * <!-- end-user-doc --> |
| 545 | * @generated |
| 546 | */ |
| 547 | public XmlDebugType getXmlDebug() { |
| 548 | return xmlDebug; |
| 549 | } |
| 550 | |
| 551 | /** |
| 552 | * <!-- begin-user-doc --> |
| 553 | * <!-- end-user-doc --> |
| 554 | * @generated |
| 555 | */ |
| 556 | public void setXmlDebug(XmlDebugType newXmlDebug) { |
| 557 | XmlDebugType oldXmlDebug = xmlDebug; |
| 558 | xmlDebug = newXmlDebug == null ? XML_DEBUG_EDEFAULT : newXmlDebug; |
| 559 | boolean oldXmlDebugESet = xmlDebugESet; |
| 560 | xmlDebugESet = true; |
| 561 | if (eNotificationRequired()) |
| 562 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.LQN_MODEL_TYPE__XML_DEBUG, oldXmlDebug, xmlDebug, !oldXmlDebugESet)); |
| 563 | } |
| 564 | |
| 565 | /** |
| 566 | * <!-- begin-user-doc --> |
| 567 | * <!-- end-user-doc --> |
| 568 | * @generated |
| 569 | */ |
| 570 | public void unsetXmlDebug() { |
| 571 | XmlDebugType oldXmlDebug = xmlDebug; |
| 572 | boolean oldXmlDebugESet = xmlDebugESet; |
| 573 | xmlDebug = XML_DEBUG_EDEFAULT; |
| 574 | xmlDebugESet = false; |
| 575 | if (eNotificationRequired()) |
| 576 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.LQN_MODEL_TYPE__XML_DEBUG, oldXmlDebug, XML_DEBUG_EDEFAULT, oldXmlDebugESet)); |
| 577 | } |
| 578 | |
| 579 | /** |
| 580 | * <!-- begin-user-doc --> |
| 581 | * <!-- end-user-doc --> |
| 582 | * @generated |
| 583 | */ |
| 584 | public boolean isSetXmlDebug() { |
| 585 | return xmlDebugESet; |
| 586 | } |
| 587 | |
| 588 | /** |
| 589 | * <!-- begin-user-doc --> |
| 590 | * <!-- end-user-doc --> |
| 591 | * @generated |
| 592 | */ |
| 593 | @Override |
| 594 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 595 | switch (featureID) { |
| 596 | case LqnCorePackage.LQN_MODEL_TYPE__RUN_CONTROL: |
| 597 | return basicSetRunControl(null, msgs); |
| 598 | case LqnCorePackage.LQN_MODEL_TYPE__PLOT_CONTROL: |
| 599 | return basicSetPlotControl(null, msgs); |
| 600 | case LqnCorePackage.LQN_MODEL_TYPE__SOLVER_PARAMS: |
| 601 | return basicSetSolverParams(null, msgs); |
| 602 | case LqnCorePackage.LQN_MODEL_TYPE__PROCESSOR: |
| 603 | return ((InternalEList<?>)getProcessor()).basicRemove(otherEnd, msgs); |
| 604 | case LqnCorePackage.LQN_MODEL_TYPE__SLOT: |
| 605 | return ((InternalEList<?>)getSlot()).basicRemove(otherEnd, msgs); |
| 606 | } |
| 607 | return super.eInverseRemove(otherEnd, featureID, msgs); |
| 608 | } |
| 609 | |
| 610 | /** |
| 611 | * <!-- begin-user-doc --> |
| 612 | * <!-- end-user-doc --> |
| 613 | * @generated |
| 614 | */ |
| 615 | @Override |
| 616 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| 617 | switch (featureID) { |
| 618 | case LqnCorePackage.LQN_MODEL_TYPE__RUN_CONTROL: |
| 619 | return getRunControl(); |
| 620 | case LqnCorePackage.LQN_MODEL_TYPE__PLOT_CONTROL: |
| 621 | return getPlotControl(); |
| 622 | case LqnCorePackage.LQN_MODEL_TYPE__SOLVER_PARAMS: |
| 623 | return getSolverParams(); |
| 624 | case LqnCorePackage.LQN_MODEL_TYPE__PROCESSOR: |
| 625 | return getProcessor(); |
| 626 | case LqnCorePackage.LQN_MODEL_TYPE__SLOT: |
| 627 | return getSlot(); |
| 628 | case LqnCorePackage.LQN_MODEL_TYPE__DESCRIPTION: |
| 629 | return getDescription(); |
| 630 | case LqnCorePackage.LQN_MODEL_TYPE__LQNCORE_SCHEMA_VERSION: |
| 631 | return getLqncoreSchemaVersion(); |
| 632 | case LqnCorePackage.LQN_MODEL_TYPE__LQN_SCHEMA_VERSION: |
| 633 | return getLqnSchemaVersion(); |
| 634 | case LqnCorePackage.LQN_MODEL_TYPE__NAME: |
| 635 | return getName(); |
| 636 | case LqnCorePackage.LQN_MODEL_TYPE__XML_DEBUG: |
| 637 | return getXmlDebug(); |
| 638 | } |
| 639 | return super.eGet(featureID, resolve, coreType); |
| 640 | } |
| 641 | |
| 642 | /** |
| 643 | * <!-- begin-user-doc --> |
| 644 | * <!-- end-user-doc --> |
| 645 | * @generated |
| 646 | */ |
| 647 | @SuppressWarnings("unchecked") |
| 648 | @Override |
| 649 | public void eSet(int featureID, Object newValue) { |
| 650 | switch (featureID) { |
| 651 | case LqnCorePackage.LQN_MODEL_TYPE__RUN_CONTROL: |
| 652 | setRunControl((RunControlType)newValue); |
| 653 | return; |
| 654 | case LqnCorePackage.LQN_MODEL_TYPE__PLOT_CONTROL: |
| 655 | setPlotControl((PlotControlType)newValue); |
| 656 | return; |
| 657 | case LqnCorePackage.LQN_MODEL_TYPE__SOLVER_PARAMS: |
| 658 | setSolverParams((SolverParamsType)newValue); |
| 659 | return; |
| 660 | case LqnCorePackage.LQN_MODEL_TYPE__PROCESSOR: |
| 661 | getProcessor().clear(); |
| 662 | getProcessor().addAll((Collection<? extends ProcessorType>)newValue); |
| 663 | return; |
| 664 | case LqnCorePackage.LQN_MODEL_TYPE__SLOT: |
| 665 | getSlot().clear(); |
| 666 | getSlot().addAll((Collection<? extends SlotType>)newValue); |
| 667 | return; |
| 668 | case LqnCorePackage.LQN_MODEL_TYPE__DESCRIPTION: |
| 669 | setDescription((String)newValue); |
| 670 | return; |
| 671 | case LqnCorePackage.LQN_MODEL_TYPE__LQNCORE_SCHEMA_VERSION: |
| 672 | setLqncoreSchemaVersion((BigDecimal)newValue); |
| 673 | return; |
| 674 | case LqnCorePackage.LQN_MODEL_TYPE__LQN_SCHEMA_VERSION: |
| 675 | setLqnSchemaVersion((BigDecimal)newValue); |
| 676 | return; |
| 677 | case LqnCorePackage.LQN_MODEL_TYPE__NAME: |
| 678 | setName((String)newValue); |
| 679 | return; |
| 680 | case LqnCorePackage.LQN_MODEL_TYPE__XML_DEBUG: |
| 681 | setXmlDebug((XmlDebugType)newValue); |
| 682 | return; |
| 683 | } |
| 684 | super.eSet(featureID, newValue); |
| 685 | } |
| 686 | |
| 687 | /** |
| 688 | * <!-- begin-user-doc --> |
| 689 | * <!-- end-user-doc --> |
| 690 | * @generated |
| 691 | */ |
| 692 | @Override |
| 693 | public void eUnset(int featureID) { |
| 694 | switch (featureID) { |
| 695 | case LqnCorePackage.LQN_MODEL_TYPE__RUN_CONTROL: |
| 696 | setRunControl((RunControlType)null); |
| 697 | return; |
| 698 | case LqnCorePackage.LQN_MODEL_TYPE__PLOT_CONTROL: |
| 699 | setPlotControl((PlotControlType)null); |
| 700 | return; |
| 701 | case LqnCorePackage.LQN_MODEL_TYPE__SOLVER_PARAMS: |
| 702 | setSolverParams((SolverParamsType)null); |
| 703 | return; |
| 704 | case LqnCorePackage.LQN_MODEL_TYPE__PROCESSOR: |
| 705 | getProcessor().clear(); |
| 706 | return; |
| 707 | case LqnCorePackage.LQN_MODEL_TYPE__SLOT: |
| 708 | getSlot().clear(); |
| 709 | return; |
| 710 | case LqnCorePackage.LQN_MODEL_TYPE__DESCRIPTION: |
| 711 | setDescription(DESCRIPTION_EDEFAULT); |
| 712 | return; |
| 713 | case LqnCorePackage.LQN_MODEL_TYPE__LQNCORE_SCHEMA_VERSION: |
| 714 | unsetLqncoreSchemaVersion(); |
| 715 | return; |
| 716 | case LqnCorePackage.LQN_MODEL_TYPE__LQN_SCHEMA_VERSION: |
| 717 | unsetLqnSchemaVersion(); |
| 718 | return; |
| 719 | case LqnCorePackage.LQN_MODEL_TYPE__NAME: |
| 720 | setName(NAME_EDEFAULT); |
| 721 | return; |
| 722 | case LqnCorePackage.LQN_MODEL_TYPE__XML_DEBUG: |
| 723 | unsetXmlDebug(); |
| 724 | return; |
| 725 | } |
| 726 | super.eUnset(featureID); |
| 727 | } |
| 728 | |
| 729 | /** |
| 730 | * <!-- begin-user-doc --> |
| 731 | * <!-- end-user-doc --> |
| 732 | * @generated |
| 733 | */ |
| 734 | @Override |
| 735 | public boolean eIsSet(int featureID) { |
| 736 | switch (featureID) { |
| 737 | case LqnCorePackage.LQN_MODEL_TYPE__RUN_CONTROL: |
| 738 | return runControl != null; |
| 739 | case LqnCorePackage.LQN_MODEL_TYPE__PLOT_CONTROL: |
| 740 | return plotControl != null; |
| 741 | case LqnCorePackage.LQN_MODEL_TYPE__SOLVER_PARAMS: |
| 742 | return solverParams != null; |
| 743 | case LqnCorePackage.LQN_MODEL_TYPE__PROCESSOR: |
| 744 | return processor != null && !processor.isEmpty(); |
| 745 | case LqnCorePackage.LQN_MODEL_TYPE__SLOT: |
| 746 | return slot != null && !slot.isEmpty(); |
| 747 | case LqnCorePackage.LQN_MODEL_TYPE__DESCRIPTION: |
| 748 | return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); |
| 749 | case LqnCorePackage.LQN_MODEL_TYPE__LQNCORE_SCHEMA_VERSION: |
| 750 | return isSetLqncoreSchemaVersion(); |
| 751 | case LqnCorePackage.LQN_MODEL_TYPE__LQN_SCHEMA_VERSION: |
| 752 | return isSetLqnSchemaVersion(); |
| 753 | case LqnCorePackage.LQN_MODEL_TYPE__NAME: |
| 754 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); |
| 755 | case LqnCorePackage.LQN_MODEL_TYPE__XML_DEBUG: |
| 756 | return isSetXmlDebug(); |
| 757 | } |
| 758 | return super.eIsSet(featureID); |
| 759 | } |
| 760 | |
| 761 | /** |
| 762 | * <!-- begin-user-doc --> |
| 763 | * <!-- end-user-doc --> |
| 764 | * @generated |
| 765 | */ |
| 766 | @Override |
| 767 | public String toString() { |
| 768 | if (eIsProxy()) return super.toString(); |
| 769 | |
| 770 | StringBuffer result = new StringBuffer(super.toString()); |
| 771 | result.append(" (description: "); |
| 772 | result.append(description); |
| 773 | result.append(", lqncoreSchemaVersion: "); |
| 774 | if (lqncoreSchemaVersionESet) result.append(lqncoreSchemaVersion); else result.append("<unset>"); |
| 775 | result.append(", lqnSchemaVersion: "); |
| 776 | if (lqnSchemaVersionESet) result.append(lqnSchemaVersion); else result.append("<unset>"); |
| 777 | result.append(", name: "); |
| 778 | result.append(name); |
| 779 | result.append(", xmlDebug: "); |
| 780 | if (xmlDebugESet) result.append(xmlDebug); else result.append("<unset>"); |
| 781 | result.append(')'); |
| 782 | return result.toString(); |
| 783 | } |
| 784 | |
| 785 | } //LqnModelTypeImpl |