001// license-header java merge-point 002// 003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify! 004// 005package org.andromda.cartridges.meta.metafacades; 006 007import java.util.Collection; 008import org.andromda.core.common.Introspector; 009import org.andromda.core.metafacade.MetafacadeBase; 010import org.andromda.core.metafacade.MetafacadeFactory; 011import org.andromda.core.metafacade.ModelValidationMessage; 012import org.andromda.metafacades.uml.AssociationEndFacade; 013import org.andromda.metafacades.uml.AssociationFacade; 014import org.andromda.metafacades.uml.ClassifierFacade; 015import org.andromda.metafacades.uml.ConstraintFacade; 016import org.andromda.metafacades.uml.DependencyFacade; 017import org.andromda.metafacades.uml.ModelElementFacade; 018import org.andromda.metafacades.uml.ModelFacade; 019import org.andromda.metafacades.uml.PackageFacade; 020import org.andromda.metafacades.uml.StateMachineFacade; 021import org.andromda.metafacades.uml.StereotypeFacade; 022import org.andromda.metafacades.uml.TaggedValueFacade; 023import org.andromda.metafacades.uml.TemplateParameterFacade; 024import org.andromda.metafacades.uml.TypeMappings; 025 026/** 027 * Represents the association end of a metafacade 028 * MetafacadeLogic for MetafacadeAssociationEnd 029 * 030 * @see MetafacadeAssociationEnd 031 */ 032public abstract class MetafacadeAssociationEndLogic 033 extends MetafacadeBase 034 implements MetafacadeAssociationEnd 035{ 036 /** 037 * The underlying UML object 038 * @see Object 039 */ 040 protected Object metaObject; 041 042 /** Create Metafacade implementation instance using the MetafacadeFactory from the context 043 * @param metaObjectIn 044 * @param context 045 */ 046 protected MetafacadeAssociationEndLogic(Object metaObjectIn, String context) 047 { 048 super(metaObjectIn, getContext(context)); 049 this.superAssociationEndFacade = 050 (AssociationEndFacade) 051 MetafacadeFactory.getInstance().createFacadeImpl( 052 "org.andromda.metafacades.uml.AssociationEndFacade", 053 metaObjectIn, 054 getContext(context)); 055 this.metaObject = metaObjectIn; 056 } 057 058 /** 059 * Gets the context for this metafacade logic instance. 060 * @param context String. Set to MetafacadeAssociationEnd if null 061 * @return context String 062 */ 063 private static String getContext(String context) 064 { 065 if (context == null) 066 { 067 context = "org.andromda.cartridges.meta.metafacades.MetafacadeAssociationEnd"; 068 } 069 return context; 070 } 071 072 private AssociationEndFacade superAssociationEndFacade; 073 private boolean superAssociationEndFacadeInitialized = false; 074 075 /** 076 * Gets the AssociationEndFacade parent instance. 077 * @return this.superAssociationEndFacade AssociationEndFacade 078 */ 079 private AssociationEndFacade getSuperAssociationEndFacade() 080 { 081 if (!this.superAssociationEndFacadeInitialized) 082 { 083 ((MetafacadeBase)this.superAssociationEndFacade).setMetafacadeContext(this.getMetafacadeContext()); 084 this.superAssociationEndFacadeInitialized = true; 085 } 086 return this.superAssociationEndFacade; 087 } 088 089 /** Reset context only for non-root metafacades 090 * @param context 091 * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context) 092 */ 093 @Override 094 public void resetMetafacadeContext(String context) 095 { 096 if (!this.contextRoot) // reset context only for non-root metafacades 097 { 098 context = getContext(context); // to have same value as in original constructor call 099 setMetafacadeContext (context); 100 if (this.superAssociationEndFacadeInitialized) 101 { 102 ((MetafacadeBase)this.superAssociationEndFacade).resetMetafacadeContext(context); 103 } 104 } 105 } 106 107 /** 108 * @return boolean true always 109 * @see MetafacadeAssociationEnd 110 */ 111 public boolean isMetafacadeAssociationEndMetaType() 112 { 113 return true; 114 } 115 116 // --------------- attributes --------------------- 117 118 /** 119 * @see org.andromda.cartridges.meta.metafacades.MetafacadeAssociationEnd#getImplementationOperationName() 120 * @return String 121 */ 122 protected abstract String handleGetImplementationOperationName(); 123 124 private String __implementationOperationName1a; 125 private boolean __implementationOperationName1aSet = false; 126 127 /** 128 * The implementation name for the operation that handles the logic of the association end 129 * retrieval. 130 * @return (String)handleGetImplementationOperationName() 131 */ 132 public final String getImplementationOperationName() 133 { 134 String implementationOperationName1a = this.__implementationOperationName1a; 135 if (!this.__implementationOperationName1aSet) 136 { 137 // implementationOperationName has no pre constraints 138 implementationOperationName1a = handleGetImplementationOperationName(); 139 // implementationOperationName has no post constraints 140 this.__implementationOperationName1a = implementationOperationName1a; 141 if (isMetafacadePropertyCachingEnabled()) 142 { 143 this.__implementationOperationName1aSet = true; 144 } 145 } 146 return implementationOperationName1a; 147 } 148 149 /** 150 * @return true 151 * @see AssociationEndFacade 152 */ 153 public boolean isAssociationEndFacadeMetaType() 154 { 155 return true; 156 } 157 158 /** 159 * @return true 160 * @see ModelElementFacade 161 */ 162 public boolean isModelElementFacadeMetaType() 163 { 164 return true; 165 } 166 167 // ----------- delegates to AssociationEndFacade ------------ 168 /** 169 * A name suitable for use when adding new elements to this association end in programming code. 170 * @see AssociationEndFacade#getAdderName() 171 */ 172 public String getAdderName() 173 { 174 return this.getSuperAssociationEndFacade().getAdderName(); 175 } 176 177 /** 178 * Returns the value of the 'Aggregation' attribute (none, shared, composite). The default value 179 * is "none". The literals are from the enumeration org.eclipse.uml2.uml.AggregationKind. 180 * Specifies the kind of aggregation that applies to the Property. 181 * @see AssociationEndFacade#getAggregationKind() 182 */ 183 public String getAggregationKind() 184 { 185 return this.getSuperAssociationEndFacade().getAggregationKind(); 186 } 187 188 /** 189 * The association owning this association end. 190 * @see AssociationEndFacade#getAssociation() 191 */ 192 public AssociationFacade getAssociation() 193 { 194 return this.getSuperAssociationEndFacade().getAssociation(); 195 } 196 197 /** 198 * UML2: Returns the value of the 'Default' attribute. Specifies a String that represents a 199 * value to be used when no argument is supplied for the Property. A String that is evaluated to 200 * give a default value for the Property when an object of the owning Classifier is 201 * instantiated. Can be something like: new ValueObject(values); 202 * @see AssociationEndFacade#getDefault() 203 */ 204 public String getDefault() 205 { 206 return this.getSuperAssociationEndFacade().getDefault(); 207 } 208 209 /** 210 * A name suitable for use when accessing this association end in programming code. 211 * @see AssociationEndFacade#getGetterName() 212 */ 213 public String getGetterName() 214 { 215 return this.getSuperAssociationEndFacade().getGetterName(); 216 } 217 218 /** 219 * The name of the type that is returned on the accessor and mutator operations, determined in 220 * part by the multiplicity. 221 * @see AssociationEndFacade#getGetterSetterTypeName() 222 */ 223 public String getGetterSetterTypeName() 224 { 225 return this.getSuperAssociationEndFacade().getGetterSetterTypeName(); 226 } 227 228 /** 229 * the lower value for the multiplicity 230 * -only applicable for UML2 231 * @see AssociationEndFacade#getLower() 232 */ 233 public int getLower() 234 { 235 return this.getSuperAssociationEndFacade().getLower(); 236 } 237 238 /** 239 * The other association end owned by this end's association. 240 * @see AssociationEndFacade#getOtherEnd() 241 */ 242 public AssociationEndFacade getOtherEnd() 243 { 244 return this.getSuperAssociationEndFacade().getOtherEnd(); 245 } 246 247 /** 248 * A name suitable for use when removing element from this association end in programming code. 249 * @see AssociationEndFacade#getRemoverName() 250 */ 251 public String getRemoverName() 252 { 253 return this.getSuperAssociationEndFacade().getRemoverName(); 254 } 255 256 /** 257 * A name suitable for use when accessing this association end in programming code. 258 * @see AssociationEndFacade#getSetterName() 259 */ 260 public String getSetterName() 261 { 262 return this.getSuperAssociationEndFacade().getSetterName(); 263 } 264 265 /** 266 * The classifier attached to this association end. 267 * @see AssociationEndFacade#getType() 268 */ 269 public ClassifierFacade getType() 270 { 271 return this.getSuperAssociationEndFacade().getType(); 272 } 273 274 /** 275 * the upper value for the multiplicity (will be -1 for *) 276 * -only applicable for UML2 277 * @see AssociationEndFacade#getUpper() 278 */ 279 public int getUpper() 280 { 281 return this.getSuperAssociationEndFacade().getUpper(); 282 } 283 284 /** 285 * True if this association end represents an aggregation relationship. 286 * @see AssociationEndFacade#isAggregation() 287 */ 288 public boolean isAggregation() 289 { 290 return this.getSuperAssociationEndFacade().isAggregation(); 291 } 292 293 /** 294 * Is true if update of one side of the association should also update the other side. false if 295 * not. 296 * @see AssociationEndFacade#isBidirectional() 297 */ 298 public boolean isBidirectional() 299 { 300 return this.getSuperAssociationEndFacade().isBidirectional(); 301 } 302 303 /** 304 * Returns whether or not (true/false) this association end is the child end of the assocation 305 * (i.e. the other end's aggregation is composition). 306 * @see AssociationEndFacade#isChild() 307 */ 308 public boolean isChild() 309 { 310 return this.getSuperAssociationEndFacade().isChild(); 311 } 312 313 /** 314 * True if this association end represents a composition relationship. 315 * @see AssociationEndFacade#isComposition() 316 */ 317 public boolean isComposition() 318 { 319 return this.getSuperAssociationEndFacade().isComposition(); 320 } 321 322 /** 323 * If the association end is derived (its value is computed). UML2 only. UML14 always returns 324 * false. Default=false. 325 * @see AssociationEndFacade#isDerived() 326 */ 327 public boolean isDerived() 328 { 329 return this.getSuperAssociationEndFacade().isDerived(); 330 } 331 332 /** 333 * IsLeaf property in the association end property. If true, attribute is final, cannot be 334 * extended or implemented by a descendant. Default=false. 335 * @see AssociationEndFacade#isLeaf() 336 */ 337 public boolean isLeaf() 338 { 339 return this.getSuperAssociationEndFacade().isLeaf(); 340 } 341 342 /** 343 * True if this association end's multiplicity is greater than one. 344 * @see AssociationEndFacade#isMany() 345 */ 346 public boolean isMany() 347 { 348 return this.getSuperAssociationEndFacade().isMany(); 349 } 350 351 /** 352 * True if this association end's and the other end's multiplicities are both many. 353 * @see AssociationEndFacade#isMany2Many() 354 */ 355 public boolean isMany2Many() 356 { 357 return this.getSuperAssociationEndFacade().isMany2Many(); 358 } 359 360 /** 361 * True if this association end's multiplicity is many while the other end's is one. 362 * @see AssociationEndFacade#isMany2One() 363 */ 364 public boolean isMany2One() 365 { 366 return this.getSuperAssociationEndFacade().isMany2One(); 367 } 368 369 /** 370 * True if it is possible to navigate from the other end to this association end . 371 * @see AssociationEndFacade#isNavigable() 372 */ 373 public boolean isNavigable() 374 { 375 return this.getSuperAssociationEndFacade().isNavigable(); 376 } 377 378 /** 379 * True if this association end's multiplicity is one while the other end's is many. 380 * @see AssociationEndFacade#isOne2Many() 381 */ 382 public boolean isOne2Many() 383 { 384 return this.getSuperAssociationEndFacade().isOne2Many(); 385 } 386 387 /** 388 * True if this association end's and the other end's multiplicities are both one. 389 * @see AssociationEndFacade#isOne2One() 390 */ 391 public boolean isOne2One() 392 { 393 return this.getSuperAssociationEndFacade().isOne2One(); 394 } 395 396 /** 397 * Indicates whether or not the association ends are ordered (if multiplicity is greater than 398 * 1). 399 * @see AssociationEndFacade#isOrdered() 400 */ 401 public boolean isOrdered() 402 { 403 return this.getSuperAssociationEndFacade().isOrdered(); 404 } 405 406 /** 407 * True if the association end cannot be changed. 408 * @see AssociationEndFacade#isReadOnly() 409 */ 410 public boolean isReadOnly() 411 { 412 return this.getSuperAssociationEndFacade().isReadOnly(); 413 } 414 415 /** 416 * True if this association end's multiplicity is strictly greater than zero. 417 * @see AssociationEndFacade#isRequired() 418 */ 419 public boolean isRequired() 420 { 421 return this.getSuperAssociationEndFacade().isRequired(); 422 } 423 424 /** 425 * Indicates if this associationEnd is 'static', meaning it has a classifier scope. 426 * @see AssociationEndFacade#isStatic() 427 */ 428 public boolean isStatic() 429 { 430 return this.getSuperAssociationEndFacade().isStatic(); 431 } 432 433 /** 434 * UML2: If the association attribute is unique within the Collection type. UML14 always returns 435 * false. Unique+Ordered determines the implementation Collection type. Default=false. 436 * @see AssociationEndFacade#isUnique() 437 */ 438 public boolean isUnique() 439 { 440 return this.getSuperAssociationEndFacade().isUnique(); 441 } 442 443 /** 444 * Copies all tagged values from the given ModelElementFacade to this model element facade. 445 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element) 446 */ 447 public void copyTaggedValues(ModelElementFacade element) 448 { 449 this.getSuperAssociationEndFacade().copyTaggedValues(element); 450 } 451 452 /** 453 * Finds the tagged value with the specified 'tagName'. In case there are more values the first 454 * one found will be returned. 455 * @see ModelElementFacade#findTaggedValue(String tagName) 456 */ 457 public Object findTaggedValue(String tagName) 458 { 459 return this.getSuperAssociationEndFacade().findTaggedValue(tagName); 460 } 461 462 /** 463 * Returns all the values for the tagged value with the specified name. The returned collection 464 * will contains only String instances, or will be empty. Never null. 465 * @see ModelElementFacade#findTaggedValues(String tagName) 466 */ 467 public Collection<Object> findTaggedValues(String tagName) 468 { 469 return this.getSuperAssociationEndFacade().findTaggedValues(tagName); 470 } 471 472 /** 473 * Returns the fully qualified name of the model element. The fully qualified name includes 474 * complete package qualified name of the underlying model element. The templates parameter will 475 * be replaced by the correct one given the binding relation of the parameter to this element. 476 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement) 477 */ 478 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement) 479 { 480 return this.getSuperAssociationEndFacade().getBindedFullyQualifiedName(bindedElement); 481 } 482 483 /** 484 * Gets all constraints belonging to the model element. 485 * @see ModelElementFacade#getConstraints() 486 */ 487 public Collection<ConstraintFacade> getConstraints() 488 { 489 return this.getSuperAssociationEndFacade().getConstraints(); 490 } 491 492 /** 493 * Returns the constraints of the argument kind that have been placed onto this model. Typical 494 * kinds are "inv", "pre" and "post". Other kinds are possible. 495 * @see ModelElementFacade#getConstraints(String kind) 496 */ 497 public Collection<ConstraintFacade> getConstraints(String kind) 498 { 499 return this.getSuperAssociationEndFacade().getConstraints(kind); 500 } 501 502 /** 503 * Gets the documentation for the model element, The indent argument is prefixed to each line. 504 * By default this method wraps lines after 64 characters. 505 * This method is equivalent to <code>getDocumentation(indent, 64)</code>. 506 * @see ModelElementFacade#getDocumentation(String indent) 507 */ 508 public String getDocumentation(String indent) 509 { 510 return this.getSuperAssociationEndFacade().getDocumentation(indent); 511 } 512 513 /** 514 * This method returns the documentation for this model element, with the lines wrapped after 515 * the specified number of characters, values of less than 1 will indicate no line wrapping is 516 * required. By default paragraphs are returned as HTML. 517 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>. 518 * @see ModelElementFacade#getDocumentation(String indent, int lineLength) 519 */ 520 public String getDocumentation(String indent, int lineLength) 521 { 522 return this.getSuperAssociationEndFacade().getDocumentation(indent, lineLength); 523 } 524 525 /** 526 * This method returns the documentation for this model element, with the lines wrapped after 527 * the specified number of characters, values of less than 1 will indicate no line wrapping is 528 * required. HTML style determines if HTML Escaping is applied. 529 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle) 530 */ 531 public String getDocumentation(String indent, int lineLength, boolean htmlStyle) 532 { 533 return this.getSuperAssociationEndFacade().getDocumentation(indent, lineLength, htmlStyle); 534 } 535 536 /** 537 * The fully qualified name of this model element. 538 * @see ModelElementFacade#getFullyQualifiedName() 539 */ 540 public String getFullyQualifiedName() 541 { 542 return this.getSuperAssociationEndFacade().getFullyQualifiedName(); 543 } 544 545 /** 546 * Returns the fully qualified name of the model element. The fully qualified name includes 547 * complete package qualified name of the underlying model element. If modelName is true, then 548 * the original name of the model element (the name contained within the model) will be the name 549 * returned, otherwise a name from a language mapping will be returned. 550 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName) 551 */ 552 public String getFullyQualifiedName(boolean modelName) 553 { 554 return this.getSuperAssociationEndFacade().getFullyQualifiedName(modelName); 555 } 556 557 /** 558 * Returns the fully qualified name as a path, the returned value always starts with out a slash 559 * '/'. 560 * @see ModelElementFacade#getFullyQualifiedNamePath() 561 */ 562 public String getFullyQualifiedNamePath() 563 { 564 return this.getSuperAssociationEndFacade().getFullyQualifiedNamePath(); 565 } 566 567 /** 568 * Gets the unique identifier of the underlying model element. 569 * @see ModelElementFacade#getId() 570 */ 571 public String getId() 572 { 573 return this.getSuperAssociationEndFacade().getId(); 574 } 575 576 /** 577 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which 578 * are not represented by other properties, i.e. native, transient, volatile, synchronized, 579 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings: 580 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require 581 * JDK5 compiler level. 582 * @see ModelElementFacade#getKeywords() 583 */ 584 public Collection<String> getKeywords() 585 { 586 return this.getSuperAssociationEndFacade().getKeywords(); 587 } 588 589 /** 590 * UML2: Retrieves a localized label for this named element. 591 * @see ModelElementFacade#getLabel() 592 */ 593 public String getLabel() 594 { 595 return this.getSuperAssociationEndFacade().getLabel(); 596 } 597 598 /** 599 * The language mappings that have been set for this model element. 600 * @see ModelElementFacade#getLanguageMappings() 601 */ 602 public TypeMappings getLanguageMappings() 603 { 604 return this.getSuperAssociationEndFacade().getLanguageMappings(); 605 } 606 607 /** 608 * Return the model containing this model element (multiple models may be loaded and processed 609 * at the same time). 610 * @see ModelElementFacade#getModel() 611 */ 612 public ModelFacade getModel() 613 { 614 return this.getSuperAssociationEndFacade().getModel(); 615 } 616 617 /** 618 * The name of the model element. 619 * @see ModelElementFacade#getName() 620 */ 621 public String getName() 622 { 623 return this.getSuperAssociationEndFacade().getName(); 624 } 625 626 /** 627 * Gets the package to which this model element belongs. 628 * @see ModelElementFacade#getPackage() 629 */ 630 public ModelElementFacade getPackage() 631 { 632 return this.getSuperAssociationEndFacade().getPackage(); 633 } 634 635 /** 636 * The name of this model element's package. 637 * @see ModelElementFacade#getPackageName() 638 */ 639 public String getPackageName() 640 { 641 return this.getSuperAssociationEndFacade().getPackageName(); 642 } 643 644 /** 645 * Gets the package name (optionally providing the ability to retrieve the model name and not 646 * the mapped name). 647 * @see ModelElementFacade#getPackageName(boolean modelName) 648 */ 649 public String getPackageName(boolean modelName) 650 { 651 return this.getSuperAssociationEndFacade().getPackageName(modelName); 652 } 653 654 /** 655 * Returns the package as a path, the returned value always starts with out a slash '/'. 656 * @see ModelElementFacade#getPackagePath() 657 */ 658 public String getPackagePath() 659 { 660 return this.getSuperAssociationEndFacade().getPackagePath(); 661 } 662 663 /** 664 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the 665 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from 666 * the names of the containing namespaces starting at the root of the hierarchy and ending with 667 * the name of the NamedElement itself. 668 * @see ModelElementFacade#getQualifiedName() 669 */ 670 public String getQualifiedName() 671 { 672 return this.getSuperAssociationEndFacade().getQualifiedName(); 673 } 674 675 /** 676 * Gets the root package for the model element. 677 * @see ModelElementFacade#getRootPackage() 678 */ 679 public PackageFacade getRootPackage() 680 { 681 return this.getSuperAssociationEndFacade().getRootPackage(); 682 } 683 684 /** 685 * Gets the dependencies for which this model element is the source. 686 * @see ModelElementFacade#getSourceDependencies() 687 */ 688 public Collection<DependencyFacade> getSourceDependencies() 689 { 690 return this.getSuperAssociationEndFacade().getSourceDependencies(); 691 } 692 693 /** 694 * If this model element is the context of an activity graph, this represents that activity 695 * graph. 696 * @see ModelElementFacade#getStateMachineContext() 697 */ 698 public StateMachineFacade getStateMachineContext() 699 { 700 return this.getSuperAssociationEndFacade().getStateMachineContext(); 701 } 702 703 /** 704 * The collection of ALL stereotype names for this model element. 705 * @see ModelElementFacade#getStereotypeNames() 706 */ 707 public Collection<String> getStereotypeNames() 708 { 709 return this.getSuperAssociationEndFacade().getStereotypeNames(); 710 } 711 712 /** 713 * Gets all stereotypes for this model element. 714 * @see ModelElementFacade#getStereotypes() 715 */ 716 public Collection<StereotypeFacade> getStereotypes() 717 { 718 return this.getSuperAssociationEndFacade().getStereotypes(); 719 } 720 721 /** 722 * Return the TaggedValues associated with this model element, under all stereotypes. 723 * @see ModelElementFacade#getTaggedValues() 724 */ 725 public Collection<TaggedValueFacade> getTaggedValues() 726 { 727 return this.getSuperAssociationEndFacade().getTaggedValues(); 728 } 729 730 /** 731 * Gets the dependencies for which this model element is the target. 732 * @see ModelElementFacade#getTargetDependencies() 733 */ 734 public Collection<DependencyFacade> getTargetDependencies() 735 { 736 return this.getSuperAssociationEndFacade().getTargetDependencies(); 737 } 738 739 /** 740 * Get the template parameter for this model element having the parameterName 741 * @see ModelElementFacade#getTemplateParameter(String parameterName) 742 */ 743 public Object getTemplateParameter(String parameterName) 744 { 745 return this.getSuperAssociationEndFacade().getTemplateParameter(parameterName); 746 } 747 748 /** 749 * Get the template parameters for this model element 750 * @see ModelElementFacade#getTemplateParameters() 751 */ 752 public Collection<TemplateParameterFacade> getTemplateParameters() 753 { 754 return this.getSuperAssociationEndFacade().getTemplateParameters(); 755 } 756 757 /** 758 * The visibility (i.e. public, private, protected or package) of the model element, will 759 * attempt a lookup for these values in the language mappings (if any). 760 * @see ModelElementFacade#getVisibility() 761 */ 762 public String getVisibility() 763 { 764 return this.getSuperAssociationEndFacade().getVisibility(); 765 } 766 767 /** 768 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance 769 * is taken into account when searching for the stereotype), false otherwise. 770 * @see ModelElementFacade#hasExactStereotype(String stereotypeName) 771 */ 772 public boolean hasExactStereotype(String stereotypeName) 773 { 774 return this.getSuperAssociationEndFacade().hasExactStereotype(stereotypeName); 775 } 776 777 /** 778 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma, 779 * pipe, semicolon, or << >> 780 * @see ModelElementFacade#hasKeyword(String keywordName) 781 */ 782 public boolean hasKeyword(String keywordName) 783 { 784 return this.getSuperAssociationEndFacade().hasKeyword(keywordName); 785 } 786 787 /** 788 * Returns true if the model element has the specified stereotype. If the stereotype itself 789 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if 790 * one of the stereotype's ancestors has a matching name this method will return true, false 791 * otherwise. 792 * For example, if we have a certain stereotype called <<exception>> and a model element has a 793 * stereotype called <<applicationException>> which extends <<exception>>, when calling this 794 * method with 'stereotypeName' defined as 'exception' the method would return true since 795 * <<applicationException>> inherits from <<exception>>. If you want to check if the model 796 * element has the exact stereotype, then use the method 'hasExactStereotype' instead. 797 * @see ModelElementFacade#hasStereotype(String stereotypeName) 798 */ 799 public boolean hasStereotype(String stereotypeName) 800 { 801 return this.getSuperAssociationEndFacade().hasStereotype(stereotypeName); 802 } 803 804 /** 805 * True if there are target dependencies from this element that are instances of BindingFacade. 806 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies. 807 * @see ModelElementFacade#isBindingDependenciesPresent() 808 */ 809 public boolean isBindingDependenciesPresent() 810 { 811 return this.getSuperAssociationEndFacade().isBindingDependenciesPresent(); 812 } 813 814 /** 815 * Indicates if any constraints are present on this model element. 816 * @see ModelElementFacade#isConstraintsPresent() 817 */ 818 public boolean isConstraintsPresent() 819 { 820 return this.getSuperAssociationEndFacade().isConstraintsPresent(); 821 } 822 823 /** 824 * Indicates if any documentation is present on this model element. 825 * @see ModelElementFacade#isDocumentationPresent() 826 */ 827 public boolean isDocumentationPresent() 828 { 829 return this.getSuperAssociationEndFacade().isDocumentationPresent(); 830 } 831 832 /** 833 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript. 834 * @see ModelElementFacade#isReservedWord() 835 */ 836 public boolean isReservedWord() 837 { 838 return this.getSuperAssociationEndFacade().isReservedWord(); 839 } 840 841 /** 842 * True is there are template parameters on this model element. For UML2, applies to Class, 843 * Operation, Property, and Parameter. 844 * @see ModelElementFacade#isTemplateParametersPresent() 845 */ 846 public boolean isTemplateParametersPresent() 847 { 848 return this.getSuperAssociationEndFacade().isTemplateParametersPresent(); 849 } 850 851 /** 852 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++, 853 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on 854 * Enumerations and Interfaces, optionally applies on other model elements. 855 * @see ModelElementFacade#isValidIdentifierName() 856 */ 857 public boolean isValidIdentifierName() 858 { 859 return this.getSuperAssociationEndFacade().isValidIdentifierName(); 860 } 861 862 /** 863 * Searches for the constraint with the specified 'name' on this model element, and if found 864 * translates it using the specified 'translation' from a translation library discovered by the 865 * framework. 866 * @see ModelElementFacade#translateConstraint(String name, String translation) 867 */ 868 public String translateConstraint(String name, String translation) 869 { 870 return this.getSuperAssociationEndFacade().translateConstraint(name, translation); 871 } 872 873 /** 874 * Translates all constraints belonging to this model element with the given 'translation'. 875 * @see ModelElementFacade#translateConstraints(String translation) 876 */ 877 public String[] translateConstraints(String translation) 878 { 879 return this.getSuperAssociationEndFacade().translateConstraints(translation); 880 } 881 882 /** 883 * Translates the constraints of the specified 'kind' belonging to this model element. 884 * @see ModelElementFacade#translateConstraints(String kind, String translation) 885 */ 886 public String[] translateConstraints(String kind, String translation) 887 { 888 return this.getSuperAssociationEndFacade().translateConstraints(kind, translation); 889 } 890 891 /** 892 * @see org.andromda.core.metafacade.MetafacadeBase#initialize() 893 */ 894 @Override 895 public void initialize() 896 { 897 this.getSuperAssociationEndFacade().initialize(); 898 } 899 900 /** 901 * @return Object getSuperAssociationEndFacade().getValidationOwner() 902 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner() 903 */ 904 @Override 905 public Object getValidationOwner() 906 { 907 Object owner = this.getSuperAssociationEndFacade().getValidationOwner(); 908 return owner; 909 } 910 911 /** 912 * @return String getSuperAssociationEndFacade().getValidationName() 913 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName() 914 */ 915 @Override 916 public String getValidationName() 917 { 918 String name = this.getSuperAssociationEndFacade().getValidationName(); 919 return name; 920 } 921 922 /** 923 * @param validationMessages Collection<ModelValidationMessage> 924 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages) 925 */ 926 @Override 927 public void validateInvariants(Collection<ModelValidationMessage> validationMessages) 928 { 929 this.getSuperAssociationEndFacade().validateInvariants(validationMessages); 930 } 931 932 /** 933 * The property that stores the name of the metafacade. 934 */ 935 private static final String NAME_PROPERTY = "name"; 936 private static final String FQNAME_PROPERTY = "fullyQualifiedName"; 937 938 /** 939 * @see Object#toString() 940 */ 941 @Override 942 public String toString() 943 { 944 final StringBuilder toString = new StringBuilder(this.getClass().getName()); 945 toString.append("["); 946 try 947 { 948 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY)); 949 } 950 catch (final Throwable tryAgain) 951 { 952 try 953 { 954 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY)); 955 } 956 catch (final Throwable ignore) 957 { 958 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property 959 } 960 } 961 toString.append("]"); 962 return toString.toString(); 963 } 964}