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