From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001
From: dims " + NL + " * The following features are supported:" + NL + " * Tuscany SDO Tools
+Building SDO Tools
+
+To build the Tuscany SDO Java Generator tools, perform the following steps
+
+
+Note: only the Interface2JavaGenerator class requires Java 5. You can build the XSD2JavaGenerator tool using a Java 1.4 JDK by removing the Interface2JavaGenerator.java file before running the "mvn" command.
+
+
diff --git a/branches/java-M1/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java b/branches/java-M1/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java
new file mode 100644
index 0000000000..5bf5eba837
--- /dev/null
+++ b/branches/java-M1/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java
@@ -0,0 +1,242 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tuscany.sdo.generate;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sdo.util.DataObjectUtil;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
+
+import commonj.sdo.helper.TypeHelper;
+
+public class Interface2JavaGenerator extends JavaGenerator
+{
+ /**
+ * Generate static SDOs from Java interfaces
+ *
+ * Usage arguments: see JavaGenerator
+ *
+ * [ -targetDirectory ";
+ protected final String TEXT_17 = NL + " *
" + NL + " *
"; + protected final String TEXT_33 = NL + " * The following features are implemented:" + NL + " *
";
+ protected final String TEXT_208 = "
.";
+ protected final String TEXT_209 = NL + "\t * The literals are from the enumeration {@link ";
+ protected final String TEXT_210 = "}.";
+ protected final String TEXT_211 = NL + "\t * It is bidirectional and its opposite is '{@link ";
+ protected final String TEXT_212 = "#";
+ protected final String TEXT_213 = " ";
+ protected final String TEXT_214 = "}'.";
+ protected final String TEXT_215 = NL + "\t * ";
+ protected final String TEXT_216 = NL + "\t * " + NL + "\t * If the meaning of the '"; + protected final String TEXT_217 = "' "; + protected final String TEXT_218 = " isn't clear," + NL + "\t * there really should be more of a description here..." + NL + "\t *
"; + protected final String TEXT_219 = NL + "\t * "; + protected final String TEXT_220 = NL + "\t * " + NL + "\t * "; + protected final String TEXT_221 = NL + "\t * "; + protected final String TEXT_222 = NL + "\t * @return the value of the '"; + protected final String TEXT_223 = "' "; + protected final String TEXT_224 = "."; + protected final String TEXT_225 = NL + "\t * @see "; + protected final String TEXT_226 = NL + "\t * @see #isSet"; + protected final String TEXT_227 = "()"; + protected final String TEXT_228 = NL + "\t * @see #unset"; + protected final String TEXT_229 = "()"; + protected final String TEXT_230 = NL + "\t * @see #set"; + protected final String TEXT_231 = "("; + protected final String TEXT_232 = ")"; + protected final String TEXT_233 = NL + "\t * @see "; + protected final String TEXT_234 = "#get"; + protected final String TEXT_235 = "()"; + protected final String TEXT_236 = NL + "\t * @see "; + protected final String TEXT_237 = "#"; + protected final String TEXT_238 = NL + "\t * @model "; + protected final String TEXT_239 = NL + "\t * "; + protected final String TEXT_240 = NL + "\t * @model"; + protected final String TEXT_241 = NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_242 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_243 = NL + "\t"; + protected final String TEXT_244 = " "; + protected final String TEXT_245 = "();" + NL; + protected final String TEXT_246 = NL + "\tpublic "; + protected final String TEXT_247 = " "; + protected final String TEXT_248 = "()" + NL + "\t{"; + protected final String TEXT_249 = NL + "\t\treturn "; + protected final String TEXT_250 = "("; + protected final String TEXT_251 = "("; + protected final String TEXT_252 = ")get("; + protected final String TEXT_253 = ", true)"; + protected final String TEXT_254 = ")."; + protected final String TEXT_255 = "()"; + protected final String TEXT_256 = ";"; + protected final String TEXT_257 = NL + "\t\t"; + protected final String TEXT_258 = " "; + protected final String TEXT_259 = " = ("; + protected final String TEXT_260 = ")eVirtualGet("; + protected final String TEXT_261 = ");"; + protected final String TEXT_262 = NL + "\t\tif ("; + protected final String TEXT_263 = " == null)" + NL + "\t\t{"; + protected final String TEXT_264 = NL + "\t\t\teVirtualSet("; + protected final String TEXT_265 = ", "; + protected final String TEXT_266 = " = new "; + protected final String TEXT_267 = ");"; + protected final String TEXT_268 = NL + " \t\t"; + protected final String TEXT_269 = " = createSequence("; + protected final String TEXT_270 = ");" + NL + " \t"; + protected final String TEXT_271 = NL + " \t\t\t"; + protected final String TEXT_272 = " = createPropertyList(ListKind.CONTAINMENT, "; + protected final String TEXT_273 = ".class, "; + protected final String TEXT_274 = ");" + NL + " \t\t"; + protected final String TEXT_275 = NL + "\t\t}" + NL + "\t\treturn "; + protected final String TEXT_276 = ";"; + protected final String TEXT_277 = NL + "\t\tif (eContainerFeatureID != "; + protected final String TEXT_278 = ") return null;" + NL + "\t\treturn ("; + protected final String TEXT_279 = ")eContainer();"; + protected final String TEXT_280 = NL + "\t\t"; + protected final String TEXT_281 = " "; + protected final String TEXT_282 = " = ("; + protected final String TEXT_283 = ")eVirtualGet("; + protected final String TEXT_284 = ", "; + protected final String TEXT_285 = "_DEFAULT_"; + protected final String TEXT_286 = ");"; + protected final String TEXT_287 = NL + "\t\tif ("; + protected final String TEXT_288 = " != null && "; + protected final String TEXT_289 = ".isProxy())" + NL + "\t\t{" + NL + "\t\t\t"; + protected final String TEXT_290 = " old"; + protected final String TEXT_291 = " = ("; + protected final String TEXT_292 = ")"; + protected final String TEXT_293 = ";" + NL + "\t\t\t"; + protected final String TEXT_294 = " = "; + protected final String TEXT_295 = "eResolveProxy(old"; + protected final String TEXT_296 = ");" + NL + "\t\t\tif ("; + protected final String TEXT_297 = " != old"; + protected final String TEXT_298 = ")" + NL + "\t\t\t{"; + protected final String TEXT_299 = NL + "\t\t\t\t"; + protected final String TEXT_300 = " new"; + protected final String TEXT_301 = " = ("; + protected final String TEXT_302 = ")"; + protected final String TEXT_303 = ";"; + protected final String TEXT_304 = NL + "\t\t\t\tChangeContext changeContext = old"; + protected final String TEXT_305 = ".inverseRemove(this, EOPPOSITE_FEATURE_BASE - "; + protected final String TEXT_306 = ", null, null);"; + protected final String TEXT_307 = NL + "\t\t\t\t"; + protected final String TEXT_308 = " changeContext = old"; + protected final String TEXT_309 = ".inverseRemove(this, "; + protected final String TEXT_310 = ", "; + protected final String TEXT_311 = ".class, null);"; + protected final String TEXT_312 = NL + "\t\t\t\tif (new"; + protected final String TEXT_313 = ".eInternalContainer() == null)" + NL + "\t\t\t\t{"; + protected final String TEXT_314 = NL + "\t\t\t\t\tchangeContext = new"; + protected final String TEXT_315 = ".eInverseAdd(this, EOPPOSITE_FEATURE_BASE - "; + protected final String TEXT_316 = ", null, changeContext);"; + protected final String TEXT_317 = NL + "\t\t\t\t\tchangeContext = new"; + protected final String TEXT_318 = ".eInverseAdd(this, "; + protected final String TEXT_319 = ", "; + protected final String TEXT_320 = ".class, changeContext);"; + protected final String TEXT_321 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (changeContext != null) changeContext.dispatch();"; + protected final String TEXT_322 = NL + "\t\t\t\teVirtualSet("; + protected final String TEXT_323 = ", "; + protected final String TEXT_324 = ");"; + protected final String TEXT_325 = NL + "\t\t\t\tif (isNotifying())" + NL + "\t\t\t\t\tnotify(ChangeKind.RESOLVE, "; + protected final String TEXT_326 = ", old"; + protected final String TEXT_327 = ", "; + protected final String TEXT_328 = ");"; + protected final String TEXT_329 = NL + "\t\t\t}" + NL + "\t\t}"; + protected final String TEXT_330 = NL + "\t\treturn ("; + protected final String TEXT_331 = ")eVirtualGet("; + protected final String TEXT_332 = ", "; + protected final String TEXT_333 = "_DEFAULT_"; + protected final String TEXT_334 = ");"; + protected final String TEXT_335 = NL + "\t\treturn ("; + protected final String TEXT_336 = " & "; + protected final String TEXT_337 = "_EFLAG) != 0;"; + protected final String TEXT_338 = NL + "\t\treturn "; + protected final String TEXT_339 = ";"; + protected final String TEXT_340 = NL + "\t\t"; + protected final String TEXT_341 = " "; + protected final String TEXT_342 = " = basicGet"; + protected final String TEXT_343 = "();" + NL + "\t\treturn "; + protected final String TEXT_344 = " != null && "; + protected final String TEXT_345 = ".isProxy() ? "; + protected final String TEXT_346 = "eResolveProxy(("; + protected final String TEXT_347 = ")"; + protected final String TEXT_348 = ") : "; + protected final String TEXT_349 = ";"; + protected final String TEXT_350 = NL + "\t\treturn create"; + protected final String TEXT_351 = "(get"; + protected final String TEXT_352 = "(), getType(), "; + protected final String TEXT_353 = ");"; + protected final String TEXT_354 = NL + "\t\treturn ("; + protected final String TEXT_355 = ")(("; + protected final String TEXT_356 = ")get"; + protected final String TEXT_357 = "()).list("; + protected final String TEXT_358 = ");"; + protected final String TEXT_359 = NL + " return get"; + protected final String TEXT_360 = "(get"; + protected final String TEXT_361 = "(), getType(), "; + protected final String TEXT_362 = ");" + NL; + protected final String TEXT_363 = NL + "\t\treturn (("; + protected final String TEXT_364 = ")get"; + protected final String TEXT_365 = "()).list("; + protected final String TEXT_366 = ");"; + protected final String TEXT_367 = NL + "\t\treturn "; + protected final String TEXT_368 = "("; + protected final String TEXT_369 = "("; + protected final String TEXT_370 = ")get(get"; + protected final String TEXT_371 = "(), getType(), "; + protected final String TEXT_372 = ")"; + protected final String TEXT_373 = ")."; + protected final String TEXT_374 = "()"; + protected final String TEXT_375 = ";"; + protected final String TEXT_376 = NL + "\t\treturn "; + protected final String TEXT_377 = "("; + protected final String TEXT_378 = "("; + protected final String TEXT_379 = ")get(get"; + protected final String TEXT_380 = "(), getType(), "; + protected final String TEXT_381 = ");"; + protected final String TEXT_382 = ")."; + protected final String TEXT_383 = "()"; + protected final String TEXT_384 = ";"; + protected final String TEXT_385 = NL + "\t\t// TODO: implement this method to return the '"; + protected final String TEXT_386 = "' "; + protected final String TEXT_387 = NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; + protected final String TEXT_388 = NL + "\t}" + NL; + protected final String TEXT_389 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; + protected final String TEXT_390 = " basicGet"; + protected final String TEXT_391 = "()" + NL + "\t{"; + protected final String TEXT_392 = NL + "\t\tif (eContainerFeatureID != "; + protected final String TEXT_393 = ") return null;" + NL + "\t\treturn ("; + protected final String TEXT_394 = ")eInternalContainer();"; + protected final String TEXT_395 = NL + "\t\treturn ("; + protected final String TEXT_396 = ")eVirtualGet("; + protected final String TEXT_397 = ");"; + protected final String TEXT_398 = NL + "\t\treturn "; + protected final String TEXT_399 = ";"; + protected final String TEXT_400 = NL + "\t\treturn ("; + protected final String TEXT_401 = ")get(get"; + protected final String TEXT_402 = "(), getType(), "; + protected final String TEXT_403 = ");"; + protected final String TEXT_404 = NL + "\t\treturn ("; + protected final String TEXT_405 = ")get"; + protected final String TEXT_406 = "().get("; + protected final String TEXT_407 = ", false);"; + protected final String TEXT_408 = NL + "\t\t// TODO: implement this method to return the '"; + protected final String TEXT_409 = "' "; + protected final String TEXT_410 = NL + "\t\t// -> do not perform proxy resolution" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; + protected final String TEXT_411 = NL + "\t}" + NL; + protected final String TEXT_412 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext basicSet"; + protected final String TEXT_413 = "("; + protected final String TEXT_414 = " new"; + protected final String TEXT_415 = ", ChangeContext changeContext)" + NL + "\t{"; + protected final String TEXT_416 = NL + "\t\tObject old"; + protected final String TEXT_417 = " = eVirtualSet("; + protected final String TEXT_418 = ", new"; + protected final String TEXT_419 = ");"; + protected final String TEXT_420 = NL + "\t\t"; + protected final String TEXT_421 = " old"; + protected final String TEXT_422 = " = "; + protected final String TEXT_423 = ";" + NL + "\t\t"; + protected final String TEXT_424 = " = new"; + protected final String TEXT_425 = ";"; + protected final String TEXT_426 = NL + "\t\tboolean isSetChange = old"; + protected final String TEXT_427 = " == EVIRTUAL_NO_VALUE;"; + protected final String TEXT_428 = NL + "\t\tboolean old"; + protected final String TEXT_429 = "_set_ = ("; + protected final String TEXT_430 = " & "; + protected final String TEXT_431 = "_ESETFLAG) != 0;" + NL + "\t\t"; + protected final String TEXT_432 = " |= "; + protected final String TEXT_433 = "_ESETFLAG;"; + protected final String TEXT_434 = NL + "\t\tboolean old"; + protected final String TEXT_435 = "_set_ = "; + protected final String TEXT_436 = "_set_;" + NL + "\t\t"; + protected final String TEXT_437 = "_set_ = true;"; + protected final String TEXT_438 = NL + "\t\tif (isNotifying())" + NL + "\t\t{"; + protected final String TEXT_439 = NL + "\t\t\t"; + protected final String TEXT_440 = " notification = new "; + protected final String TEXT_441 = "(this, "; + protected final String TEXT_442 = ".SET, "; + protected final String TEXT_443 = ", "; + protected final String TEXT_444 = "isSetChange ? null : old"; + protected final String TEXT_445 = "old"; + protected final String TEXT_446 = ", new"; + protected final String TEXT_447 = ", "; + protected final String TEXT_448 = "isSetChange"; + protected final String TEXT_449 = "!old"; + protected final String TEXT_450 = "_set_"; + protected final String TEXT_451 = ");"; + protected final String TEXT_452 = NL + "\t\t\t"; + protected final String TEXT_453 = " notification = new "; + protected final String TEXT_454 = "(this, "; + protected final String TEXT_455 = ".SET, "; + protected final String TEXT_456 = ", "; + protected final String TEXT_457 = "old"; + protected final String TEXT_458 = " == EVIRTUAL_NO_VALUE ? null : old"; + protected final String TEXT_459 = "old"; + protected final String TEXT_460 = ", new"; + protected final String TEXT_461 = ");"; + protected final String TEXT_462 = NL + "\t\t\tif (changeContext == null) changeContext = notification; else changeContext.add(notification);" + NL + "\t\t}"; + protected final String TEXT_463 = NL + "\t\treturn changeContext;"; + protected final String TEXT_464 = NL + "\t\treturn (("; + protected final String TEXT_465 = ".Internal)(("; + protected final String TEXT_466 = ".Internal.Wrapper)get"; + protected final String TEXT_467 = "()).featureMap()).basicAdd("; + protected final String TEXT_468 = ", new"; + protected final String TEXT_469 = ", changeContext);"; + protected final String TEXT_470 = NL + "\t\treturn (("; + protected final String TEXT_471 = ".Internal)get"; + protected final String TEXT_472 = "()).basicAdd("; + protected final String TEXT_473 = ", new"; + protected final String TEXT_474 = ", changeContext);"; + protected final String TEXT_475 = NL + "\t\t// TODO: implement this method to set the contained '"; + protected final String TEXT_476 = "' "; + protected final String TEXT_477 = NL + "\t\t// -> this method is automatically invoked to keep the containment relationship in synch" + NL + "\t\t// -> do not modify other features" + NL + "\t\t// -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; + protected final String TEXT_478 = NL + "\t}" + NL; + protected final String TEXT_479 = NL + "\t/**" + NL + "\t * Sets the value of the '{@link "; + protected final String TEXT_480 = "#"; + protected final String TEXT_481 = " "; + protected final String TEXT_482 = "}' "; + protected final String TEXT_483 = "." + NL + "\t * " + NL + "\t * " + NL + "\t * @param value the new value of the '"; + protected final String TEXT_484 = "' "; + protected final String TEXT_485 = "."; + protected final String TEXT_486 = NL + "\t * @see "; + protected final String TEXT_487 = NL + "\t * @see #isSet"; + protected final String TEXT_488 = "()"; + protected final String TEXT_489 = NL + "\t * @see #unset"; + protected final String TEXT_490 = "()"; + protected final String TEXT_491 = NL + "\t * @see #"; + protected final String TEXT_492 = "()" + NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_493 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_494 = NL + "\tvoid set"; + protected final String TEXT_495 = "("; + protected final String TEXT_496 = " value);" + NL; + protected final String TEXT_497 = NL + "\tpublic void set"; + protected final String TEXT_498 = "("; + protected final String TEXT_499 = " new"; + protected final String TEXT_500 = ")" + NL + "\t{"; + protected final String TEXT_501 = NL + "\t\t_set_("; + protected final String TEXT_502 = ", "; + protected final String TEXT_503 = "new "; + protected final String TEXT_504 = "("; + protected final String TEXT_505 = "new"; + protected final String TEXT_506 = ")"; + protected final String TEXT_507 = ");"; + protected final String TEXT_508 = NL + "\t\tif (new"; + protected final String TEXT_509 = " != eInternalContainer() || (eContainerFeatureID != "; + protected final String TEXT_510 = " && new"; + protected final String TEXT_511 = " != null))" + NL + "\t\t{" + NL + "\t\t\tif ("; + protected final String TEXT_512 = ".isAncestor(this, "; + protected final String TEXT_513 = "new"; + protected final String TEXT_514 = "))" + NL + "\t\t\t\tthrow new "; + protected final String TEXT_515 = "(\"Recursive containment not allowed for \" + toString());"; + protected final String TEXT_516 = NL + "\t\t\tChangeContext changeContext = null;" + NL + "\t\t\tif (eInternalContainer() != null)" + NL + "\t\t\t\tchangeContext = eBasicRemoveFromContainer(changeContext);" + NL + "\t\t\tif (new"; + protected final String TEXT_517 = " != null)" + NL + "\t\t\t\tchangeContext = (("; + protected final String TEXT_518 = ")new"; + protected final String TEXT_519 = ").eInverseAdd(this, "; + protected final String TEXT_520 = ", "; + protected final String TEXT_521 = ".class, changeContext);" + NL + "\t\t\tchangeContext = eBasicSetContainer(("; + protected final String TEXT_522 = ")new"; + protected final String TEXT_523 = ", "; + protected final String TEXT_524 = ", changeContext);" + NL + "\t\t\tif (changeContext != null) changeContext.dispatch();" + NL + "\t\t}"; + protected final String TEXT_525 = NL + "\t\telse if (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, "; + protected final String TEXT_526 = ", new"; + protected final String TEXT_527 = ", new"; + protected final String TEXT_528 = ");"; + protected final String TEXT_529 = NL + "\t\t"; + protected final String TEXT_530 = " "; + protected final String TEXT_531 = " = ("; + protected final String TEXT_532 = ")eVirtualGet("; + protected final String TEXT_533 = ");"; + protected final String TEXT_534 = NL + "\t\tif (new"; + protected final String TEXT_535 = " != "; + protected final String TEXT_536 = ")" + NL + "\t\t{" + NL + "\t\t\tChangeContext changeContext = null;" + NL + "\t\t\tif ("; + protected final String TEXT_537 = " != null)"; + protected final String TEXT_538 = NL + "\t\t\t\tchangeContext = (("; + protected final String TEXT_539 = ")"; + protected final String TEXT_540 = ").inverseRemove(this, EOPPOSITE_FEATURE_BASE - "; + protected final String TEXT_541 = ", null, changeContext);" + NL + "\t\t\tif (new"; + protected final String TEXT_542 = " != null)" + NL + "\t\t\t\tchangeContext = (("; + protected final String TEXT_543 = ")new"; + protected final String TEXT_544 = ").eInverseAdd(this, EOPPOSITE_FEATURE_BASE - "; + protected final String TEXT_545 = ", null, changeContext);"; + protected final String TEXT_546 = NL + "\t\t\t\tchangeContext = (("; + protected final String TEXT_547 = ")"; + protected final String TEXT_548 = ").inverseRemove(this, "; + protected final String TEXT_549 = ", "; + protected final String TEXT_550 = ".class, changeContext);" + NL + "\t\t\tif (new"; + protected final String TEXT_551 = " != null)" + NL + "\t\t\t\tchangeContext = (("; + protected final String TEXT_552 = ")new"; + protected final String TEXT_553 = ").eInverseAdd(this, "; + protected final String TEXT_554 = ", "; + protected final String TEXT_555 = ".class, changeContext);"; + protected final String TEXT_556 = NL + "\t\t\tchangeContext = basicSet"; + protected final String TEXT_557 = "("; + protected final String TEXT_558 = "new"; + protected final String TEXT_559 = ", changeContext);" + NL + "\t\t\tif (changeContext != null) changeContext.dispatch();" + NL + "\t\t}"; + protected final String TEXT_560 = NL + "\t\telse" + NL + " \t{"; + protected final String TEXT_561 = NL + "\t\t\tboolean old"; + protected final String TEXT_562 = "_set_ = eVirtualIsSet("; + protected final String TEXT_563 = ");"; + protected final String TEXT_564 = NL + "\t\t\tboolean old"; + protected final String TEXT_565 = "_set_ = ("; + protected final String TEXT_566 = " & "; + protected final String TEXT_567 = "_ESETFLAG) != 0;"; + protected final String TEXT_568 = NL + "\t\t\t"; + protected final String TEXT_569 = " |= "; + protected final String TEXT_570 = "_ESETFLAG;"; + protected final String TEXT_571 = NL + "\t\t\tboolean old"; + protected final String TEXT_572 = "_set_ = "; + protected final String TEXT_573 = "_set_;"; + protected final String TEXT_574 = NL + "\t\t\t"; + protected final String TEXT_575 = "_set_ = true;"; + protected final String TEXT_576 = NL + "\t\t\tif (isNotifying())" + NL + "\t\t\t\tnotify(ChangeKind.SET, "; + protected final String TEXT_577 = ", new"; + protected final String TEXT_578 = ", new"; + protected final String TEXT_579 = ", !old"; + protected final String TEXT_580 = "_set_);"; + protected final String TEXT_581 = NL + " \t}"; + protected final String TEXT_582 = NL + "\t\telse if (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, "; + protected final String TEXT_583 = ", new"; + protected final String TEXT_584 = ", new"; + protected final String TEXT_585 = ");"; + protected final String TEXT_586 = NL + "\t\t"; + protected final String TEXT_587 = " old"; + protected final String TEXT_588 = " = ("; + protected final String TEXT_589 = " & "; + protected final String TEXT_590 = "_EFLAG) != 0;"; + protected final String TEXT_591 = NL + "\t\tif (new"; + protected final String TEXT_592 = ") "; + protected final String TEXT_593 = " |= "; + protected final String TEXT_594 = "_EFLAG; else "; + protected final String TEXT_595 = " &= ~"; + protected final String TEXT_596 = "_EFLAG;"; + protected final String TEXT_597 = NL + "\t\t"; + protected final String TEXT_598 = " old"; + protected final String TEXT_599 = " = "; + protected final String TEXT_600 = ";"; + protected final String TEXT_601 = NL + "\t\t"; + protected final String TEXT_602 = " "; + protected final String TEXT_603 = " = new"; + protected final String TEXT_604 = " == null ? "; + protected final String TEXT_605 = "_DEFAULT_ : new"; + protected final String TEXT_606 = ";"; + protected final String TEXT_607 = NL + "\t\t"; + protected final String TEXT_608 = " = new"; + protected final String TEXT_609 = " == null ? "; + protected final String TEXT_610 = "_DEFAULT_ : new"; + protected final String TEXT_611 = ";"; + protected final String TEXT_612 = NL + "\t\t"; + protected final String TEXT_613 = " "; + protected final String TEXT_614 = " = "; + protected final String TEXT_615 = "new"; + protected final String TEXT_616 = ";"; + protected final String TEXT_617 = NL + "\t\t"; + protected final String TEXT_618 = " = "; + protected final String TEXT_619 = "new"; + protected final String TEXT_620 = ";"; + protected final String TEXT_621 = NL + "\t\tObject old"; + protected final String TEXT_622 = " = eVirtualSet("; + protected final String TEXT_623 = ", "; + protected final String TEXT_624 = ");"; + protected final String TEXT_625 = NL + "\t\tboolean isSetChange = old"; + protected final String TEXT_626 = " == EVIRTUAL_NO_VALUE;"; + protected final String TEXT_627 = NL + "\t\tboolean old"; + protected final String TEXT_628 = "_set_ = ("; + protected final String TEXT_629 = " & "; + protected final String TEXT_630 = "_ESETFLAG) != 0;"; + protected final String TEXT_631 = NL + "\t\t"; + protected final String TEXT_632 = " |= "; + protected final String TEXT_633 = "_ESETFLAG;"; + protected final String TEXT_634 = NL + "\t\tboolean old"; + protected final String TEXT_635 = "_set_ = "; + protected final String TEXT_636 = "_set_;"; + protected final String TEXT_637 = NL + "\t\t"; + protected final String TEXT_638 = "_set_ = true;"; + protected final String TEXT_639 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, "; + protected final String TEXT_640 = ", "; + protected final String TEXT_641 = "isSetChange ? "; + protected final String TEXT_642 = "null"; + protected final String TEXT_643 = "_DEFAULT_"; + protected final String TEXT_644 = " : old"; + protected final String TEXT_645 = "old"; + protected final String TEXT_646 = ", "; + protected final String TEXT_647 = "new"; + protected final String TEXT_648 = ", "; + protected final String TEXT_649 = "isSetChange"; + protected final String TEXT_650 = "!old"; + protected final String TEXT_651 = "_set_"; + protected final String TEXT_652 = ");"; + protected final String TEXT_653 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, "; + protected final String TEXT_654 = ", "; + protected final String TEXT_655 = "old"; + protected final String TEXT_656 = " == EVIRTUAL_NO_VALUE ? "; + protected final String TEXT_657 = "null"; + protected final String TEXT_658 = "_DEFAULT_"; + protected final String TEXT_659 = " : old"; + protected final String TEXT_660 = "old"; + protected final String TEXT_661 = ", "; + protected final String TEXT_662 = "new"; + protected final String TEXT_663 = ");"; + protected final String TEXT_664 = NL + " set(get"; + protected final String TEXT_665 = "(), getType(), "; + protected final String TEXT_666 = ", "; + protected final String TEXT_667 = " new "; + protected final String TEXT_668 = "("; + protected final String TEXT_669 = "new"; + protected final String TEXT_670 = ")"; + protected final String TEXT_671 = ");"; + protected final String TEXT_672 = NL + "\t\t(("; + protected final String TEXT_673 = ".Internal)get"; + protected final String TEXT_674 = "()).set("; + protected final String TEXT_675 = ", "; + protected final String TEXT_676 = "new "; + protected final String TEXT_677 = "("; + protected final String TEXT_678 = "new"; + protected final String TEXT_679 = ")"; + protected final String TEXT_680 = ");"; + protected final String TEXT_681 = NL + "\t\t// TODO: implement this method to set the '"; + protected final String TEXT_682 = "' "; + protected final String TEXT_683 = NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; + protected final String TEXT_684 = NL + "\t}" + NL; + protected final String TEXT_685 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext basicUnset"; + protected final String TEXT_686 = "(ChangeContext changeContext)" + NL + "\t{"; + protected final String TEXT_687 = NL + "\t\tObject old"; + protected final String TEXT_688 = " = eVirtualUnset("; + protected final String TEXT_689 = ");"; + protected final String TEXT_690 = NL + "\t\t"; + protected final String TEXT_691 = " old"; + protected final String TEXT_692 = " = "; + protected final String TEXT_693 = ";" + NL + "\t\t"; + protected final String TEXT_694 = " = null;"; + protected final String TEXT_695 = NL + "\t\tboolean isSetChange = old"; + protected final String TEXT_696 = " != EVIRTUAL_NO_VALUE;"; + protected final String TEXT_697 = NL + "\t\tboolean old"; + protected final String TEXT_698 = "_set_ = ("; + protected final String TEXT_699 = " & "; + protected final String TEXT_700 = "_ESETFLAG) != 0;" + NL + "\t\t"; + protected final String TEXT_701 = " &= ~"; + protected final String TEXT_702 = "_ESETFLAG;"; + protected final String TEXT_703 = NL + "\t\tboolean old"; + protected final String TEXT_704 = "_set_ = "; + protected final String TEXT_705 = "_set_;" + NL + "\t\t"; + protected final String TEXT_706 = "_set_ = false;"; + protected final String TEXT_707 = NL + "\t\tif (isNotifying())" + NL + "\t\t{" + NL + "\t\t\t"; + protected final String TEXT_708 = " notification = new "; + protected final String TEXT_709 = "(this, "; + protected final String TEXT_710 = ".UNSET, "; + protected final String TEXT_711 = ", "; + protected final String TEXT_712 = "isSetChange ? old"; + protected final String TEXT_713 = " : null"; + protected final String TEXT_714 = "old"; + protected final String TEXT_715 = ", null, "; + protected final String TEXT_716 = "isSetChange"; + protected final String TEXT_717 = "old"; + protected final String TEXT_718 = "_set_"; + protected final String TEXT_719 = ");" + NL + "\t\t\tif (changeContext == null) changeContext = notification; else changeContext.add(notification);" + NL + "\t\t}" + NL + "\t\treturn changeContext;"; + protected final String TEXT_720 = NL + "\t\t// TODO: implement this method to unset the contained '"; + protected final String TEXT_721 = "' "; + protected final String TEXT_722 = NL + "\t\t// -> this method is automatically invoked to keep the containment relationship in synch" + NL + "\t\t// -> do not modify other features" + NL + "\t\t// -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; + protected final String TEXT_723 = NL + "\t}" + NL; + protected final String TEXT_724 = NL + "\t/**" + NL + "\t * Unsets the value of the '{@link "; + protected final String TEXT_725 = "#"; + protected final String TEXT_726 = " "; + protected final String TEXT_727 = "}' "; + protected final String TEXT_728 = "." + NL + "\t * " + NL + "\t * "; + protected final String TEXT_729 = NL + "\t * @see #isSet"; + protected final String TEXT_730 = "()"; + protected final String TEXT_731 = NL + "\t * @see #"; + protected final String TEXT_732 = "()"; + protected final String TEXT_733 = NL + "\t * @see #set"; + protected final String TEXT_734 = "("; + protected final String TEXT_735 = ")"; + protected final String TEXT_736 = NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_737 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_738 = NL + "\tvoid unset"; + protected final String TEXT_739 = "();" + NL; + protected final String TEXT_740 = NL + "\tpublic void unset"; + protected final String TEXT_741 = "()" + NL + "\t{"; + protected final String TEXT_742 = NL + "\t\tunset("; + protected final String TEXT_743 = ");"; + protected final String TEXT_744 = NL + "\t\t(("; + protected final String TEXT_745 = ".Unsettable)get"; + protected final String TEXT_746 = "()).unset();"; + protected final String TEXT_747 = NL + "\t\t"; + protected final String TEXT_748 = " "; + protected final String TEXT_749 = " = ("; + protected final String TEXT_750 = ")eVirtualGet("; + protected final String TEXT_751 = ");"; + protected final String TEXT_752 = NL + "\t\tif ("; + protected final String TEXT_753 = " != null)" + NL + "\t\t{" + NL + "\t\t\tChangeContext changeContext = null;"; + protected final String TEXT_754 = NL + "\t\t\tchangeContext = (("; + protected final String TEXT_755 = ")"; + protected final String TEXT_756 = ").inverseRemove(this, EOPPOSITE_FEATURE_BASE - "; + protected final String TEXT_757 = ", null, changeContext);"; + protected final String TEXT_758 = NL + "\t\t\tchangeContext = (("; + protected final String TEXT_759 = ")"; + protected final String TEXT_760 = ").inverseRemove(this, "; + protected final String TEXT_761 = ", "; + protected final String TEXT_762 = ".class, changeContext);"; + protected final String TEXT_763 = NL + "\t\t\tchangeContext = basicUnset"; + protected final String TEXT_764 = "(changeContext);" + NL + "\t\t\tif (changeContext != null) changeContext.dispatch();" + NL + "\t\t}" + NL + "\t\telse" + NL + " \t{"; + protected final String TEXT_765 = NL + "\t\t\tboolean old"; + protected final String TEXT_766 = "_set_ = eVirtualIsSet("; + protected final String TEXT_767 = ");"; + protected final String TEXT_768 = NL + "\t\t\tboolean old"; + protected final String TEXT_769 = "_set_ = ("; + protected final String TEXT_770 = " & "; + protected final String TEXT_771 = "_ESETFLAG) != 0;"; + protected final String TEXT_772 = NL + "\t\t\t"; + protected final String TEXT_773 = " &= ~"; + protected final String TEXT_774 = "_ESETFLAG;"; + protected final String TEXT_775 = NL + "\t\t\tboolean old"; + protected final String TEXT_776 = "_set_ = "; + protected final String TEXT_777 = "_set_;"; + protected final String TEXT_778 = NL + "\t\t\t"; + protected final String TEXT_779 = "_set_ = false;"; + protected final String TEXT_780 = NL + "\t\t\tif (isNotifying())" + NL + "\t\t\t\tnotify(ChangeKind.UNSET, "; + protected final String TEXT_781 = ", null, null, old"; + protected final String TEXT_782 = "_set_);"; + protected final String TEXT_783 = NL + " \t}"; + protected final String TEXT_784 = NL + "\t\t"; + protected final String TEXT_785 = " old"; + protected final String TEXT_786 = " = ("; + protected final String TEXT_787 = " & "; + protected final String TEXT_788 = "_EFLAG) != 0;"; + protected final String TEXT_789 = NL + "\t\tObject old"; + protected final String TEXT_790 = " = eVirtualUnset("; + protected final String TEXT_791 = ");"; + protected final String TEXT_792 = NL + "\t\t"; + protected final String TEXT_793 = " old"; + protected final String TEXT_794 = " = "; + protected final String TEXT_795 = ";"; + protected final String TEXT_796 = NL + "\t\tboolean isSetChange = old"; + protected final String TEXT_797 = " != EVIRTUAL_NO_VALUE;"; + protected final String TEXT_798 = NL + "\t\tboolean old"; + protected final String TEXT_799 = "_set_ = ("; + protected final String TEXT_800 = " & "; + protected final String TEXT_801 = "_ESETFLAG) != 0;"; + protected final String TEXT_802 = NL + "\t\tboolean old"; + protected final String TEXT_803 = "_set_ = "; + protected final String TEXT_804 = "_set_;"; + protected final String TEXT_805 = NL + "\t\t"; + protected final String TEXT_806 = " = null;"; + protected final String TEXT_807 = NL + "\t\t"; + protected final String TEXT_808 = " &= ~"; + protected final String TEXT_809 = "_ESETFLAG;"; + protected final String TEXT_810 = NL + "\t\t"; + protected final String TEXT_811 = "_set_ = false;"; + protected final String TEXT_812 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.UNSET, "; + protected final String TEXT_813 = ", "; + protected final String TEXT_814 = "isSetChange ? old"; + protected final String TEXT_815 = " : null"; + protected final String TEXT_816 = "old"; + protected final String TEXT_817 = ", null, "; + protected final String TEXT_818 = "isSetChange"; + protected final String TEXT_819 = "old"; + protected final String TEXT_820 = "_set_"; + protected final String TEXT_821 = ");"; + protected final String TEXT_822 = NL + "\t\tif ("; + protected final String TEXT_823 = "_DEFAULT_) "; + protected final String TEXT_824 = " |= "; + protected final String TEXT_825 = "_EFLAG; else "; + protected final String TEXT_826 = " &= ~"; + protected final String TEXT_827 = "_EFLAG;"; + protected final String TEXT_828 = NL + "\t\t"; + protected final String TEXT_829 = " = "; + protected final String TEXT_830 = "_DEFAULT_;"; + protected final String TEXT_831 = NL + "\t\t"; + protected final String TEXT_832 = " &= ~"; + protected final String TEXT_833 = "_ESETFLAG;"; + protected final String TEXT_834 = NL + "\t\t"; + protected final String TEXT_835 = "_set_ = false;"; + protected final String TEXT_836 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.UNSET, "; + protected final String TEXT_837 = ", "; + protected final String TEXT_838 = "isSetChange ? old"; + protected final String TEXT_839 = " : "; + protected final String TEXT_840 = "_DEFAULT_"; + protected final String TEXT_841 = "old"; + protected final String TEXT_842 = ", "; + protected final String TEXT_843 = "_DEFAULT_, "; + protected final String TEXT_844 = "isSetChange"; + protected final String TEXT_845 = "old"; + protected final String TEXT_846 = "_set_"; + protected final String TEXT_847 = ");"; + protected final String TEXT_848 = NL + " unset(get"; + protected final String TEXT_849 = "(), getType(), "; + protected final String TEXT_850 = ");"; + protected final String TEXT_851 = NL + " unset"; + protected final String TEXT_852 = "(get"; + protected final String TEXT_853 = "());"; + protected final String TEXT_854 = NL + "\t\t// TODO: implement this method to unset the '"; + protected final String TEXT_855 = "' "; + protected final String TEXT_856 = NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; + protected final String TEXT_857 = NL + "\t}" + NL; + protected final String TEXT_858 = NL + "\t/**" + NL + "\t * Returns whether the value of the '{@link "; + protected final String TEXT_859 = "#"; + protected final String TEXT_860 = " "; + protected final String TEXT_861 = "}' "; + protected final String TEXT_862 = " is set." + NL + "\t * " + NL + "\t * " + NL + "\t * @return whether the value of the '"; + protected final String TEXT_863 = "' "; + protected final String TEXT_864 = " is set."; + protected final String TEXT_865 = NL + "\t * @see #unset"; + protected final String TEXT_866 = "()"; + protected final String TEXT_867 = NL + "\t * @see #"; + protected final String TEXT_868 = "()"; + protected final String TEXT_869 = NL + "\t * @see #set"; + protected final String TEXT_870 = "("; + protected final String TEXT_871 = ")"; + protected final String TEXT_872 = NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_873 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_874 = NL + "\tboolean isSet"; + protected final String TEXT_875 = "();" + NL; + protected final String TEXT_876 = NL + "\tpublic boolean isSet"; + protected final String TEXT_877 = "()" + NL + "\t{"; + protected final String TEXT_878 = NL + "\t\treturn isSet("; + protected final String TEXT_879 = ");"; + protected final String TEXT_880 = NL + "\t\t"; + protected final String TEXT_881 = " "; + protected final String TEXT_882 = " = ("; + protected final String TEXT_883 = ")eVirtualGet("; + protected final String TEXT_884 = ");"; + protected final String TEXT_885 = NL + "\t\treturn "; + protected final String TEXT_886 = " != null && (("; + protected final String TEXT_887 = ".Unsettable)"; + protected final String TEXT_888 = ").isSet();"; + protected final String TEXT_889 = NL + "\t\treturn eVirtualIsSet("; + protected final String TEXT_890 = ");"; + protected final String TEXT_891 = NL + "\t\treturn ("; + protected final String TEXT_892 = " & "; + protected final String TEXT_893 = "_ESETFLAG) != 0;"; + protected final String TEXT_894 = NL + "\t\treturn "; + protected final String TEXT_895 = "_set_;"; + protected final String TEXT_896 = NL + " return isSet(get"; + protected final String TEXT_897 = "(), getType(), "; + protected final String TEXT_898 = ");"; + protected final String TEXT_899 = NL + "\t\treturn !(("; + protected final String TEXT_900 = ".Internal)get"; + protected final String TEXT_901 = "()).isEmpty("; + protected final String TEXT_902 = ");"; + protected final String TEXT_903 = NL + "\t\t// TODO: implement this method to return whether the '"; + protected final String TEXT_904 = "' "; + protected final String TEXT_905 = " is set" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; + protected final String TEXT_906 = NL + "\t}" + NL; + protected final String TEXT_907 = NL + "\t/**" + NL + "\t * " + NL + "\t * "; + protected final String TEXT_908 = NL + "\t * " + NL + "\t * "; + protected final String TEXT_909 = NL + "\t * "; + protected final String TEXT_910 = NL + "\t * @model "; + protected final String TEXT_911 = NL + "\t * "; + protected final String TEXT_912 = NL + "\t * @model"; + protected final String TEXT_913 = NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_914 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; + protected final String TEXT_915 = NL + "\t"; + protected final String TEXT_916 = " "; + protected final String TEXT_917 = "("; + protected final String TEXT_918 = ")"; + protected final String TEXT_919 = ";" + NL; + protected final String TEXT_920 = NL + "\tpublic "; + protected final String TEXT_921 = " "; + protected final String TEXT_922 = "("; + protected final String TEXT_923 = ")"; + protected final String TEXT_924 = NL + "\t{"; + protected final String TEXT_925 = NL + "\t\t"; + protected final String TEXT_926 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// -> specify the condition that violates the invariant" + NL + "\t\t// -> verify the details of the diagnostic, including severity and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif ("; + protected final String TEXT_927 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t"; + protected final String TEXT_928 = ".add" + NL + "\t\t\t\t\t(new "; + protected final String TEXT_929 = NL + "\t\t\t\t\t\t("; + protected final String TEXT_930 = ".ERROR," + NL + "\t\t\t\t\t\t "; + protected final String TEXT_931 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t "; + protected final String TEXT_932 = "."; + protected final String TEXT_933 = "," + NL + "\t\t\t\t\t\t "; + protected final String TEXT_934 = ".INSTANCE.getString(\"_UI_GenericInvariant_diagnostic\", new Object[] { \""; + protected final String TEXT_935 = "\", "; + protected final String TEXT_936 = ".getObjectLabel(this, "; + protected final String TEXT_937 = ") }),"; + protected final String TEXT_938 = NL + "\t\t\t\t\t\t new Object [] { this }));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;"; + protected final String TEXT_939 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; + protected final String TEXT_940 = NL + "\t}" + NL; + protected final String TEXT_941 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext eInverseAdd("; + protected final String TEXT_942 = " otherEnd, int propertyIndex, ChangeContext changeContext)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{"; + protected final String TEXT_943 = NL + "\t\t\tcase "; + protected final String TEXT_944 = ":"; + protected final String TEXT_945 = NL + "\t\t\t\treturn (("; + protected final String TEXT_946 = ")(("; + protected final String TEXT_947 = ".InternalMapView)"; + protected final String TEXT_948 = "()).eMap()).basicAdd(otherEnd, changeContext);"; + protected final String TEXT_949 = NL + "\t\t\t\treturn (("; + protected final String TEXT_950 = ")"; + protected final String TEXT_951 = "()).basicAdd(otherEnd, changeContext);"; + protected final String TEXT_952 = NL + "\t\t\t\tif (eInternalContainer() != null)" + NL + "\t\t\t\t\tchangeContext = eBasicRemoveFromContainer(changeContext);" + NL + "\t\t\t\treturn eBasicSetContainer(otherEnd, "; + protected final String TEXT_953 = ", changeContext);"; + protected final String TEXT_954 = NL + "\t\t\t\t"; + protected final String TEXT_955 = " "; + protected final String TEXT_956 = " = ("; + protected final String TEXT_957 = ")eVirtualGet("; + protected final String TEXT_958 = ");"; + protected final String TEXT_959 = NL + "\t\t\t\tif ("; + protected final String TEXT_960 = " != null)"; + protected final String TEXT_961 = NL + "\t\t\t\t\tchangeContext = (("; + protected final String TEXT_962 = ")"; + protected final String TEXT_963 = ").inverseRemove(this, EOPPOSITE_FEATURE_BASE - "; + protected final String TEXT_964 = ", null, changeContext);"; + protected final String TEXT_965 = NL + "\t\t\t\t\tchangeContext = (("; + protected final String TEXT_966 = ")"; + protected final String TEXT_967 = ").inverseRemove(this, "; + protected final String TEXT_968 = ", "; + protected final String TEXT_969 = ".class, changeContext);"; + protected final String TEXT_970 = NL + "\t\t\t\treturn basicSet"; + protected final String TEXT_971 = "(("; + protected final String TEXT_972 = ")otherEnd, changeContext);"; + protected final String TEXT_973 = NL + "\t\t}"; + protected final String TEXT_974 = NL + "\t\treturn super.eInverseAdd(otherEnd, propertyIndex, changeContext);"; + protected final String TEXT_975 = NL + "\t\treturn eDynamicInverseAdd(otherEnd, propertyIndex, changeContext);"; + protected final String TEXT_976 = NL + "\t}" + NL; + protected final String TEXT_977 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext inverseRemove("; + protected final String TEXT_978 = " otherEnd, int propertyIndex, ChangeContext changeContext)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{"; + protected final String TEXT_979 = NL + "\t\t\tcase "; + protected final String TEXT_980 = ":"; + protected final String TEXT_981 = NL + "\t\t\t\treturn (("; + protected final String TEXT_982 = ")(("; + protected final String TEXT_983 = ".InternalMapView)"; + protected final String TEXT_984 = "()).eMap()).basicRemove(otherEnd, changeContext);"; + protected final String TEXT_985 = NL + " \t\t\treturn removeFrom"; + protected final String TEXT_986 = "("; + protected final String TEXT_987 = "(), otherEnd, changeContext);"; + protected final String TEXT_988 = NL + "\t\t\t\treturn removeFromList("; + protected final String TEXT_989 = "(), otherEnd, changeContext);"; + protected final String TEXT_990 = NL + "\t\t\t\treturn eBasicSetContainer(null, "; + protected final String TEXT_991 = ", changeContext);"; + protected final String TEXT_992 = NL + "\t\t\t\treturn basicUnset"; + protected final String TEXT_993 = "(changeContext);"; + protected final String TEXT_994 = NL + "\t\t\t\treturn basicSet"; + protected final String TEXT_995 = "(null, changeContext);"; + protected final String TEXT_996 = NL + "\t\t}"; + protected final String TEXT_997 = NL + "\t\treturn super.inverseRemove(otherEnd, propertyIndex, changeContext);"; + protected final String TEXT_998 = NL + "\t\treturn eDynamicInverseRemove(otherEnd, propertyIndex, changeContext);"; + protected final String TEXT_999 = NL + "\t}" + NL; + protected final String TEXT_1000 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext eBasicRemoveFromContainerFeature(ChangeContext changeContext)" + NL + "\t{" + NL + "\t\tswitch (eContainerFeatureID)" + NL + "\t\t{"; + protected final String TEXT_1001 = NL + "\t\t\tcase "; + protected final String TEXT_1002 = ":" + NL + "\t\t\t\treturn eInternalContainer().inverseRemove(this, "; + protected final String TEXT_1003 = ", "; + protected final String TEXT_1004 = ".class, changeContext);"; + protected final String TEXT_1005 = NL + "\t\t}"; + protected final String TEXT_1006 = NL + "\t\treturn super.eBasicRemoveFromContainerFeature(changeContext);"; + protected final String TEXT_1007 = NL + "\t\treturn eDynamicBasicRemoveFromContainer(changeContext);"; + protected final String TEXT_1008 = NL + "\t}" + NL; + protected final String TEXT_1009 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object get(int propertyIndex, boolean resolve)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{"; + protected final String TEXT_1010 = NL + "\t\t\tcase "; + protected final String TEXT_1011 = ":"; + protected final String TEXT_1012 = NL + "\t\t\t\treturn "; + protected final String TEXT_1013 = "() ? Boolean.TRUE : Boolean.FALSE;"; + protected final String TEXT_1014 = NL + "\t\t\t\treturn new "; + protected final String TEXT_1015 = "("; + protected final String TEXT_1016 = "());"; + protected final String TEXT_1017 = NL + "\t\t\t\tif (resolve) return "; + protected final String TEXT_1018 = "();" + NL + "\t\t\t\treturn basicGet"; + protected final String TEXT_1019 = "();"; + protected final String TEXT_1020 = NL + "\t\t\t\tif (coreType) return (("; + protected final String TEXT_1021 = ".InternalMapView)"; + protected final String TEXT_1022 = "()).eMap();" + NL + "\t\t\t\telse return "; + protected final String TEXT_1023 = "();"; + protected final String TEXT_1024 = NL + "\t\t\t\tif (coreType) return "; + protected final String TEXT_1025 = "();" + NL + "\t\t\t\telse return "; + protected final String TEXT_1026 = "().map();"; + protected final String TEXT_1027 = NL + "\t\t\t\t// XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view" + NL + " \t\t//if (coreType) " + NL + "\t\t\t\treturn "; + protected final String TEXT_1028 = "();"; + protected final String TEXT_1029 = NL + "\t\t\t\tif (coreType) return "; + protected final String TEXT_1030 = "();" + NL + "\t\t\t\treturn (("; + protected final String TEXT_1031 = ".Internal)"; + protected final String TEXT_1032 = "()).getWrapper();"; + protected final String TEXT_1033 = NL + "\t\t\t\treturn "; + protected final String TEXT_1034 = "();"; + protected final String TEXT_1035 = NL + "\t\t}"; + protected final String TEXT_1036 = NL + "\t\treturn super.get(propertyIndex, resolve);"; + protected final String TEXT_1037 = NL + "\t\treturn eDynamicGet(propertyIndex, resolve, coreType);"; + protected final String TEXT_1038 = NL + "\t}" + NL; + protected final String TEXT_1039 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void set(int propertyIndex, Object newValue)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{"; + protected final String TEXT_1040 = NL + "\t\t\tcase "; + protected final String TEXT_1041 = ":"; + protected final String TEXT_1042 = NL + " \tset"; + protected final String TEXT_1043 = "("; + protected final String TEXT_1044 = "(), newValue);"; + protected final String TEXT_1045 = NL + "\t\t\t\t(("; + protected final String TEXT_1046 = ".Internal)"; + protected final String TEXT_1047 = "()).set(newValue);"; + protected final String TEXT_1048 = NL + "\t\t\t\t(("; + protected final String TEXT_1049 = ".Setting)(("; + protected final String TEXT_1050 = ".InternalMapView)"; + protected final String TEXT_1051 = "()).eMap()).set(newValue);"; + protected final String TEXT_1052 = NL + "\t\t\t\t(("; + protected final String TEXT_1053 = ".Setting)"; + protected final String TEXT_1054 = "()).set(newValue);"; + protected final String TEXT_1055 = NL + "\t\t\t\t"; + protected final String TEXT_1056 = "().clear();" + NL + "\t\t\t\t"; + protected final String TEXT_1057 = "().addAll(("; + protected final String TEXT_1058 = ")newValue);"; + protected final String TEXT_1059 = NL + "\t\t\t\tset"; + protected final String TEXT_1060 = "((("; + protected final String TEXT_1061 = ")newValue)."; + protected final String TEXT_1062 = "());"; + protected final String TEXT_1063 = NL + "\t\t\t\tset"; + protected final String TEXT_1064 = "(("; + protected final String TEXT_1065 = ")newValue);"; + protected final String TEXT_1066 = NL + "\t\t\t\treturn;"; + protected final String TEXT_1067 = NL + "\t\t}"; + protected final String TEXT_1068 = NL + "\t\tsuper.set(propertyIndex, newValue);"; + protected final String TEXT_1069 = NL + "\t\teDynamicSet(propertyIndex, newValue);"; + protected final String TEXT_1070 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void unset(int propertyIndex)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{"; + protected final String TEXT_1071 = NL + "\t\t\tcase "; + protected final String TEXT_1072 = ":"; + protected final String TEXT_1073 = NL + " \t\t\tunset"; + protected final String TEXT_1074 = "("; + protected final String TEXT_1075 = "());"; + protected final String TEXT_1076 = NL + "\t\t\t\t"; + protected final String TEXT_1077 = "().clear();"; + protected final String TEXT_1078 = NL + "\t\t\t\tunset"; + protected final String TEXT_1079 = "();"; + protected final String TEXT_1080 = NL + "\t\t\t\tset"; + protected final String TEXT_1081 = "(("; + protected final String TEXT_1082 = ")null);"; + protected final String TEXT_1083 = NL + "\t\t\t\tset"; + protected final String TEXT_1084 = "("; + protected final String TEXT_1085 = "_DEFAULT_);"; + protected final String TEXT_1086 = NL + "\t\t\t\treturn;"; + protected final String TEXT_1087 = NL + "\t\t}"; + protected final String TEXT_1088 = NL + "\t\tsuper.unset(propertyIndex);"; + protected final String TEXT_1089 = NL + "\t\teDynamicUnset(propertyIndex);"; + protected final String TEXT_1090 = NL + "\t}" + NL; + protected final String TEXT_1091 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean isSet(int propertyIndex)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{"; + protected final String TEXT_1092 = NL + "\t\t\tcase "; + protected final String TEXT_1093 = ":"; + protected final String TEXT_1094 = NL + " \t\treturn !is"; + protected final String TEXT_1095 = "Empty("; + protected final String TEXT_1096 = "());"; + protected final String TEXT_1097 = NL + " \t\t// KDK - should this be !isSequenceEmpty?" + NL + "\t\t\t\treturn "; + protected final String TEXT_1098 = " != null && !is"; + protected final String TEXT_1099 = "Empty("; + protected final String TEXT_1100 = "());"; + protected final String TEXT_1101 = NL + "\t\t\t\treturn "; + protected final String TEXT_1102 = " != null && !"; + protected final String TEXT_1103 = ".isEmpty();"; + protected final String TEXT_1104 = NL + "\t\t\t\t"; + protected final String TEXT_1105 = " "; + protected final String TEXT_1106 = " = ("; + protected final String TEXT_1107 = ")eVirtualGet("; + protected final String TEXT_1108 = ");" + NL + "\t\t\t\treturn "; + protected final String TEXT_1109 = " != null && !"; + protected final String TEXT_1110 = ".isEmpty();"; + protected final String TEXT_1111 = NL + "\t\t\t\treturn !"; + protected final String TEXT_1112 = "().isEmpty();"; + protected final String TEXT_1113 = NL + "\t\t\t\treturn isSet"; + protected final String TEXT_1114 = "();"; + protected final String TEXT_1115 = NL + "\t\t\t\treturn "; + protected final String TEXT_1116 = " != null;"; + protected final String TEXT_1117 = NL + "\t\t\t\treturn eVirtualGet("; + protected final String TEXT_1118 = ") != null;"; + protected final String TEXT_1119 = NL + "\t\t\t\treturn basicGet"; + protected final String TEXT_1120 = "() != null;"; + protected final String TEXT_1121 = NL + "\t\t\t\treturn "; + protected final String TEXT_1122 = " != null;"; + protected final String TEXT_1123 = NL + "\t\t\t\treturn eVirtualGet("; + protected final String TEXT_1124 = ") != null;"; + protected final String TEXT_1125 = NL + "\t\t\t\treturn "; + protected final String TEXT_1126 = "() != null;"; + protected final String TEXT_1127 = NL + "\t\t\t\treturn (("; + protected final String TEXT_1128 = " & "; + protected final String TEXT_1129 = "_EFLAG) != 0) != "; + protected final String TEXT_1130 = "_DEFAULT_;"; + protected final String TEXT_1131 = NL + "\t\t\t\treturn "; + protected final String TEXT_1132 = " != "; + protected final String TEXT_1133 = "_DEFAULT_;"; + protected final String TEXT_1134 = NL + "\t\t\t\treturn eVirtualGet("; + protected final String TEXT_1135 = ", "; + protected final String TEXT_1136 = "_DEFAULT_) != "; + protected final String TEXT_1137 = "_DEFAULT_;"; + protected final String TEXT_1138 = NL + "\t\t\t\treturn "; + protected final String TEXT_1139 = "() != "; + protected final String TEXT_1140 = "_DEFAULT_;"; + protected final String TEXT_1141 = NL + "\t\t\t\treturn "; + protected final String TEXT_1142 = "_DEFAULT_ == null ? "; + protected final String TEXT_1143 = " != null : !"; + protected final String TEXT_1144 = "_DEFAULT_.equals("; + protected final String TEXT_1145 = ");"; + protected final String TEXT_1146 = NL + "\t\t\t\t"; + protected final String TEXT_1147 = " "; + protected final String TEXT_1148 = " = ("; + protected final String TEXT_1149 = ")eVirtualGet("; + protected final String TEXT_1150 = ", "; + protected final String TEXT_1151 = "_DEFAULT_);" + NL + "\t\t\t\treturn "; + protected final String TEXT_1152 = "_DEFAULT_ == null ? "; + protected final String TEXT_1153 = " != null : !"; + protected final String TEXT_1154 = "_DEFAULT_.equals("; + protected final String TEXT_1155 = ");"; + protected final String TEXT_1156 = NL + "\t\t\t\treturn "; + protected final String TEXT_1157 = "_DEFAULT_ == null ? "; + protected final String TEXT_1158 = "() != null : !"; + protected final String TEXT_1159 = "_DEFAULT_.equals("; + protected final String TEXT_1160 = "());"; + protected final String TEXT_1161 = NL + "\t\t}"; + protected final String TEXT_1162 = NL + "\t\treturn super.isSet(propertyIndex);"; + protected final String TEXT_1163 = NL + "\t\treturn eDynamicIsSet(propertyIndex);"; + protected final String TEXT_1164 = NL + "\t}" + NL; + protected final String TEXT_1165 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass)" + NL + "\t{"; + protected final String TEXT_1166 = NL + "\t\tif (baseClass == "; + protected final String TEXT_1167 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (derivedFeatureID)" + NL + "\t\t\t{"; + protected final String TEXT_1168 = NL + "\t\t\t\tcase "; + protected final String TEXT_1169 = ": return "; + protected final String TEXT_1170 = ";"; + protected final String TEXT_1171 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}"; + protected final String TEXT_1172 = NL + "\t\treturn super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass)" + NL + "\t{"; + protected final String TEXT_1173 = NL + "\t\tif (baseClass == "; + protected final String TEXT_1174 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (baseFeatureID)" + NL + "\t\t\t{"; + protected final String TEXT_1175 = NL + "\t\t\t\tcase "; + protected final String TEXT_1176 = ": return "; + protected final String TEXT_1177 = ";"; + protected final String TEXT_1178 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}"; + protected final String TEXT_1179 = NL + "\t\treturn super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);" + NL + "\t}" + NL; + protected final String TEXT_1180 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Object[] eVirtualValues()" + NL + "\t{" + NL + "\t\treturn "; + protected final String TEXT_1181 = ";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setVirtualValues(Object[] newValues)" + NL + "\t{" + NL + "\t\t"; + protected final String TEXT_1182 = " = newValues;" + NL + "\t}" + NL; + protected final String TEXT_1183 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected int eVirtualIndexBits(int offset)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\t{"; + protected final String TEXT_1184 = NL + "\t\t\tcase "; + protected final String TEXT_1185 = " :" + NL + "\t\t\t\treturn "; + protected final String TEXT_1186 = ";"; + protected final String TEXT_1187 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setVirtualIndexBits(int offset, int newIndexBits)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\t{"; + protected final String TEXT_1188 = NL + "\t\t\tcase "; + protected final String TEXT_1189 = " :" + NL + "\t\t\t\t"; + protected final String TEXT_1190 = " = newIndexBits;" + NL + "\t\t\t\tbreak;"; + protected final String TEXT_1191 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL; + protected final String TEXT_1192 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String toString()" + NL + "\t{" + NL + "\t\tif (isProxy()) return super.toString();" + NL + "" + NL + "\t\tStringBuffer result = new StringBuffer(super.toString());"; + protected final String TEXT_1193 = NL + "\t\tresult.append(\" ("; + protected final String TEXT_1194 = ": \");"; + protected final String TEXT_1195 = NL + "\t\tresult.append(\", "; + protected final String TEXT_1196 = ": \");"; + protected final String TEXT_1197 = NL + "\t\tif (eVirtualIsSet("; + protected final String TEXT_1198 = ")) result.append(eVirtualGet("; + protected final String TEXT_1199 = ")); else result.append(\"+ * The following features are supported: + *
+ * If the meaning of the 'Mixed' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Mixed' attribute list. + * @generated + */ + Sequence getMixed(); + + /** + * Returns the value of the 'Symbol' attribute. + * + *+ * If the meaning of the 'Symbol' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Symbol' attribute. + * @see #setSymbol(String) + * @generated + */ + String getSymbol(); + + /** + * Sets the value of the '{@link com.example.sequences.MixedQuote#getSymbol Symbol}' attribute. + * + * + * @param value the new value of the 'Symbol' attribute. + * @see #getSymbol() + * @generated + */ + void setSymbol(String value); + + /** + * Returns the value of the 'Company Name' attribute. + * + *+ * If the meaning of the 'Company Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Company Name' attribute. + * @see #setCompanyName(String) + * @generated + */ + String getCompanyName(); + + /** + * Sets the value of the '{@link com.example.sequences.MixedQuote#getCompanyName Company Name}' attribute. + * + * + * @param value the new value of the 'Company Name' attribute. + * @see #getCompanyName() + * @generated + */ + void setCompanyName(String value); + + /** + * Returns the value of the 'Price' attribute. + * + *+ * If the meaning of the 'Price' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Price' attribute. + * @see #setPrice(BigDecimal) + * @generated + */ + BigDecimal getPrice(); + + /** + * Sets the value of the '{@link com.example.sequences.MixedQuote#getPrice Price}' attribute. + * + * + * @param value the new value of the 'Price' attribute. + * @see #getPrice() + * @generated + */ + void setPrice(BigDecimal value); + + /** + * Returns the value of the 'Open1' attribute. + * + *+ * If the meaning of the 'Open1' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Open1' attribute. + * @see #setOpen1(BigDecimal) + * @generated + */ + BigDecimal getOpen1(); + + /** + * Sets the value of the '{@link com.example.sequences.MixedQuote#getOpen1 Open1}' attribute. + * + * + * @param value the new value of the 'Open1' attribute. + * @see #getOpen1() + * @generated + */ + void setOpen1(BigDecimal value); + + /** + * Returns the value of the 'High' attribute. + * + *+ * If the meaning of the 'High' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'High' attribute. + * @see #setHigh(BigDecimal) + * @generated + */ + BigDecimal getHigh(); + + /** + * Sets the value of the '{@link com.example.sequences.MixedQuote#getHigh High}' attribute. + * + * + * @param value the new value of the 'High' attribute. + * @see #getHigh() + * @generated + */ + void setHigh(BigDecimal value); + + /** + * Returns the value of the 'Low' attribute. + * + *+ * If the meaning of the 'Low' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Low' attribute. + * @see #setLow(BigDecimal) + * @generated + */ + BigDecimal getLow(); + + /** + * Sets the value of the '{@link com.example.sequences.MixedQuote#getLow Low}' attribute. + * + * + * @param value the new value of the 'Low' attribute. + * @see #getLow() + * @generated + */ + void setLow(BigDecimal value); + + /** + * Returns the value of the 'Volume' attribute. + * + *+ * If the meaning of the 'Volume' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Volume' attribute. + * @see #isSetVolume() + * @see #unsetVolume() + * @see #setVolume(double) + * @generated + */ + double getVolume(); + + /** + * Sets the value of the '{@link com.example.sequences.MixedQuote#getVolume Volume}' attribute. + * + * + * @param value the new value of the 'Volume' attribute. + * @see #isSetVolume() + * @see #unsetVolume() + * @see #getVolume() + * @generated + */ + void setVolume(double value); + + /** + * Unsets the value of the '{@link com.example.sequences.MixedQuote#getVolume Volume}' attribute. + * + * + * @see #isSetVolume() + * @see #getVolume() + * @see #setVolume(double) + * @generated + */ + void unsetVolume(); + + /** + * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getVolume Volume}' attribute is set. + * + * + * @return whether the value of the 'Volume' attribute is set. + * @see #unsetVolume() + * @see #getVolume() + * @see #setVolume(double) + * @generated + */ + boolean isSetVolume(); + + /** + * Returns the value of the 'Change1' attribute. + * + *+ * If the meaning of the 'Change1' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Change1' attribute. + * @see #isSetChange1() + * @see #unsetChange1() + * @see #setChange1(double) + * @generated + */ + double getChange1(); + + /** + * Sets the value of the '{@link com.example.sequences.MixedQuote#getChange1 Change1}' attribute. + * + * + * @param value the new value of the 'Change1' attribute. + * @see #isSetChange1() + * @see #unsetChange1() + * @see #getChange1() + * @generated + */ + void setChange1(double value); + + /** + * Unsets the value of the '{@link com.example.sequences.MixedQuote#getChange1 Change1}' attribute. + * + * + * @see #isSetChange1() + * @see #getChange1() + * @see #setChange1(double) + * @generated + */ + void unsetChange1(); + + /** + * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getChange1 Change1}' attribute is set. + * + * + * @return whether the value of the 'Change1' attribute is set. + * @see #unsetChange1() + * @see #getChange1() + * @see #setChange1(double) + * @generated + */ + boolean isSetChange1(); + + /** + * Returns the value of the 'Quotes' containment reference list. + * The list contents are of type {@link com.example.sequences.MixedQuote}. + * + *+ * If the meaning of the 'Quotes' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Quotes' containment reference list. + * @generated + */ + List getQuotes(); + +} // MixedQuote diff --git a/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java new file mode 100644 index 0000000000..f92285c048 --- /dev/null +++ b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java @@ -0,0 +1,96 @@ +/** + * + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.sequences; + +import commonj.sdo.Sequence; + +import java.util.List; + +/** + * + * A representation of the model object 'Mixed Repeating Choice'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Mixed' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Mixed' attribute list. + * @generated + */ + Sequence getMixed(); + + /** + * Returns the value of the 'Group' attribute list. + * + *+ * If the meaning of the 'Group' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Group' attribute list. + * @generated + */ + Sequence getGroup(); + + /** + * Returns the value of the 'A' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *+ * If the meaning of the 'A' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'A' attribute list. + * @generated + */ + List getA(); + + /** + * Returns the value of the 'B' attribute list. + * The list contents are of type {@link java.lang.Integer}. + * + *+ * If the meaning of the 'B' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'B' attribute list. + * @generated + */ + List getB(); + +} // MixedRepeatingChoice diff --git a/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java new file mode 100644 index 0000000000..ab5b144e09 --- /dev/null +++ b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java @@ -0,0 +1,82 @@ +/** + * + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.sequences; + +import commonj.sdo.Sequence; + +import java.util.List; + +/** + * + * A representation of the model object 'Repeating Choice'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Group' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Group' attribute list. + * @generated + */ + Sequence getGroup(); + + /** + * Returns the value of the 'A' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *+ * If the meaning of the 'A' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'A' attribute list. + * @generated + */ + List getA(); + + /** + * Returns the value of the 'B' attribute list. + * The list contents are of type {@link java.lang.Integer}. + * + *+ * If the meaning of the 'B' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'B' attribute list. + * @generated + */ + List getB(); + +} // RepeatingChoice diff --git a/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java new file mode 100644 index 0000000000..c73310b5b5 --- /dev/null +++ b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java @@ -0,0 +1,83 @@ +/** + * + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.sequences; + + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @generated + */ +public interface SequencesFactory +{ + + /** + * The singleton instance of the factory. + * + * + * @generated + */ + SequencesFactory INSTANCE = com.example.sequences.impl.SequencesFactoryImpl.init(); + + /** + * Returns a new object of class 'Mixed Quote'. + * + * + * @return a new object of class 'Mixed Quote'. + * @generated + */ + MixedQuote createMixedQuote(); + + /** + * Returns a new object of class 'Mixed Repeating Choice'. + * + * + * @return a new object of class 'Mixed Repeating Choice'. + * @generated + */ + MixedRepeatingChoice createMixedRepeatingChoice(); + + /** + * Returns a new object of class 'Repeating Choice'. + * + * + * @return a new object of class 'Repeating Choice'. + * @generated + */ + RepeatingChoice createRepeatingChoice(); + + /** + * Returns a new object of class 'Two RCs'. + * + * + * @return a new object of class 'Two RCs'. + * @generated + */ + TwoRCs createTwoRCs(); + + /** + * Returns a new object of class 'Two RCs Mixed'. + * + * + * @return a new object of class 'Two RCs Mixed'. + * @generated + */ + TwoRCsMixed createTwoRCsMixed(); + +} //SequencesFactory diff --git a/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java new file mode 100644 index 0000000000..9615d2a0ef --- /dev/null +++ b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java @@ -0,0 +1,151 @@ +/** + * + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.sequences; + +import commonj.sdo.Sequence; + +import java.util.List; + +/** + * + * A representation of the model object 'Two RCs'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Group' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Group' attribute list. + * @generated + */ + Sequence getGroup(); + + /** + * Returns the value of the 'A' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *+ * If the meaning of the 'A' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'A' attribute list. + * @generated + */ + List getA(); + + /** + * Returns the value of the 'B' attribute list. + * The list contents are of type {@link java.lang.Integer}. + * + *+ * If the meaning of the 'B' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'B' attribute list. + * @generated + */ + List getB(); + + /** + * Returns the value of the 'Split' attribute. + * + *+ * If the meaning of the 'Split' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Split' attribute. + * @see #setSplit(String) + * @generated + */ + String getSplit(); + + /** + * Sets the value of the '{@link com.example.sequences.TwoRCs#getSplit Split}' attribute. + * + * + * @param value the new value of the 'Split' attribute. + * @see #getSplit() + * @generated + */ + void setSplit(String value); + + /** + * Returns the value of the 'Group1' attribute list. + * + *+ * If the meaning of the 'Group1' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Group1' attribute list. + * @generated + */ + Sequence getGroup1(); + + /** + * Returns the value of the 'Y' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *+ * If the meaning of the 'Y' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Y' attribute list. + * @generated + */ + List getY(); + + /** + * Returns the value of the 'Z' attribute list. + * The list contents are of type {@link java.lang.Integer}. + * + *+ * If the meaning of the 'Z' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Z' attribute list. + * @generated + */ + List getZ(); + +} // TwoRCs diff --git a/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java new file mode 100644 index 0000000000..0325e2cd9c --- /dev/null +++ b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java @@ -0,0 +1,165 @@ +/** + * + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.sequences; + +import commonj.sdo.Sequence; + +import java.util.List; + +/** + * + * A representation of the model object 'Two RCs Mixed'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Mixed' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Mixed' attribute list. + * @generated + */ + Sequence getMixed(); + + /** + * Returns the value of the 'Group' attribute list. + * + *+ * If the meaning of the 'Group' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Group' attribute list. + * @generated + */ + Sequence getGroup(); + + /** + * Returns the value of the 'A' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *+ * If the meaning of the 'A' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'A' attribute list. + * @generated + */ + List getA(); + + /** + * Returns the value of the 'B' attribute list. + * The list contents are of type {@link java.lang.Integer}. + * + *+ * If the meaning of the 'B' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'B' attribute list. + * @generated + */ + List getB(); + + /** + * Returns the value of the 'Split' attribute. + * + *+ * If the meaning of the 'Split' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Split' attribute. + * @see #setSplit(String) + * @generated + */ + String getSplit(); + + /** + * Sets the value of the '{@link com.example.sequences.TwoRCsMixed#getSplit Split}' attribute. + * + * + * @param value the new value of the 'Split' attribute. + * @see #getSplit() + * @generated + */ + void setSplit(String value); + + /** + * Returns the value of the 'Group1' attribute list. + * + *+ * If the meaning of the 'Group1' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Group1' attribute list. + * @generated + */ + Sequence getGroup1(); + + /** + * Returns the value of the 'Y' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *+ * If the meaning of the 'Y' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Y' attribute list. + * @generated + */ + List getY(); + + /** + * Returns the value of the 'Z' attribute list. + * The list contents are of type {@link java.lang.Integer}. + * + *+ * If the meaning of the 'Z' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Z' attribute list. + * @generated + */ + List getZ(); + +} // TwoRCsMixed diff --git a/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java new file mode 100644 index 0000000000..b3381cda76 --- /dev/null +++ b/branches/java-M1/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java @@ -0,0 +1,657 @@ +/** + * + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.sequences.impl; + +import com.example.sequences.MixedQuote; + +import commonj.sdo.Sequence; +import commonj.sdo.Type; + +import commonj.sdo.helper.TypeHelper; + +import java.math.BigDecimal; + +import java.util.Collection; +import java.util.List; + +import org.apache.tuscany.sdo.impl.DataObjectBase; + +import org.apache.tuscany.sdo.util.BasicSequence; + +/** + * + * An implementation of the model object 'Mixed Quote'. + * + *+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are supported: + *
+ * If the meaning of the 'Symbol' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Symbol' attribute. + * @see #setSymbol(String) + * @generated + */ + String getSymbol(); + + /** + * Sets the value of the '{@link com.example.simple.Quote#getSymbol Symbol}' attribute. + * + * + * @param value the new value of the 'Symbol' attribute. + * @see #getSymbol() + * @generated + */ + void setSymbol(String value); + + /** + * Returns the value of the 'Company Name' attribute. + * + *+ * If the meaning of the 'Company Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Company Name' attribute. + * @see #setCompanyName(String) + * @generated + */ + String getCompanyName(); + + /** + * Sets the value of the '{@link com.example.simple.Quote#getCompanyName Company Name}' attribute. + * + * + * @param value the new value of the 'Company Name' attribute. + * @see #getCompanyName() + * @generated + */ + void setCompanyName(String value); + + /** + * Returns the value of the 'Price' attribute. + * + *+ * If the meaning of the 'Price' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Price' attribute. + * @see #setPrice(BigDecimal) + * @generated + */ + BigDecimal getPrice(); + + /** + * Sets the value of the '{@link com.example.simple.Quote#getPrice Price}' attribute. + * + * + * @param value the new value of the 'Price' attribute. + * @see #getPrice() + * @generated + */ + void setPrice(BigDecimal value); + + /** + * Returns the value of the 'Open1' attribute. + * + *+ * If the meaning of the 'Open1' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Open1' attribute. + * @see #setOpen1(BigDecimal) + * @generated + */ + BigDecimal getOpen1(); + + /** + * Sets the value of the '{@link com.example.simple.Quote#getOpen1 Open1}' attribute. + * + * + * @param value the new value of the 'Open1' attribute. + * @see #getOpen1() + * @generated + */ + void setOpen1(BigDecimal value); + + /** + * Returns the value of the 'High' attribute. + * + *+ * If the meaning of the 'High' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'High' attribute. + * @see #setHigh(BigDecimal) + * @generated + */ + BigDecimal getHigh(); + + /** + * Sets the value of the '{@link com.example.simple.Quote#getHigh High}' attribute. + * + * + * @param value the new value of the 'High' attribute. + * @see #getHigh() + * @generated + */ + void setHigh(BigDecimal value); + + /** + * Returns the value of the 'Low' attribute. + * + *+ * If the meaning of the 'Low' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Low' attribute. + * @see #setLow(BigDecimal) + * @generated + */ + BigDecimal getLow(); + + /** + * Sets the value of the '{@link com.example.simple.Quote#getLow Low}' attribute. + * + * + * @param value the new value of the 'Low' attribute. + * @see #getLow() + * @generated + */ + void setLow(BigDecimal value); + + /** + * Returns the value of the 'Volume' attribute. + * + *+ * If the meaning of the 'Volume' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Volume' attribute. + * @see #isSetVolume() + * @see #unsetVolume() + * @see #setVolume(double) + * @generated + */ + double getVolume(); + + /** + * Sets the value of the '{@link com.example.simple.Quote#getVolume Volume}' attribute. + * + * + * @param value the new value of the 'Volume' attribute. + * @see #isSetVolume() + * @see #unsetVolume() + * @see #getVolume() + * @generated + */ + void setVolume(double value); + + /** + * Unsets the value of the '{@link com.example.simple.Quote#getVolume Volume}' attribute. + * + * + * @see #isSetVolume() + * @see #getVolume() + * @see #setVolume(double) + * @generated + */ + void unsetVolume(); + + /** + * Returns whether the value of the '{@link com.example.simple.Quote#getVolume Volume}' attribute is set. + * + * + * @return whether the value of the 'Volume' attribute is set. + * @see #unsetVolume() + * @see #getVolume() + * @see #setVolume(double) + * @generated + */ + boolean isSetVolume(); + + /** + * Returns the value of the 'Change1' attribute. + * + *+ * If the meaning of the 'Change1' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Change1' attribute. + * @see #isSetChange1() + * @see #unsetChange1() + * @see #setChange1(double) + * @generated + */ + double getChange1(); + + /** + * Sets the value of the '{@link com.example.simple.Quote#getChange1 Change1}' attribute. + * + * + * @param value the new value of the 'Change1' attribute. + * @see #isSetChange1() + * @see #unsetChange1() + * @see #getChange1() + * @generated + */ + void setChange1(double value); + + /** + * Unsets the value of the '{@link com.example.simple.Quote#getChange1 Change1}' attribute. + * + * + * @see #isSetChange1() + * @see #getChange1() + * @see #setChange1(double) + * @generated + */ + void unsetChange1(); + + /** + * Returns whether the value of the '{@link com.example.simple.Quote#getChange1 Change1}' attribute is set. + * + * + * @return whether the value of the 'Change1' attribute is set. + * @see #unsetChange1() + * @see #getChange1() + * @see #setChange1(double) + * @generated + */ + boolean isSetChange1(); + + /** + * Returns the value of the 'Quotes' containment reference list. + * The list contents are of type {@link com.example.simple.Quote}. + * + *+ * If the meaning of the 'Quotes' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Quotes' containment reference list. + * @generated + */ + List getQuotes(); + +} // Quote diff --git a/branches/java-M1/java/sdo/tools/src/test/java/com/example/simple/SimpleFactory.java b/branches/java-M1/java/sdo/tools/src/test/java/com/example/simple/SimpleFactory.java new file mode 100644 index 0000000000..9203976521 --- /dev/null +++ b/branches/java-M1/java/sdo/tools/src/test/java/com/example/simple/SimpleFactory.java @@ -0,0 +1,46 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.simple; + + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @generated + */ +public interface SimpleFactory +{ + /** + * The singleton instance of the factory. + * + * + * @generated + */ + SimpleFactory INSTANCE = com.example.simple.impl.SimpleFactoryImpl.eINSTANCE; + + /** + * Returns a new object of class 'Quote'. + * + * + * @return a new object of class 'Quote'. + * @generated + */ + Quote createQuote(); + +} //SimpleFactory diff --git a/branches/java-M1/java/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java b/branches/java-M1/java/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java new file mode 100644 index 0000000000..5b407dd311 --- /dev/null +++ b/branches/java-M1/java/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java @@ -0,0 +1,712 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.simple.impl; + +import com.example.simple.Quote; + +import java.math.BigDecimal; + +import java.util.Collection; +import java.util.List; + +import org.apache.tuscany.sdo.impl.DataObjectImpl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Quote'. + * + *+ * The following features are implemented: + *
Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see com.example.simple.impl.SimplePackageImpl#eNS_URI + * @see #init() + * @generated + */ + private SimplePackageImpl() + { + super(eNS_URI, ((EFactory)SimpleFactory.INSTANCE)); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this + * model, and for any others upon which it depends. Simple + * dependencies are satisfied by calling this method on all + * dependent packages before doing anything else. This method drives + * initialization for interdependent packages directly, in parallel + * with this package, itself. + *
Of this package and its interdependencies, all packages which + * have not yet been registered by their URI values are first created + * and registered. The packages are then initialized in two steps: + * meta-model objects for all of the packages are created before any + * are initialized, since one package's meta-model objects may refer to + * those of another. + *
Invocation of this method will not affect any packages that have + * already been initialized. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static SimplePackageImpl init() + { + if (isInited) return (SimplePackageImpl)EPackage.Registry.INSTANCE.getEPackage(SimplePackageImpl.eNS_URI); + + // Obtain or create and register package + SimplePackageImpl theSimplePackageImpl = (SimplePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof SimplePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new SimplePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + XMLTypePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theSimplePackageImpl.createPackageContents(); + + // Initialize created meta-data + theSimplePackageImpl.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theSimplePackageImpl.freeze(); + + return theSimplePackageImpl; + } + + + /** + * Returns the meta object for class '{@link org.eclipse.emf.ecore.EObject Document Root}'. + * + * + * @return the meta object for class 'Document Root'. + * @see org.eclipse.emf.ecore.EObject + * @generated + */ + public EClass getDocumentRoot() + { + return documentRootEClass; + } + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.emf.ecore.EObject#getMixed Mixed}'. + * + * + * @return the meta object for the attribute list 'Mixed'. + * @see org.eclipse.emf.ecore.EObject#getMixed() + * @see #getDocumentRoot() + * @generated + */ + public EAttribute getDocumentRoot_Mixed() + { + return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0); + } + + /** + * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap XMLNS Prefix Map}'. + * + * + * @return the meta object for the map 'XMLNS Prefix Map'. + * @see org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap() + * @see #getDocumentRoot() + * @generated + */ + public EReference getDocumentRoot_XMLNSPrefixMap() + { + return (EReference)documentRootEClass.getEStructuralFeatures().get(1); + } + + /** + * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXSISchemaLocation XSI Schema Location}'. + * + * + * @return the meta object for the map 'XSI Schema Location'. + * @see org.eclipse.emf.ecore.EObject#getXSISchemaLocation() + * @see #getDocumentRoot() + * @generated + */ + public EReference getDocumentRoot_XSISchemaLocation() + { + return (EReference)documentRootEClass.getEStructuralFeatures().get(2); + } + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getStockQuote Stock Quote}'. + * + * + * @return the meta object for the containment reference 'Stock Quote'. + * @see org.eclipse.emf.ecore.EObject#getStockQuote() + * @see #getDocumentRoot() + * @generated + */ + public EReference getDocumentRoot_StockQuote() + { + return (EReference)documentRootEClass.getEStructuralFeatures().get(3); + } + + /** + * Returns the meta object for class '{@link com.example.simple.Quote Quote}'. + * + * + * @return the meta object for class 'Quote'. + * @see com.example.simple.Quote + * @generated + */ + public EClass getQuote() + { + return quoteEClass; + } + + /** + * Returns the meta object for the attribute '{@link com.example.simple.Quote#getSymbol Symbol}'. + * + * + * @return the meta object for the attribute 'Symbol'. + * @see com.example.simple.Quote#getSymbol() + * @see #getQuote() + * @generated + */ + public EAttribute getQuote_Symbol() + { + return (EAttribute)quoteEClass.getEStructuralFeatures().get(0); + } + + /** + * Returns the meta object for the attribute '{@link com.example.simple.Quote#getCompanyName Company Name}'. + * + * + * @return the meta object for the attribute 'Company Name'. + * @see com.example.simple.Quote#getCompanyName() + * @see #getQuote() + * @generated + */ + public EAttribute getQuote_CompanyName() + { + return (EAttribute)quoteEClass.getEStructuralFeatures().get(1); + } + + /** + * Returns the meta object for the attribute '{@link com.example.simple.Quote#getPrice Price}'. + * + * + * @return the meta object for the attribute 'Price'. + * @see com.example.simple.Quote#getPrice() + * @see #getQuote() + * @generated + */ + public EAttribute getQuote_Price() + { + return (EAttribute)quoteEClass.getEStructuralFeatures().get(2); + } + + /** + * Returns the meta object for the attribute '{@link com.example.simple.Quote#getOpen1 Open1}'. + * + * + * @return the meta object for the attribute 'Open1'. + * @see com.example.simple.Quote#getOpen1() + * @see #getQuote() + * @generated + */ + public EAttribute getQuote_Open1() + { + return (EAttribute)quoteEClass.getEStructuralFeatures().get(3); + } + + /** + * Returns the meta object for the attribute '{@link com.example.simple.Quote#getHigh High}'. + * + * + * @return the meta object for the attribute 'High'. + * @see com.example.simple.Quote#getHigh() + * @see #getQuote() + * @generated + */ + public EAttribute getQuote_High() + { + return (EAttribute)quoteEClass.getEStructuralFeatures().get(4); + } + + /** + * Returns the meta object for the attribute '{@link com.example.simple.Quote#getLow Low}'. + * + * + * @return the meta object for the attribute 'Low'. + * @see com.example.simple.Quote#getLow() + * @see #getQuote() + * @generated + */ + public EAttribute getQuote_Low() + { + return (EAttribute)quoteEClass.getEStructuralFeatures().get(5); + } + + /** + * Returns the meta object for the attribute '{@link com.example.simple.Quote#getVolume Volume}'. + * + * + * @return the meta object for the attribute 'Volume'. + * @see com.example.simple.Quote#getVolume() + * @see #getQuote() + * @generated + */ + public EAttribute getQuote_Volume() + { + return (EAttribute)quoteEClass.getEStructuralFeatures().get(6); + } + + /** + * Returns the meta object for the attribute '{@link com.example.simple.Quote#getChange1 Change1}'. + * + * + * @return the meta object for the attribute 'Change1'. + * @see com.example.simple.Quote#getChange1() + * @see #getQuote() + * @generated + */ + public EAttribute getQuote_Change1() + { + return (EAttribute)quoteEClass.getEStructuralFeatures().get(7); + } + + /** + * Returns the meta object for the containment reference list '{@link com.example.simple.Quote#getQuotes Quotes}'. + * + * + * @return the meta object for the containment reference list 'Quotes'. + * @see com.example.simple.Quote#getQuotes() + * @see #getQuote() + * @generated + */ + public EReference getQuote_Quotes() + { + return (EReference)quoteEClass.getEStructuralFeatures().get(8); + } + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + public SimpleFactory getSimpleFactory() + { + return (SimpleFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + documentRootEClass = createEClass(DOCUMENT_ROOT); + createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED); + createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP); + createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); + createEReference(documentRootEClass, DOCUMENT_ROOT__STOCK_QUOTE); + + quoteEClass = createEClass(QUOTE); + createEAttribute(quoteEClass, QUOTE__SYMBOL); + createEAttribute(quoteEClass, QUOTE__COMPANY_NAME); + createEAttribute(quoteEClass, QUOTE__PRICE); + createEAttribute(quoteEClass, QUOTE__OPEN1); + createEAttribute(quoteEClass, QUOTE__HIGH); + createEAttribute(quoteEClass, QUOTE__LOW); + createEAttribute(quoteEClass, QUOTE__VOLUME); + createEAttribute(quoteEClass, QUOTE__CHANGE1); + createEReference(quoteEClass, QUOTE__QUOTES); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI); + + // Add supertypes to classes + + // Initialize classes and features; add operations and parameters + initEClass(documentRootEClass, null, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDocumentRoot_StockQuote(), this.getQuote(), null, "stockQuote", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + + initEClass(quoteEClass, Quote.class, "Quote", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getQuote_Symbol(), theXMLTypePackage.getString(), "symbol", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getQuote_CompanyName(), theXMLTypePackage.getString(), "companyName", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getQuote_Price(), theXMLTypePackage.getDecimal(), "price", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getQuote_Open1(), theXMLTypePackage.getDecimal(), "open1", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getQuote_High(), theXMLTypePackage.getDecimal(), "high", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getQuote_Low(), theXMLTypePackage.getDecimal(), "low", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getQuote_Volume(), theXMLTypePackage.getDouble(), "volume", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getQuote_Change1(), theXMLTypePackage.getDouble(), "change1", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getQuote_Quotes(), this.getQuote(), null, "quotes", null, 0, -1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http:///org/eclipse/emf/ecore/util/ExtendedMetaData + createExtendedMetaDataAnnotations(); + } + + /** + * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData. + * + * + * @generated + */ + protected void createExtendedMetaDataAnnotations() + { + String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; + addAnnotation + (documentRootEClass, + source, + new String[] + { + "name", "", + "kind", "mixed" + }); + addAnnotation + (getDocumentRoot_Mixed(), + source, + new String[] + { + "kind", "elementWildcard", + "name", ":mixed" + }); + addAnnotation + (getDocumentRoot_XMLNSPrefixMap(), + source, + new String[] + { + "kind", "attribute", + "name", "xmlns:prefix" + }); + addAnnotation + (getDocumentRoot_XSISchemaLocation(), + source, + new String[] + { + "kind", "attribute", + "name", "xsi:schemaLocation" + }); + addAnnotation + (getDocumentRoot_StockQuote(), + source, + new String[] + { + "kind", "element", + "name", "stockQuote", + "namespace", "##targetNamespace" + }); + addAnnotation + (quoteEClass, + source, + new String[] + { + "name", "Quote", + "kind", "elementOnly" + }); + addAnnotation + (getQuote_Symbol(), + source, + new String[] + { + "kind", "element", + "name", "symbol" + }); + addAnnotation + (getQuote_CompanyName(), + source, + new String[] + { + "kind", "element", + "name", "companyName" + }); + addAnnotation + (getQuote_Price(), + source, + new String[] + { + "kind", "element", + "name", "price" + }); + addAnnotation + (getQuote_Open1(), + source, + new String[] + { + "kind", "element", + "name", "open1" + }); + addAnnotation + (getQuote_High(), + source, + new String[] + { + "kind", "element", + "name", "high" + }); + addAnnotation + (getQuote_Low(), + source, + new String[] + { + "kind", "element", + "name", "low" + }); + addAnnotation + (getQuote_Volume(), + source, + new String[] + { + "kind", "element", + "name", "volume" + }); + addAnnotation + (getQuote_Change1(), + source, + new String[] + { + "kind", "element", + "name", "change1" + }); + addAnnotation + (getQuote_Quotes(), + source, + new String[] + { + "kind", "element", + "name", "quotes" + }); + } + + /** + * + * Defines literals for the meta objects that represent + *
+ * The following features are supported: + *
+<%if (!genClass.getImplementedGenFeatures().isEmpty()) {%> + * The following features are implemented: + *
<%=genFeature.getDefaultValue()%>
.
+ <%}%>
+ <%if (genFeature.getTypeGenEnum() != null) {%>
+ * The literals are from the enumeration {@link <%=genFeature.getTypeGenEnum().getQualifiedName()%>}.
+ <%}%>
+ <%if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); %>
+ <%if (!reverseGenFeature.isSuppressedGetVisibility()) {%>
+ * It is bidirectional and its opposite is '{@link <%=reverseGenFeature.getGenClass().getQualifiedInterfaceName()%>#<%=reverseGenFeature.getGetAccessor()%> <%=reverseGenFeature.getFormattedName()%>}'.
+ <%}%>
+ <%}%>
+ *
+ <%if (!genFeature.hasDocumentation()) {%>
+ * + * If the meaning of the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> isn't clear, + * there really should be more of a description here... + *
+ <%}%> + * + <%if (genFeature.hasDocumentation()) {%> + * + * <%=genFeature.getDocumentation(genModel.getIndentation(stringBuffer))%> + * + <%}%> + * @return the value of the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>. + <%if (genFeature.getTypeGenEnum() != null) {%> + * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%> + <%}%> + <%if (genFeature.isUnsettable()) {%> + <%if (!genFeature.isSuppressedIsSetVisibility()) {%> + * @see #isSet<%=genFeature.getAccessorName()%>() + <%}%> + <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%> + * @see #unset<%=genFeature.getAccessorName()%>() + <%}%> + <%}%> + <%if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%> + * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>) + <%}%> + <%if (!genModel.isSuppressEMFMetaData()) {%> + * @see <%=genPackage.getQualifiedPackageInterfaceName()%>#get<%=genFeature.getFeatureAccessorName()%>() + <%}%> + <%if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); %> + <%if (!reverseGenFeature.isSuppressedGetVisibility()) {%> + * @see <%=reverseGenFeature.getGenClass().getQualifiedInterfaceName()%>#<%=reverseGenFeature.getGetAccessor()%> + <%}%> + <%}%> + <%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genFeature.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%> + * @model <%=modelInfo%> + <%} else {%> + * <%=modelInfo%> + <%}} if (first) {%> + * @model + <%}}%> + * @generated + */ +<%} else {%> + /** + * + * + * @generated + */ +<%}%> +<%if (!isImplementation) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getGetAccessor()%>(); + +<%} else {%> + public <%=genFeature.getImportedType()%> <%=genFeature.getGetAccessor()%>() + { +<%@ include file="Class/getGenFeature.pre.insert.javajetinc" fail="silent" %> + <%if (genModel.isReflectiveDelegation()) {%> + return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(<%=genFeature.getQualifiedFeatureAccessor()%>, true)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>; + <%} else if (!genFeature.isVolatile()) {%> + <%if (genFeature.isListType()) {%> + <%if (genModel.isVirtualDelegation()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); + <%}%> + if (<%=genFeature.getSafeName()%> == null) + { + <%if (genModel.isVirtualDelegation()) {%> + eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%> = new <%=genClass.getListConstructor(genFeature)%>); + <%} else { + if (genFeature.getImportedType().equals("Sequence")){%> + <%=genFeature.getSafeName()%> = createSequence(<%=genFeature.getUpperName()%>); + <%} else {%> + <%=genFeature.getSafeName()%> = createPropertyList(ListKind.CONTAINMENT, <%=genClass.getName()%>.class, <%=genFeature.getUpperName()%>); + <%}%> + <%}%> + } + return <%=genFeature.getSafeName()%><%=genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""%>; + <%} else if (genFeature.isContainer()) {%> + if (eContainerFeatureID != <%=genFeature.getUpperName()%>) return null; + return (<%=genFeature.getImportedType()%>)eContainer(); + <%} else {%> + <%if (genFeature.isResolveProxies()) {%> + <%if (genModel.isVirtualDelegation()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isReferenceType()) {%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>); + <%}%> + if (<%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeNameAsEObject()%>.isProxy()) + { + <%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> old<%=genFeature.getCapName()%> = (<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>; + <%=genFeature.getSafeName()%> = <%=genFeature.getNonEObjectInternalTypeCast()%>eResolveProxy(old<%=genFeature.getCapName()%>); + if (<%=genFeature.getSafeName()%> != old<%=genFeature.getCapName()%>) + { + <%if (genFeature.isEffectiveContains()) {%> + <%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> new<%=genFeature.getCapName()%> = (<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>; + <%if (!genFeature.isBidirectional()) {%> + ChangeContext changeContext = old<%=genFeature.getCapName()%>.inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, null); + <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> + <%=genModel.getImportedName("org.eclipse.emf.common.notify.ChangeContext")%> changeContext = old<%=genFeature.getCapName()%>.inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, null); + <%}%> + if (new<%=genFeature.getCapName()%>.eInternalContainer() == null) + { + <%if (!genFeature.isBidirectional()) {%> + changeContext = new<%=genFeature.getCapName()%>.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); + <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> + changeContext = new<%=genFeature.getCapName()%>.eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); + <%}%> + } + if (changeContext != null) changeContext.dispatch(); + <%} else if (genModel.isVirtualDelegation()) {%> + eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%>); + <%}%> + <%if (!genModel.isSuppressNotification()) {%> + if (isNotifying()) + notify(ChangeKind.RESOLVE, <%=genFeature.getUpperName()%>, old<%=genFeature.getCapName()%>, <%=genFeature.getSafeName()%>); + <%}%> + } + } + <%}%> + <%if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> + return (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isReferenceType()) {%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>); + <%} else if (genClass.isFlag(genFeature)) {%> + return (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0; + <%} else {%> + return <%=genFeature.getSafeName()%>; + <%}%> + <%}%> + <%} else {//volatile%> + <%if (genFeature.isResolveProxies() && !genFeature.isListType()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = basicGet<%=genFeature.getAccessorName()%>(); + return <%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeName()%>.isProxy() ? <%=genFeature.getNonEObjectInternalTypeCast()%>eResolveProxy((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>) : <%=genFeature.getSafeName()%>; + <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> + <%if (genFeature.isFeatureMapType()) {%> + <%if (delegateFeature.isWrappedFeatureMapType()) {%> + return create<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); + <%} else {%> + return (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)get<%=delegateFeature.getAccessorName()%>()).list(<%=genFeature.getQualifiedFeatureAccessor()%>); + <%}%> + <%} else if (genFeature.isListType()) {%> + <%if (delegateFeature.isWrappedFeatureMapType()) {%> + return get<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); + + <%} else {%> + return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)get<%=delegateFeature.getAccessorName()%>()).list(<%=genFeature.getQualifiedFeatureAccessor()%>); + <%}%> + <%} else {%> + <%if (delegateFeature.isWrappedFeatureMapType()) {%> + return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>; + <%} else {%> + return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>; + <%}%> + <%}%> + <%} else {%> +<%@ include file="Class/getGenFeature.TODO.override.javajetinc" fail="alternative" %> +<%@ start %> + // TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); +<%@ end %><%//Class/getGenFeature.todo.override.javajetinc%> + <%}%> + <%}%> + } + +<%}%> +<%@ end %><%//Class/getGenFeature.override.javajetinc%> + <%}%> + <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) {%> +<%@ include file="Class/basicGetGenFeature.override.javajetinc" fail="alternative" %> +<%@ start %> + /** + * + * + * @generated + */ + public <%=genFeature.getImportedType()%> basicGet<%=genFeature.getAccessorName()%>() + { +<%@ include file="Class/basicGetGenFeature.pre.insert.javajetinc" fail="silent" %> + <%if (genFeature.isContainer()) {%> + if (eContainerFeatureID != <%=genFeature.getUpperName()%>) return null; + return (<%=genFeature.getImportedType()%>)eInternalContainer(); + <%} else if (!genFeature.isVolatile()) {%> + <%if (genModel.isVirtualDelegation()) {%> + return (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); + <%} else {%> + return <%=genFeature.getSafeName()%>; + <%}%> + <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> + <%if (delegateFeature.isWrappedFeatureMapType()) {%> + return (<%=genFeature.getImportedType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); + <%} else {%> + return (<%=genFeature.getImportedType()%>)get<%=delegateFeature.getAccessorName()%>().get(<%=genFeature.getQualifiedFeatureAccessor()%>, false); + <%}%> + <%} else {%> +<%@ include file="Class/basicGetGenFeature.TODO.override.javajetinc" fail="alternative" %> +<%@ start %> + // TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> + // -> do not perform proxy resolution + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); +<%@ end %><%//Class/basicGetGenFeature.todo.override.javajetinc%> + <%}%> + } + +<%@ end %><%//Class/basicGetGenFeature.override.javajetinc%> + <%}%> + <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) {%> +<%@ include file="Class/basicSetGenFeature.override.javajetinc" fail="alternative" %> +<%@ start %> + /** + * + * + * @generated + */ + public ChangeContext basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedInternalType()%> new<%=genFeature.getCapName()%>, ChangeContext changeContext) + { + <%if (!genFeature.isVolatile()) {%> +<%@ include file="Class/basicSetGenFeature.pre.insert.javajetinc" fail="silent" %> + <%if (genModel.isVirtualDelegation()) {%> + Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>); + <%} else {%> + <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>; + <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%>; + <%}%> + <%if (genFeature.isUnsettable()) {%> + <%if (genModel.isVirtualDelegation()) {%> + boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE; + <%} else if (genClass.isESetFlag(genFeature)) {%> + boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; + <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG; + <%} else {%> + boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; + <%=genFeature.getUncapName()%>_set_ = true; + <%}%> + <%}%> + <%if (!genModel.isSuppressNotification()) {%> + if (isNotifying()) + { + <%if (genFeature.isUnsettable()) {%> + <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>); + <%} else {%> + <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>); + <%}%> + if (changeContext == null) changeContext = notification; else changeContext.add(notification); + } + <%}%> +<%@ include file="Class/basicSetGenFeature.post.insert.javajetinc" fail="silent" %> + return changeContext; + <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> + <%if (delegateFeature.isWrappedFeatureMapType()) {%> + return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap()).basicAdd(<%=genFeature.getQualifiedFeatureAccessor()%>, new<%=genFeature.getCapName()%>, changeContext); + <%} else {%> + return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).basicAdd(<%=genFeature.getQualifiedFeatureAccessor()%>, new<%=genFeature.getCapName()%>, changeContext); + <%}%> + <%} else {%> +<%@ include file="Class/basicSetGenFeature.TODO.override.javajetinc" fail="alternative" %> +<%@ start %> + // TODO: implement this method to set the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> + // -> this method is automatically invoked to keep the containment relationship in synch + // -> do not modify other features + // -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first) + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); +<%@ end %><%//Class/basicSetGenFeature.todo.override.javajetinc%> + <%}%> + } + +<%@ end %><%//Class/basicSetGenFeature.override.javajetinc%> + <%}%> + <%if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) {%> +<%@ include file="Class/setGenFeature.override.javajetinc" fail="alternative" %> +<%@ start %> +<%if (isInterface) { %> + /** + * Sets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%>. + * + * + * @param value the new value of the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>. + <%if (genFeature.isEnumType()) {%> + * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%> + <%}%> + <%if (genFeature.isUnsettable()) {%> + <%if (!genFeature.isSuppressedIsSetVisibility()) {%> + * @see #isSet<%=genFeature.getAccessorName()%>() + <%}%> + <%if (!genFeature.isSuppressedUnsetVisibility()) {%> + * @see #unset<%=genFeature.getAccessorName()%>() + <%}%> + <%}%> + * @see #<%=genFeature.getGetAccessor()%>() + * @generated + */ +<%} else {%> + /** + * + * + * @generated + */ +<%}%> +<%if (!isImplementation) { %> + void set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%> value); + +<%} else {%> + public void set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%> new<%=genFeature.getCapName()%>) + { +<%@ include file="Class/setGenFeature.pre.insert.javajetinc" fail="alternative" %> + <%if (genModel.isReflectiveDelegation()) {%> + _set_(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()) {%>)<%}%>); + <%} else if (!genFeature.isVolatile()) {%> + <%if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> + if (new<%=genFeature.getCapName()%> != eInternalContainer() || (eContainerFeatureID != <%=genFeature.getUpperName()%> && new<%=genFeature.getCapName()%> != null)) + { + if (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil")%>.isAncestor(this, <%=genFeature.getEObjectCast()%>new<%=genFeature.getCapName()%>)) + throw new <%=genModel.getImportedName("java.lang.IllegalArgumentException")%>("Recursive containment not allowed for " + toString());<%=genModel.getNonNLS()%> + ChangeContext changeContext = null; + if (eInternalContainer() != null) + changeContext = eBasicRemoveFromContainer(changeContext); + if (new<%=genFeature.getCapName()%> != null) + changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); + changeContext = eBasicSetContainer((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>, <%=genFeature.getUpperName()%>, changeContext); + if (changeContext != null) changeContext.dispatch(); + } + <%if (!genModel.isSuppressNotification()) {%> + else if (isNotifying()) + notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>); + <%}%> + <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%> + <%if (genModel.isVirtualDelegation()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); + <%}%> + if (new<%=genFeature.getCapName()%> != <%=genFeature.getSafeName()%>) + { + ChangeContext changeContext = null; + if (<%=genFeature.getSafeName()%> != null) + <%if (!genFeature.isBidirectional()) {%> + changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); + if (new<%=genFeature.getCapName()%> != null) + changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); + <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> + changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); + if (new<%=genFeature.getCapName()%> != null) + changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); + <%}%> + changeContext = basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>, changeContext); + if (changeContext != null) changeContext.dispatch(); + } + <%if (genFeature.isUnsettable()) {%> + else + { + <%if (genModel.isVirtualDelegation()) {%> + boolean old<%=genFeature.getCapName()%>_set_ = eVirtualIsSet(<%=genFeature.getUpperName()%>); + <%} else if (genClass.isESetFlag(genFeature)) {%> + <%if (!genModel.isSuppressNotification()) {%> + boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; + <%}%> + <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG; + <%} else {%> + <%if (!genModel.isSuppressNotification()) {%> + boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; + <%}%> + <%=genFeature.getUncapName()%>_set_ = true; + <%}%> + <%if (!genModel.isSuppressNotification()) {%> + if (isNotifying()) + notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>, !old<%=genFeature.getCapName()%>_set_); + <%}%> + } + <%} else {%> + <%if (!genModel.isSuppressNotification()) {%> + else if (isNotifying()) + notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>); + <%}%> + <%}%> + <%} else {%> + <%if (genClass.isFlag(genFeature)) {%> + <%if (!genModel.isSuppressNotification()) {%> + <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0; + <%}%> + if (new<%=genFeature.getCapName()%>) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG; + <%} else {%> + <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%> + <%if (!genModel.isSuppressNotification()) {%> + <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>; + <%}%> + <%}%> + <%if (genFeature.isEnumType()) {%> + <%if (genModel.isVirtualDelegation()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getUpperName()%>_DEFAULT_ : new<%=genFeature.getCapName()%>; + <%} else {%> + <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getUpperName()%>_DEFAULT_ : new<%=genFeature.getCapName()%>; + <%}%> + <%} else {%> + <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>; + <%} else {%> + <%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>; + <%}%> + <%}%> + <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> + Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%>); + <%}%> + <%}%> + <%if (genFeature.isUnsettable()) {%> + <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> + boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE; + <%} else if (genClass.isESetFlag(genFeature)) {%> + <%if (!genModel.isSuppressNotification()) {%> + boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; + <%}%> + <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG; + <%} else {%> + <%if (!genModel.isSuppressNotification()) {%> + boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; + <%}%> + <%=genFeature.getUncapName()%>_set_ = true; + <%}%> + <%if (!genModel.isSuppressNotification()) {%> + if (isNotifying()) + notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? <%if (genFeature.isReferenceType()) {%>null<%} else {%><%=genFeature.getUpperName()%>_DEFAULT_<%}%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>); + <%}%> + <%} else {%> + <%if (!genModel.isSuppressNotification()) {%> + if (isNotifying()) + notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? <%if (genFeature.isReferenceType()) {%>null<%} else {%><%=genFeature.getUpperName()%>_DEFAULT_<%}%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>); + <%}%> + <%}%> + <%}%> +<%@ include file="Class/setGenFeature.post.insert.javajetinc" fail="silent" %> + <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> + <%if (delegateFeature.isWrappedFeatureMapType()) {%> + set(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>, <%if (genFeature.isPrimitiveType()){%> new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>); + <%} else {%> + ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).set(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>); + <%}%> + <%} else {%> +<%@ include file="Class/setGenFeature.TODO.override.javajetinc" fail="alternative" %> +<%@ start %> + // TODO: implement this method to set the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); +<%@ end %><%//Class/setGenFeature.todo.override.javajetinc%> + <%}%> + } + +<%}%> +<%@ end %><%//Class/setGenFeature.override.javajetinc%> + <%}%> + <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) {%> +<%@ include file="Class/basicUnsetGenFeature.override.javajetinc" fail="alternative" %> +<%@ start %> + /** + * + * + * @generated + */ + public ChangeContext basicUnset<%=genFeature.getAccessorName()%>(ChangeContext changeContext) + { + <%if (!genFeature.isVolatile()) {%> + <%if (genModel.isVirtualDelegation()) {%> + Object old<%=genFeature.getCapName()%> = eVirtualUnset(<%=genFeature.getUpperName()%>); + <%} else {%> + <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>; + <%=genFeature.getSafeName()%> = null; + <%}%> + <%if (genModel.isVirtualDelegation()) {%> + boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE; + <%} else if (genClass.isESetFlag(genFeature)) {%> + boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; + <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG; + <%} else {%> + boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; + <%=genFeature.getUncapName()%>_set_ = false; + <%}%> + <%if (!genModel.isSuppressNotification()) {%> + if (isNotifying()) + { + <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>); + if (changeContext == null) changeContext = notification; else changeContext.add(notification); + } + return changeContext; + <%}%> + <%} else {%> +<%@ include file="Class/basicUnsetGenFeature.TODO.override.javajetinc" fail="alternative" %> +<%@ start %> + // TODO: implement this method to unset the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> + // -> this method is automatically invoked to keep the containment relationship in synch + // -> do not modify other features + // -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first) + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); +<%@ end %><%//Class/basicUnsetGenFeature.todo.override.javajetinc%> + <%}%> + } + +<%@ end %><%//Class.basicUnsetGenFeature.override.javajetinc%> + <%}%> + <%if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) {%> +<%@ include file="Class/unsetGenFeature.override.javajetinc" fail="alternative" %> +<%@ start %> +<%if (isInterface) {%> + /** + * Unsets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%>. + * + * + <%if (!genFeature.isSuppressedIsSetVisibility()) {%> + * @see #isSet<%=genFeature.getAccessorName()%>() + <%}%> + * @see #<%=genFeature.getGetAccessor()%>() + <%if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%> + * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>) + <%}%> + * @generated + */ +<%} else {%> + /** + * + * + * @generated + */ +<%}%> +<%if (!isImplementation) {%> + void unset<%=genFeature.getAccessorName()%>(); + +<%} else {%> + public void unset<%=genFeature.getAccessorName()%>() + { + <%if (genModel.isReflectiveDelegation()) {%> + unset(<%=genFeature.getQualifiedFeatureAccessor()%>); + <%} else if (!genFeature.isVolatile()) {%> + <%if (genFeature.isListType()) {%> + ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable)get<%=genFeature.getAccessorName()%>()).unset(); + <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%> + <%if (genModel.isVirtualDelegation()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); + <%}%> + if (<%=genFeature.getSafeName()%> != null) + { + ChangeContext changeContext = null; + <%if (!genFeature.isBidirectional()) {%> + changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); + <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> + changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); + <%}%> + changeContext = basicUnset<%=genFeature.getAccessorName()%>(changeContext); + if (changeContext != null) changeContext.dispatch(); + } + else + { + <%if (genModel.isVirtualDelegation()) {%> + boolean old<%=genFeature.getCapName()%>_set_ = eVirtualIsSet(<%=genFeature.getUpperName()%>); + <%} else if (genClass.isESetFlag(genFeature)) {%> + <%if (!genModel.isSuppressNotification()) {%> + boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; + <%}%> + <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG; + <%} else {%> + <%if (!genModel.isSuppressNotification()) {%> + boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; + <%}%> + <%=genFeature.getUncapName()%>_set_ = false; + <%}%> + <%if (!genModel.isSuppressNotification()) {%> + if (isNotifying()) + notify(ChangeKind.UNSET, <%=genFeature.getUpperName()%>, null, null, old<%=genFeature.getCapName()%>_set_); + <%}%> + } + <%} else {%> + <%if (genClass.isFlag(genFeature)) {%> + <%if (!genModel.isSuppressNotification()) {%> + <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0; + <%}%> + <%} else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> + Object old<%=genFeature.getCapName()%> = eVirtualUnset(<%=genFeature.getUpperName()%>); + <%} else {%> + <%if (!genModel.isSuppressNotification()) {%> + <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>; + <%}%> + <%}%> + <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> + boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE; + <%} else if (genClass.isESetFlag(genFeature)) {%> + boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; + <%} else {%> + <%if (!genModel.isSuppressNotification()) {%> + boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; + <%}%> + <%}%> + <%if (genFeature.isReferenceType()) {%> + <%=genFeature.getSafeName()%> = null; + <%if (!genModel.isVirtualDelegation()) {%> + <%if (genClass.isESetFlag(genFeature)) {%> + <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG; + <%} else {%> + <%=genFeature.getUncapName()%>_set_ = false; + <%}%> + <%}%> + <%if (!genModel.isSuppressNotification()) {%> + if (isNotifying()) + notify(ChangeKind.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>); + <%}%> + <%} else {%> + <%if (genClass.isFlag(genFeature)) {%> + if (<%=genFeature.getUpperName()%>_DEFAULT_) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG; + <%} else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%> + <%=genFeature.getSafeName()%> = <%=genFeature.getUpperName()%>_DEFAULT_; + <%}%> + <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%> + <%if (genClass.isESetFlag(genFeature)) {%> + <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG; + <%} else {%> + <%=genFeature.getUncapName()%>_set_ = false; + <%}%> + <%}%> + <%if (!genModel.isSuppressNotification()) {%> + if (isNotifying()) + notify(ChangeKind.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? old<%=genFeature.getCapName()%> : <%=genFeature.getUpperName()%>_DEFAULT_<%} else {%>old<%=genFeature.getCapName()%><%}%>, <%=genFeature.getUpperName()%>_DEFAULT_, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>); + <%}%> + <%}%> + <%}%> + <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> + <%if (delegateFeature.isWrappedFeatureMapType()) {%> + unset(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); + <%} else {%> + unset<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>()); + <%}%> + <%} else {%> +<%@ include file="Class/unsetGenFeature.TODO.override.javajetinc" fail="alternative" %> +<%@ start %> + // TODO: implement this method to unset the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); +<%@ end %><%//Class/unsetGenFeature.todo.override.javajetinc%> + <%}%> + } + +<%}%> +<%@ end %><%//Class/unsetGenFeature.override.javajetinc%> + <%}%> + <%if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) {%> +<%@ include file="Class/isSetGenFeature.override.javajetinc" fail="alternative" %> +<%@ start %> +<%if (isInterface) {%> + /** + * Returns whether the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%> is set. + * + * + * @return whether the value of the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> is set. + <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%> + * @see #unset<%=genFeature.getAccessorName()%>() + <%}%> + * @see #<%=genFeature.getGetAccessor()%>() + <%if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) {%> + * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>) + <%}%> + * @generated + */ +<%} else {%> + /** + * + * + * @generated + */ +<%}%> +<%if (!isImplementation) {%> + boolean isSet<%=genFeature.getAccessorName()%>(); + +<%} else {%> + public boolean isSet<%=genFeature.getAccessorName()%>() + { + <%if (genModel.isReflectiveDelegation()) {%> + return isSet(<%=genFeature.getQualifiedFeatureAccessor()%>); + <%} else if (!genFeature.isVolatile()) {%> + <%if (genFeature.isListType()) {%> + <%if (genModel.isVirtualDelegation()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); + <%}%> + return <%=genFeature.getSafeName()%> != null && ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable)<%=genFeature.getSafeName()%>).isSet(); + <%} else {%> + <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> + return eVirtualIsSet(<%=genFeature.getUpperName()%>); + <%} else if (genClass.isESetFlag(genFeature)) {%> + return (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; + <%} else {%> + return <%=genFeature.getUncapName()%>_set_; + <%}%> + <%}%> + <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> + <%if (delegateFeature.isWrappedFeatureMapType()) {%> + return isSet(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); + <%} else {%> + return !((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).isEmpty(<%=genFeature.getQualifiedFeatureAccessor()%>); + <%}%> + <%} else {%> +<%@ include file="Class/isSetGenFeature.TODO.override.javajetinc" fail="alternative" %> +<%@ start %> + // TODO: implement this method to return whether the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> is set + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); +<%@ end %><%//Class/isSetGenFeature.todo.override.javajetinc%> + <%}%> + } + +<%}%> +<%@ end %><%//Class/isSetGenFeature.override.javajetinc%> + <%}%> +<%@ include file="Class/genFeature.insert.javajetinc" fail="silent" %> +<%@ end %><%//Class/genFeature.override.javajetinc%> +<%}//for%> +<%for (Iterator i= (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations()).iterator(); i.hasNext();) { GenOperation genOperation = (GenOperation)i.next();%> +<%@ include file="Class/genOperation.override.javajetinc" fail="alternative" %> +<%@ start %> +<%if (isInterface) {%> + /** + * + * + <%if (genOperation.hasDocumentation()) {%> + * + * <%=genOperation.getDocumentation(genModel.getIndentation(stringBuffer))%> + * + <%}%> + <%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%> + * @model <%=modelInfo%> + <%} else {%> + * <%=modelInfo%> + <%}} if (first) {%> + * @model + <%}}%> + * @generated + */ +<%} else {%> + /** + * + * + * @generated + */ +<%}%> +<%if (!isImplementation) {%> + <%=genOperation.getImportedType()%> <%=genOperation.getName()%>(<%=genOperation.getParameters()%>)<%=genOperation.getThrows()%>; + +<%} else {%> + public <%=genOperation.getImportedType()%> <%=genOperation.getName()%>(<%=genOperation.getParameters()%>)<%=genOperation.getThrows()%> + { + <%if (genOperation.hasBody()) {%> + <%=genOperation.getBody(genModel.getIndentation(stringBuffer))%> + <%} else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = ((GenParameter)genOperation.getGenParameters().get(0)).getName(); String context = ((GenParameter)genOperation.getGenParameters().get(1)).getName();%> + // TODO: implement this method + // -> specify the condition that violates the invariant + // -> verify the details of the diagnostic, including severity and message + // Ensure that you remove @generated or mark it @generated NOT + if (false) + { + if (<%=diagnostics%> != null) + { + <%=diagnostics%>.add + (new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%> + (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR, + <%=opClass.getGenPackage().getImportedValidatorClassName()%>.DIAGNOSTIC_SOURCE, + <%=opClass.getGenPackage().getImportedValidatorClassName()%>.<%=opClass.getOperationID(genOperation)%>, + <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "<%=genOperation.getName()%>", <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")%>.getObjectLabel(this, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%> + new Object [] { this })); + } + return false; + } + return true; + <%} else {%> +<%@ include file="Class/implementedGenOperation.TODO.override.javajetinc" fail="alternative" %> +<%@ start %> + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); +<%@ end %><%//Class/implementedGenOperation.todo.override.javajetinc%> + <%}%> + } + +<%}%> +<%@ include file="Class/genOperation.insert.javajetinc" fail="silent" %> +<%@ end %><%//Class/implementedGenOperation.override.javajetinc%> +<%}//for%> +<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {%> + /** + * + * + * @generated + */ + public ChangeContext eInverseAdd(<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> otherEnd, int propertyIndex, ChangeContext changeContext) + { + switch (propertyIndex) + { +<%for (Iterator i=genClass.getEInverseAddGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> + <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> + case <%=genFeature.getUpperName()%>: + <%if (genFeature.isListType()) {%> + <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%> + return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).basicAdd(otherEnd, changeContext); + <%} else {%> + return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)<%=genFeature.getGetAccessor()%>()).basicAdd(otherEnd, changeContext); + <%}%> + <%} else if (genFeature.isContainer()) {%> + if (eInternalContainer() != null) + changeContext = eBasicRemoveFromContainer(changeContext); + return eBasicSetContainer(otherEnd, <%=genFeature.getUpperName()%>, changeContext); + <%} else {%> + <%if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); + <%}%> + if (<%=genFeature.getSafeName()%> != null) + <%if (genFeature.isEffectiveContains()) {%> + changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); + <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> + changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); + <%}%> + return basicSet<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)otherEnd, changeContext); + <%}%> + <%}%> +<%}%> + } +<%if (genModel.isMinimalReflectiveMethods()) {%> + return super.eInverseAdd(otherEnd, propertyIndex, changeContext); +<%} else {%> + return eDynamicInverseAdd(otherEnd, propertyIndex, changeContext); +<%}%> + } + +<%}%> +<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {%> + /** + * + * + * @generated + */ + public ChangeContext inverseRemove(<%=genModel.getImportedName("java.lang.Object")%> otherEnd, int propertyIndex, ChangeContext changeContext) + { + switch (propertyIndex) + { +<%for (Iterator i=genClass.getEInverseRemoveGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> + <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> + case <%=genFeature.getUpperName()%>: + <%if (genFeature.isListType()) {%> + <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%> + return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).basicRemove(otherEnd, changeContext); + <%} else if (genFeature.isWrappedFeatureMapType()) {%> + return removeFrom<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>(), otherEnd, changeContext); + <%} else {%> + return removeFromList(<%=genFeature.getGetAccessor()%>(), otherEnd, changeContext); + <%}%> + <%} else if (genFeature.isContainer()) {%> + return eBasicSetContainer(null, <%=genFeature.getUpperName()%>, changeContext); + <%} else if (genFeature.isUnsettable()) {%> + return basicUnset<%=genFeature.getAccessorName()%>(changeContext); + <%} else {%> + return basicSet<%=genFeature.getAccessorName()%>(null, changeContext); + <%}%> + <%}%> +<%}%> + } +<%if (genModel.isMinimalReflectiveMethods()) {%> + return super.inverseRemove(otherEnd, propertyIndex, changeContext); +<%} else {%> + return eDynamicInverseRemove(otherEnd, propertyIndex, changeContext); +<%}%> + } + +<%}%> +<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {%> + /** + * + * + * @generated + */ + public ChangeContext eBasicRemoveFromContainerFeature(ChangeContext changeContext) + { + switch (eContainerFeatureID) + { +<%for (Iterator i=genClass.getEBasicRemoveFromContainerGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> + <%GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> + <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> + case <%=genFeature.getUpperName()%>: + return eInternalContainer().inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); + <%}%> +<%}%> + } +<%if (genModel.isMinimalReflectiveMethods()) {%> + return super.eBasicRemoveFromContainerFeature(changeContext); +<%} else {%> + return eDynamicBasicRemoveFromContainer(changeContext); +<%}%> + } + +<%}%> +<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {%> + /** + * + * + * @generated + */ + public Object get(int propertyIndex, boolean resolve) + { + switch (propertyIndex) + { +<%for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> + <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> + case <%=genFeature.getUpperName()%>: + <%if (genFeature.isPrimitiveType()) {%> + <%if (genFeature.isBooleanType()) {%> + return <%=genFeature.getGetAccessor()%>() ? Boolean.TRUE : Boolean.FALSE; + <%} else {%> + return new <%=genFeature.getObjectType()%>(<%=genFeature.getGetAccessor()%>()); + <%}%> + <%} else if (genFeature.isResolveProxies() && !genFeature.isListType()) {%> + if (resolve) return <%=genFeature.getGetAccessor()%>(); + return basicGet<%=genFeature.getAccessorName()%>(); + <%} else if (genFeature.isMapType()) {%> + <%if (genFeature.isEffectiveSuppressEMFTypes()) {%> + if (coreType) return ((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap(); + else return <%=genFeature.getGetAccessor()%>(); + <%} else {%> + if (coreType) return <%=genFeature.getGetAccessor()%>(); + else return <%=genFeature.getGetAccessor()%>().map(); + <%}%> + <%} else if (genFeature.isWrappedFeatureMapType()) {%> + // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view + //if (coreType) + return <%=genFeature.getGetAccessor()%>(); + <%} else if (genFeature.isFeatureMapType()) {%> + if (coreType) return <%=genFeature.getGetAccessor()%>(); + return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).getWrapper(); + <%} else {%> + return <%=genFeature.getGetAccessor()%>(); + <%}%> + <%}%> +<%}%> + } +<%if (genModel.isMinimalReflectiveMethods()) {%> + return super.get(propertyIndex, resolve); +<%} else {%> + return eDynamicGet(propertyIndex, resolve, coreType); +<%}%> + } + +<%}%> +<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {%> + /** + * + * + * @generated + */ + public void set(int propertyIndex, Object newValue) + { + switch (propertyIndex) + { +<%for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> + <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> + case <%=genFeature.getUpperName()%>: + <%if (genFeature.isListType()) {%> + <%if (genFeature.isWrappedFeatureMapType()) {%> + set<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>(), newValue); + <%} else if (genFeature.isFeatureMapType()) {%> + ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).set(newValue); + <%} else if (genFeature.isMapType()) {%> + <%if (genFeature.isEffectiveSuppressEMFTypes()) {%> + ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).set(newValue); + <%} else {%> + ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)<%=genFeature.getGetAccessor()%>()).set(newValue); + <%}%> + <%} else {%> + <%=genFeature.getGetAccessor()%>().clear(); + <%=genFeature.getGetAccessor()%>().addAll((<%=genModel.getImportedName("java.util.Collection")%>)newValue); + <%}%> + <%} else if (genFeature.isPrimitiveType()) {%> + set<%=genFeature.getAccessorName()%>(((<%=genFeature.getObjectType()%>)newValue).<%=genFeature.getPrimitiveValueFunction()%>()); + <%} else {%> + set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)newValue); + <%}%> + return; + <%}%> +<%}%> + } +<%if (genModel.isMinimalReflectiveMethods()) {%> + super.set(propertyIndex, newValue); +<%} else {%> + eDynamicSet(propertyIndex, newValue); +<%}%> + } + + /** + * + * + * @generated + */ + public void unset(int propertyIndex) + { + switch (propertyIndex) + { +<%for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> + <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> + case <%=genFeature.getUpperName()%>: + <%if (genFeature.isListType() && !genFeature.isUnsettable()) {%> + <%if (genFeature.isWrappedFeatureMapType()) {%> + unset<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>()); + <%} else {%> + <%=genFeature.getGetAccessor()%>().clear(); + <%}%> + <%} else if (genFeature.isUnsettable()) {%> + unset<%=genFeature.getAccessorName()%>(); + <%} else if (genFeature.isReferenceType()) {%> + set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)null); + <%} else {%> + set<%=genFeature.getAccessorName()%>(<%=genFeature.getUpperName()%>_DEFAULT_); + <%}%> + return; + <%}%> +<%}%> + } +<%if (genModel.isMinimalReflectiveMethods()) {%> + super.unset(propertyIndex); +<%} else {%> + eDynamicUnset(propertyIndex); +<%}%> + } + +<%}%> +<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {%> +<%@ include file="Class/eIsSet.override.javajetinc" fail="alternative" %> +<%@ start %> + /** + * + * + * @generated + */ + public boolean isSet(int propertyIndex) + { + switch (propertyIndex) + { +<%for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> + <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> + case <%=genFeature.getUpperName()%>: + <%if (genFeature.isListType() && !genFeature.isUnsettable()) {%> + <%if (genFeature.isWrappedFeatureMapType()) {%> + <%if (genFeature.isVolatile()) {%> + return !is<%=genFeature.getImportedType()%>Empty(<%=genFeature.getGetAccessor()%>()); + <%} else {%> + // KDK - should this be !isSequenceEmpty? + return <%=genFeature.getSafeName()%> != null && !is<%=genFeature.getImportedType()%>Empty(<%=genFeature.getGetAccessor()%>()); + <%}%> + <%} else {%> + <%if (genClass.isField(genFeature)) {%> + return <%=genFeature.getSafeName()%> != null && !<%=genFeature.getSafeName()%>.isEmpty(); + <%} else {%> + <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); + return <%=genFeature.getSafeName()%> != null && !<%=genFeature.getSafeName()%>.isEmpty(); + <%} else {%> + return !<%=genFeature.getGetAccessor()%>().isEmpty(); + <%}%> + <%}%> + <%}%> + <%} else if (genFeature.isUnsettable()) {%> + return isSet<%=genFeature.getAccessorName()%>(); + <%} else if (genFeature.isResolveProxies()) {%> + <%if (genClass.isField(genFeature)) {%> + return <%=genFeature.getSafeName()%> != null; + <%} else {%> + <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> + return eVirtualGet(<%=genFeature.getUpperName()%>) != null; + <%} else {%> + return basicGet<%=genFeature.getAccessorName()%>() != null; + <%}%> + <%}%> + <%} else if (genFeature.isReferenceType()) {%> + <%if (genClass.isField(genFeature)) {%> + return <%=genFeature.getSafeName()%> != null; + <%} else {%> + <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> + return eVirtualGet(<%=genFeature.getUpperName()%>) != null; + <%} else {%> + return <%=genFeature.getGetAccessor()%>() != null; + <%}%> + <%}%> + <%} else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {%> + <%if (genClass.isField(genFeature)) {%> + <%if (genClass.isFlag(genFeature)) {%> + return ((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0) != <%=genFeature.getUpperName()%>_DEFAULT_; + <%} else {%> + return <%=genFeature.getSafeName()%> != <%=genFeature.getUpperName()%>_DEFAULT_; + <%}%> + <%} else {%> + <%if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> + return eVirtualGet(<%=genFeature.getUpperName()%>, <%=genFeature.getUpperName()%>_DEFAULT_) != <%=genFeature.getUpperName()%>_DEFAULT_; + <%} else {%> + return <%=genFeature.getGetAccessor()%>() != <%=genFeature.getUpperName()%>_DEFAULT_; + <%}%> + <%}%> + <%} else {//datatype%> + <%if (genClass.isField(genFeature)) {%> + return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getSafeName()%> != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getSafeName()%>); + <%} else {%> + <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> + <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>, <%=genFeature.getUpperName()%>_DEFAULT_); + return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getSafeName()%> != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getSafeName()%>); + <%} else {%> + return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getGetAccessor()%>() != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getGetAccessor()%>()); + <%}%> + <%}%> + <%}%> + <%}%> +<%}%> + } +<%if (genModel.isMinimalReflectiveMethods()) {%> + return super.isSet(propertyIndex); +<%} else {%> + return eDynamicIsSet(propertyIndex); +<%}%> + } + +<%@ end %><%//Class/eIsSet.override.javajetinc%> +<%}%> +<%if (isImplementation && !genClass.getMixinGenFeatures().isEmpty()) {%> + /** + * + * + * @generated + */ + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + <%for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); %> + if (baseClass == <%=mixinGenClass.getImportedInterfaceName()%>.class) + { + switch (derivedFeatureID) + { + <%for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); %> + case <%=genFeature.getUpperName()%>: return <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>; + <%}%> + default: return -1; + } + } + <%}%> + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) + { + <%for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); %> + if (baseClass == <%=mixinGenClass.getImportedInterfaceName()%>.class) + { + switch (baseFeatureID) + { + <%for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); %> + case <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>: return <%=genFeature.getUpperName()%>; + <%}%> + default: return -1; + } + } + <%}%> + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +<%}%> +<%if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();%> + <%if (eVirtualValuesField != null) {%> + /** + * + * + * @generated + */ + protected Object[] eVirtualValues() + { + return <%=eVirtualValuesField%>; + } + + /** + * + * + * @generated + */ + protected void setVirtualValues(Object[] newValues) + { + <%=eVirtualValuesField%> = newValues; + } + + <%}%> + <%{ List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());%> + <%if (!eVirtualIndexBitFields.isEmpty()) { List allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList());%> + /** + * + * + * @generated + */ + protected int eVirtualIndexBits(int offset) + { + switch (offset) + { + <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%> + case <%=i%> : + return <%=allEVirtualIndexBitFields.get(i)%>; + <%}%> + default : + throw new IndexOutOfBoundsException(); + } + } + + /** + * + * + * @generated + */ + protected void setVirtualIndexBits(int offset, int newIndexBits) + { + switch (offset) + { + <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%> + case <%=i%> : + <%=allEVirtualIndexBitFields.get(i)%> = newIndexBits; + break; + <%}%> + default : + throw new IndexOutOfBoundsException(); + } + } + + <%}%> + <%}%> +<%}%> +<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {%> + /** + * + * + * @generated + */ + public String toString() + { + if (isProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + <%{ boolean first = true;%> + <%for (Iterator i=genClass.getToStringGenFeatures().iterator(); i.hasNext(); ) { GenFeature genFeature = (GenFeature)i.next();%> + <%if (first) { first = false;%> + result.append(" (<%=genFeature.getName()%>: ");<%=genModel.getNonNLS()%> + <%} else {%> + result.append(", <%=genFeature.getName()%>: ");<%=genModel.getNonNLS()%> + <%}%> + <%if (genFeature.isUnsettable() && !genFeature.isListType()) {%> + <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> + if (eVirtualIsSet(<%=genFeature.getUpperName()%>)) result.append(eVirtualGet(<%=genFeature.getUpperName()%>)); else result.append("