1
2
3
4 package org.andromda.metafacades.uml14;
5
6 /***
7 * MetafacadeLogic for org.andromda.metafacades.uml.AssociationClassFacade
8 *
9 * @see org.andromda.metafacades.uml.AssociationClassFacade
10 */
11 public abstract class AssociationClassFacadeLogic
12 extends org.andromda.core.metafacade.MetafacadeBase
13 implements org.andromda.metafacades.uml.AssociationClassFacade
14 {
15
16 protected org.omg.uml.foundation.core.AssociationClass metaObject;
17
18 public AssociationClassFacadeLogic(org.omg.uml.foundation.core.AssociationClass metaObject, String context)
19 {
20 super(metaObject, getContext(context));
21 this.superClassifierFacade =
22 (org.andromda.metafacades.uml.ClassifierFacade)
23 org.andromda.core.metafacade.MetafacadeFactory.getInstance().createFacadeImpl(
24 "org.andromda.metafacades.uml.ClassifierFacade",
25 metaObject,
26 getContext(context));
27 this.superAssociationFacade =
28 (org.andromda.metafacades.uml.AssociationFacade)
29 org.andromda.core.metafacade.MetafacadeFactory.getInstance().createFacadeImpl(
30 "org.andromda.metafacades.uml.AssociationFacade",
31 metaObject,
32 getContext(context));
33 this.metaObject = metaObject;
34 }
35
36 /***
37 * Gets the context for this metafacade logic instance.
38 */
39 private static String getContext(String context)
40 {
41 if (context == null)
42 {
43 context = "org.andromda.metafacades.uml.AssociationClassFacade";
44 }
45 return context;
46 }
47
48 private org.andromda.metafacades.uml.ClassifierFacade superClassifierFacade;
49 private boolean superClassifierFacadeInitialized = false;
50
51 /***
52 * Gets the org.andromda.metafacades.uml.ClassifierFacade parent instance.
53 */
54 protected org.andromda.metafacades.uml.ClassifierFacade getSuperClassifierFacade()
55 {
56 if (!this.superClassifierFacadeInitialized)
57 {
58 ((org.andromda.core.metafacade.MetafacadeBase)superClassifierFacade).setMetafacadeContext(this.getMetafacadeContext());
59 this.superClassifierFacadeInitialized = true;
60 }
61 return superClassifierFacade;
62 }
63
64 private org.andromda.metafacades.uml.AssociationFacade superAssociationFacade;
65 private boolean superAssociationFacadeInitialized = false;
66
67 /***
68 * Gets the org.andromda.metafacades.uml.AssociationFacade parent instance.
69 */
70 protected org.andromda.metafacades.uml.AssociationFacade getSuperAssociationFacade()
71 {
72 if (!this.superAssociationFacadeInitialized)
73 {
74 ((org.andromda.core.metafacade.MetafacadeBase)superAssociationFacade).setMetafacadeContext(this.getMetafacadeContext());
75 this.superAssociationFacadeInitialized = true;
76 }
77 return superAssociationFacade;
78 }
79
80 /***
81 * @see org.andromda.core.metafacade.MetafacadeBase
82 */
83 public void resetMetafacadeContext(String context)
84 {
85 if (!this.contextRoot)
86 {
87 context = getContext(context);
88 setMetafacadeContext (context);
89 if (this.superClassifierFacadeInitialized)
90 {
91 ((org.andromda.core.metafacade.MetafacadeBase)superClassifierFacade).resetMetafacadeContext(context);
92 }
93 if (this.superAssociationFacadeInitialized)
94 {
95 ((org.andromda.core.metafacade.MetafacadeBase)superAssociationFacade).resetMetafacadeContext(context);
96 }
97 }
98 }
99
100 /***
101 * @see org.andromda.metafacades.uml.AssociationClassFacade
102 */
103 public boolean isAssociationClassFacadeMetaType()
104 {
105 return true;
106 }
107
108
109
110 private void handleGetConnectionAssociationEnds1rPreCondition()
111 {
112 }
113
114 private void handleGetConnectionAssociationEnds1rPostCondition()
115 {
116 }
117
118 public final java.util.Collection getConnectionAssociationEnds()
119 {
120 java.util.Collection getConnectionAssociationEnds1r = null;
121 handleGetConnectionAssociationEnds1rPreCondition();
122 Object result = this.shieldedElements(handleGetConnectionAssociationEnds());
123 try
124 {
125 getConnectionAssociationEnds1r = (java.util.Collection)result;
126 }
127 catch (ClassCastException ex)
128 {
129
130
131 }
132 handleGetConnectionAssociationEnds1rPostCondition();
133 return getConnectionAssociationEnds1r;
134 }
135
136 protected abstract java.util.Collection handleGetConnectionAssociationEnds();
137
138 /***
139 * @see org.andromda.metafacades.uml.ClassifierFacade
140 */
141 public boolean isClassifierFacadeMetaType()
142 {
143 return true;
144 }
145
146 /***
147 * @see org.andromda.metafacades.uml.AssociationFacade
148 */
149 public boolean isAssociationFacadeMetaType()
150 {
151 return true;
152 }
153
154 /***
155 * @see org.andromda.metafacades.uml.GeneralizableElementFacade
156 */
157 public boolean isGeneralizableElementFacadeMetaType()
158 {
159 return true;
160 }
161
162 /***
163 * @see org.andromda.metafacades.uml.ModelElementFacade
164 */
165 public boolean isModelElementFacadeMetaType()
166 {
167 return true;
168 }
169
170
171
172 public org.andromda.metafacades.uml.AttributeFacade findAttribute(java.lang.String name)
173 {
174 return this.getSuperClassifierFacade().findAttribute(name);
175 }
176
177
178 public java.util.Collection getAbstractions()
179 {
180 return this.getSuperClassifierFacade().getAbstractions();
181 }
182
183
184 public java.util.Collection getAllAssociatedClasses()
185 {
186 return this.getSuperClassifierFacade().getAllAssociatedClasses();
187 }
188
189
190 public java.util.Collection getAllProperties()
191 {
192 return this.getSuperClassifierFacade().getAllProperties();
193 }
194
195
196 public java.util.Collection getAllRequiredConstructorParameters()
197 {
198 return this.getSuperClassifierFacade().getAllRequiredConstructorParameters();
199 }
200
201
202 public org.andromda.metafacades.uml.ClassifierFacade getArray()
203 {
204 return this.getSuperClassifierFacade().getArray();
205 }
206
207
208 public java.lang.String getArrayName()
209 {
210 return this.getSuperClassifierFacade().getArrayName();
211 }
212
213
214 public java.util.Collection getAssociatedClasses()
215 {
216 return this.getSuperClassifierFacade().getAssociatedClasses();
217 }
218
219
220 public java.util.List getAssociationEnds()
221 {
222 return this.getSuperClassifierFacade().getAssociationEnds();
223 }
224
225
226 public java.util.Collection getAttributes()
227 {
228 return this.getSuperClassifierFacade().getAttributes();
229 }
230
231
232 public java.util.Collection getAttributes(boolean follow)
233 {
234 return this.getSuperClassifierFacade().getAttributes(follow);
235 }
236
237
238 public java.lang.String getFullyQualifiedArrayName()
239 {
240 return this.getSuperClassifierFacade().getFullyQualifiedArrayName();
241 }
242
243
244 public java.util.Collection getImplementationOperations()
245 {
246 return this.getSuperClassifierFacade().getImplementationOperations();
247 }
248
249
250 public java.lang.String getImplementedInterfaceList()
251 {
252 return this.getSuperClassifierFacade().getImplementedInterfaceList();
253 }
254
255
256 public java.util.Collection getInstanceAttributes()
257 {
258 return this.getSuperClassifierFacade().getInstanceAttributes();
259 }
260
261
262 public java.util.Collection getInstanceOperations()
263 {
264 return this.getSuperClassifierFacade().getInstanceOperations();
265 }
266
267
268 public java.util.Collection getInterfaceAbstractions()
269 {
270 return this.getSuperClassifierFacade().getInterfaceAbstractions();
271 }
272
273
274 public java.lang.String getJavaNullString()
275 {
276 return this.getSuperClassifierFacade().getJavaNullString();
277 }
278
279
280 public java.util.Collection getNavigableConnectingEnds()
281 {
282 return this.getSuperClassifierFacade().getNavigableConnectingEnds();
283 }
284
285
286 public java.util.Collection getNavigableConnectingEnds(boolean follow)
287 {
288 return this.getSuperClassifierFacade().getNavigableConnectingEnds(follow);
289 }
290
291
292 public org.andromda.metafacades.uml.ClassifierFacade getNonArray()
293 {
294 return this.getSuperClassifierFacade().getNonArray();
295 }
296
297
298 public java.lang.String getOperationCallFromAttributes()
299 {
300 return this.getSuperClassifierFacade().getOperationCallFromAttributes();
301 }
302
303
304 public java.util.Collection getOperations()
305 {
306 return this.getSuperClassifierFacade().getOperations();
307 }
308
309
310 public java.util.Collection getProperties()
311 {
312 return this.getSuperClassifierFacade().getProperties();
313 }
314
315
316 public java.util.Collection getProperties(boolean follow)
317 {
318 return this.getSuperClassifierFacade().getProperties(follow);
319 }
320
321
322 public java.util.Collection getRequiredConstructorParameters()
323 {
324 return this.getSuperClassifierFacade().getRequiredConstructorParameters();
325 }
326
327
328 public java.lang.Long getSerialVersionUID()
329 {
330 return this.getSuperClassifierFacade().getSerialVersionUID();
331 }
332
333
334 public java.util.Collection getStaticAttributes()
335 {
336 return this.getSuperClassifierFacade().getStaticAttributes();
337 }
338
339
340 public java.util.Collection getStaticOperations()
341 {
342 return this.getSuperClassifierFacade().getStaticOperations();
343 }
344
345
346 public org.andromda.metafacades.uml.ClassifierFacade getSuperClass()
347 {
348 return this.getSuperClassifierFacade().getSuperClass();
349 }
350
351
352 public java.lang.String getWrapperName()
353 {
354 return this.getSuperClassifierFacade().getWrapperName();
355 }
356
357
358 public boolean isAbstract()
359 {
360 return this.getSuperClassifierFacade().isAbstract();
361 }
362
363
364 public boolean isArrayType()
365 {
366 return this.getSuperClassifierFacade().isArrayType();
367 }
368
369
370 public boolean isAssociationClass()
371 {
372 return this.getSuperClassifierFacade().isAssociationClass();
373 }
374
375
376 public boolean isBlobType()
377 {
378 return this.getSuperClassifierFacade().isBlobType();
379 }
380
381
382 public boolean isBooleanType()
383 {
384 return this.getSuperClassifierFacade().isBooleanType();
385 }
386
387
388 public boolean isClobType()
389 {
390 return this.getSuperClassifierFacade().isClobType();
391 }
392
393
394 public boolean isCollectionType()
395 {
396 return this.getSuperClassifierFacade().isCollectionType();
397 }
398
399
400 public boolean isDataType()
401 {
402 return this.getSuperClassifierFacade().isDataType();
403 }
404
405
406 public boolean isDateType()
407 {
408 return this.getSuperClassifierFacade().isDateType();
409 }
410
411
412 public boolean isEnumeration()
413 {
414 return this.getSuperClassifierFacade().isEnumeration();
415 }
416
417
418 public boolean isFileType()
419 {
420 return this.getSuperClassifierFacade().isFileType();
421 }
422
423
424 public boolean isInterface()
425 {
426 return this.getSuperClassifierFacade().isInterface();
427 }
428
429
430 public boolean isLeaf()
431 {
432 return this.getSuperClassifierFacade().isLeaf();
433 }
434
435
436 public boolean isListType()
437 {
438 return this.getSuperClassifierFacade().isListType();
439 }
440
441
442 public boolean isMapType()
443 {
444 return this.getSuperClassifierFacade().isMapType();
445 }
446
447
448 public boolean isPrimitive()
449 {
450 return this.getSuperClassifierFacade().isPrimitive();
451 }
452
453
454 public boolean isSetType()
455 {
456 return this.getSuperClassifierFacade().isSetType();
457 }
458
459
460 public boolean isStringType()
461 {
462 return this.getSuperClassifierFacade().isStringType();
463 }
464
465
466 public boolean isTimeType()
467 {
468 return this.getSuperClassifierFacade().isTimeType();
469 }
470
471
472 public java.lang.Object findTaggedValue(java.lang.String tagName, boolean follow)
473 {
474 return this.getSuperClassifierFacade().findTaggedValue(tagName, follow);
475 }
476
477
478 public java.util.Collection getAllGeneralizations()
479 {
480 return this.getSuperClassifierFacade().getAllGeneralizations();
481 }
482
483
484 public java.util.Collection getAllSpecializations()
485 {
486 return this.getSuperClassifierFacade().getAllSpecializations();
487 }
488
489
490 public org.andromda.metafacades.uml.GeneralizableElementFacade getGeneralization()
491 {
492 return this.getSuperClassifierFacade().getGeneralization();
493 }
494
495
496 public java.util.Collection getGeneralizationLinks()
497 {
498 return this.getSuperClassifierFacade().getGeneralizationLinks();
499 }
500
501
502 public java.lang.String getGeneralizationList()
503 {
504 return this.getSuperClassifierFacade().getGeneralizationList();
505 }
506
507
508 public org.andromda.metafacades.uml.GeneralizableElementFacade getGeneralizationRoot()
509 {
510 return this.getSuperClassifierFacade().getGeneralizationRoot();
511 }
512
513
514 public java.util.Collection getGeneralizations()
515 {
516 return this.getSuperClassifierFacade().getGeneralizations();
517 }
518
519
520 public java.util.Collection getSpecializations()
521 {
522 return this.getSuperClassifierFacade().getSpecializations();
523 }
524
525
526 public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
527 {
528 this.getSuperClassifierFacade().copyTaggedValues(element);
529 }
530
531
532 public java.lang.Object findTaggedValue(java.lang.String tagName)
533 {
534 return this.getSuperClassifierFacade().findTaggedValue(tagName);
535 }
536
537
538 public java.util.Collection findTaggedValues(java.lang.String tagName)
539 {
540 return this.getSuperClassifierFacade().findTaggedValues(tagName);
541 }
542
543
544 public java.util.Collection getConstraints()
545 {
546 return this.getSuperClassifierFacade().getConstraints();
547 }
548
549
550 public java.util.Collection getConstraints(java.lang.String kind)
551 {
552 return this.getSuperClassifierFacade().getConstraints(kind);
553 }
554
555
556 public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
557 {
558 return this.getSuperClassifierFacade().getDocumentation(indent, lineLength);
559 }
560
561
562 public java.lang.String getDocumentation(java.lang.String indent, int lineLength, boolean htmlStyle)
563 {
564 return this.getSuperClassifierFacade().getDocumentation(indent, lineLength, htmlStyle);
565 }
566
567
568 public java.lang.String getDocumentation(java.lang.String indent)
569 {
570 return this.getSuperClassifierFacade().getDocumentation(indent);
571 }
572
573
574 public java.lang.String getFullyQualifiedName(boolean modelName)
575 {
576 return this.getSuperClassifierFacade().getFullyQualifiedName(modelName);
577 }
578
579
580 public java.lang.String getFullyQualifiedName()
581 {
582 return this.getSuperClassifierFacade().getFullyQualifiedName();
583 }
584
585
586 public java.lang.String getFullyQualifiedNamePath()
587 {
588 return this.getSuperClassifierFacade().getFullyQualifiedNamePath();
589 }
590
591
592 public java.lang.String getId()
593 {
594 return this.getSuperClassifierFacade().getId();
595 }
596
597
598 public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
599 {
600 return this.getSuperClassifierFacade().getLanguageMappings();
601 }
602
603
604 public org.andromda.metafacades.uml.ModelFacade getModel()
605 {
606 return this.getSuperClassifierFacade().getModel();
607 }
608
609
610 public java.lang.String getName()
611 {
612 return this.getSuperClassifierFacade().getName();
613 }
614
615
616 public org.andromda.metafacades.uml.ModelElementFacade getPackage()
617 {
618 return this.getSuperClassifierFacade().getPackage();
619 }
620
621
622 public java.lang.String getPackageName(boolean modelName)
623 {
624 return this.getSuperClassifierFacade().getPackageName(modelName);
625 }
626
627
628 public java.lang.String getPackageName()
629 {
630 return this.getSuperClassifierFacade().getPackageName();
631 }
632
633
634 public java.lang.String getPackagePath()
635 {
636 return this.getSuperClassifierFacade().getPackagePath();
637 }
638
639
640 public org.andromda.metafacades.uml.PackageFacade getRootPackage()
641 {
642 return this.getSuperClassifierFacade().getRootPackage();
643 }
644
645
646 public java.util.Collection getSourceDependencies()
647 {
648 return this.getSuperClassifierFacade().getSourceDependencies();
649 }
650
651
652 public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
653 {
654 return this.getSuperClassifierFacade().getStateMachineContext();
655 }
656
657
658 public java.util.Collection getStereotypeNames()
659 {
660 return this.getSuperClassifierFacade().getStereotypeNames();
661 }
662
663
664 public java.util.Collection getStereotypes()
665 {
666 return this.getSuperClassifierFacade().getStereotypes();
667 }
668
669
670 public java.util.Collection getTaggedValues()
671 {
672 return this.getSuperClassifierFacade().getTaggedValues();
673 }
674
675
676 public java.util.Collection getTargetDependencies()
677 {
678 return this.getSuperClassifierFacade().getTargetDependencies();
679 }
680
681
682 public java.lang.Object getTemplateParameter(java.lang.String parameterName)
683 {
684 return this.getSuperClassifierFacade().getTemplateParameter(parameterName);
685 }
686
687
688 public java.util.Collection getTemplateParameters()
689 {
690 return this.getSuperClassifierFacade().getTemplateParameters();
691 }
692
693
694 public java.lang.String getVisibility()
695 {
696 return this.getSuperClassifierFacade().getVisibility();
697 }
698
699
700 public boolean hasExactStereotype(java.lang.String stereotypeName)
701 {
702 return this.getSuperClassifierFacade().hasExactStereotype(stereotypeName);
703 }
704
705
706 public boolean hasStereotype(java.lang.String stereotypeName)
707 {
708 return this.getSuperClassifierFacade().hasStereotype(stereotypeName);
709 }
710
711
712 public boolean isBindingDependenciesPresent()
713 {
714 return this.getSuperClassifierFacade().isBindingDependenciesPresent();
715 }
716
717
718 public boolean isConstraintsPresent()
719 {
720 return this.getSuperClassifierFacade().isConstraintsPresent();
721 }
722
723
724 public boolean isTemplateParametersPresent()
725 {
726 return this.getSuperClassifierFacade().isTemplateParametersPresent();
727 }
728
729
730 public java.lang.String translateConstraint(java.lang.String name, java.lang.String translation)
731 {
732 return this.getSuperClassifierFacade().translateConstraint(name, translation);
733 }
734
735
736 public java.lang.String[] translateConstraints(java.lang.String translation)
737 {
738 return this.getSuperClassifierFacade().translateConstraints(translation);
739 }
740
741
742 public java.lang.String[] translateConstraints(java.lang.String kind, java.lang.String translation)
743 {
744 return this.getSuperClassifierFacade().translateConstraints(kind, translation);
745 }
746
747
748
749 public org.andromda.metafacades.uml.AssociationEndFacade getAssociationEndA()
750 {
751 return this.getSuperAssociationFacade().getAssociationEndA();
752 }
753
754
755 public org.andromda.metafacades.uml.AssociationEndFacade getAssociationEndB()
756 {
757 return this.getSuperAssociationFacade().getAssociationEndB();
758 }
759
760
761 public java.lang.String getRelationName()
762 {
763 return this.getSuperAssociationFacade().getRelationName();
764 }
765
766
767 public boolean isMany2Many()
768 {
769 return this.getSuperAssociationFacade().isMany2Many();
770 }
771
772 /***
773 * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
774 */
775 public void initialize()
776 {
777 this.getSuperClassifierFacade().initialize();
778 this.getSuperAssociationFacade().initialize();
779 }
780
781 /***
782 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
783 */
784 public Object getValidationOwner()
785 {
786 Object owner = this.getSuperClassifierFacade().getValidationOwner();
787 if (owner == null)
788 {
789 owner = this.getSuperAssociationFacade().getValidationOwner();
790 }
791 return owner;
792 }
793
794 /***
795 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
796 */
797 public String getValidationName()
798 {
799 String name = this.getSuperClassifierFacade().getValidationName();
800 if (name == null)
801 {
802 name = this.getSuperAssociationFacade().getValidationName();
803 }
804 return name;
805 }
806
807 /***
808 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
809 */
810 public void validateInvariants(java.util.Collection validationMessages)
811 {
812 this.getSuperClassifierFacade().validateInvariants(validationMessages);
813 this.getSuperAssociationFacade().validateInvariants(validationMessages);
814 }
815
816 /***
817 * The property that stores the name of the metafacade.
818 */
819 private static final String NAME_PROPERTY = "name";
820
821 /***
822 * @see java.lang.Object#toString()
823 */
824 public String toString()
825 {
826 final StringBuffer toString = new StringBuffer(this.getClass().getName());
827 toString.append("[");
828 try
829 {
830 toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
831 }
832 catch (final Throwable throwable)
833 {
834
835 }
836 toString.append("]");
837 return toString.toString();
838 }
839 }