View Javadoc

1   //
2   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
3   //
4   package org.andromda.cartridges.xmlschema.metafacades;
5   
6   /***
7    * MetafacadeLogic for org.andromda.cartridges.xmlschema.metafacades.XSDAssociationEnd
8    *
9    * @see org.andromda.cartridges.xmlschema.metafacades.XSDAssociationEnd
10   */
11  public abstract class XSDAssociationEndLogic
12      extends org.andromda.core.metafacade.MetafacadeBase
13      implements org.andromda.cartridges.xmlschema.metafacades.XSDAssociationEnd
14  {
15  
16      protected Object metaObject;
17  
18      public XSDAssociationEndLogic(Object metaObject, String context)
19      {
20          super(metaObject, getContext(context));
21          this.superAssociationEndFacade =
22             (org.andromda.metafacades.uml.AssociationEndFacade)
23              org.andromda.core.metafacade.MetafacadeFactory.getInstance().createFacadeImpl(
24                      "org.andromda.metafacades.uml.AssociationEndFacade",
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.XSDAssociationEnd";
38          }
39          return context;
40      }
41  
42      private org.andromda.metafacades.uml.AssociationEndFacade superAssociationEndFacade;
43      private boolean superAssociationEndFacadeInitialized = false;
44  
45      /***
46       * Gets the org.andromda.metafacades.uml.AssociationEndFacade parent instance.
47       */
48      private org.andromda.metafacades.uml.AssociationEndFacade getSuperAssociationEndFacade()
49      {
50          if (!this.superAssociationEndFacadeInitialized)
51          {
52              ((org.andromda.core.metafacade.MetafacadeBase)superAssociationEndFacade).setMetafacadeContext(this.getMetafacadeContext());
53              this.superAssociationEndFacadeInitialized = true;
54          }
55          return superAssociationEndFacade;
56      }
57  
58      /***
59       * @see org.andromda.core.metafacade.MetafacadeBase
60       */
61      public void resetMetafacadeContext(String context)
62      {
63          if (!this.contextRoot) // reset context only for non-root metafacades
64          {
65              context = getContext(context);  // to have same value as in original constructor call
66              setMetafacadeContext (context);
67              if (this.superAssociationEndFacadeInitialized)
68              {
69                  ((org.andromda.core.metafacade.MetafacadeBase)superAssociationEndFacade).resetMetafacadeContext(context);
70              }
71          }
72      }
73  
74      /***
75       * @see org.andromda.cartridges.xmlschema.metafacades.XSDAssociationEnd
76       */
77      public boolean isXSDAssociationEndMetaType()
78      {
79          return true;
80      }
81      
82      // --------------- attributes ---------------------
83  
84     /***
85      * @see org.andromda.cartridges.xmlschema.metafacades.XSDAssociationEnd#isOwnerSchemaType()
86      */
87      protected abstract boolean handleIsOwnerSchemaType();
88  
89      private void handleIsOwnerSchemaType1aPreCondition()
90      {
91      }
92  
93      private void handleIsOwnerSchemaType1aPostCondition()
94      {
95      }
96  
97      public final boolean isOwnerSchemaType()
98      {
99          boolean ownerSchemaType1a = false;
100         handleIsOwnerSchemaType1aPreCondition();
101         ownerSchemaType1a = handleIsOwnerSchemaType();
102         handleIsOwnerSchemaType1aPostCondition();
103         return ownerSchemaType1a;
104     }
105 
106     // ---------------- business methods ----------------------
107 
108     protected abstract java.lang.String handleGetMaxOccurs();
109 
110     private void handleGetMaxOccurs1oPreCondition()
111     {
112     }
113 
114     private void handleGetMaxOccurs1oPostCondition()
115     {
116     }
117 
118     public java.lang.String getMaxOccurs()
119     {
120         handleGetMaxOccurs1oPreCondition();
121         java.lang.String returnValue = handleGetMaxOccurs();
122         handleGetMaxOccurs1oPostCondition();
123         return returnValue;
124     }
125 
126     protected abstract java.lang.String handleGetMinOccurs();
127 
128     private void handleGetMinOccurs2oPreCondition()
129     {
130     }
131 
132     private void handleGetMinOccurs2oPostCondition()
133     {
134     }
135 
136     public java.lang.String getMinOccurs()
137     {
138         handleGetMinOccurs2oPreCondition();
139         java.lang.String returnValue = handleGetMinOccurs();
140         handleGetMinOccurs2oPostCondition();
141         return returnValue;
142     }
143 
144     /***
145      * @see org.andromda.metafacades.uml.AssociationEndFacade
146      */
147     public boolean isAssociationEndFacadeMetaType()
148     {
149         return true;
150     }
151     
152     /***
153      * @see org.andromda.metafacades.uml.ModelElementFacade
154      */
155     public boolean isModelElementFacadeMetaType()
156     {
157         return true;
158     }
159     
160     // ----------- delegates to org.andromda.metafacades.uml.AssociationEndFacade ------------
161     // from org.andromda.metafacades.uml.AssociationEndFacade
162     public org.andromda.metafacades.uml.AssociationFacade getAssociation()
163     {
164         return this.getSuperAssociationEndFacade().getAssociation();
165     }
166 
167     // from org.andromda.metafacades.uml.AssociationEndFacade
168     public java.lang.String getGetterName()
169     {
170         return this.getSuperAssociationEndFacade().getGetterName();
171     }
172 
173     // from org.andromda.metafacades.uml.AssociationEndFacade
174     public java.lang.String getGetterSetterTypeName()
175     {
176         return this.getSuperAssociationEndFacade().getGetterSetterTypeName();
177     }
178 
179     // from org.andromda.metafacades.uml.AssociationEndFacade
180     public int getLower()
181     {
182         return this.getSuperAssociationEndFacade().getLower();
183     }
184 
185     // from org.andromda.metafacades.uml.AssociationEndFacade
186     public org.andromda.metafacades.uml.AssociationEndFacade getOtherEnd()
187     {
188         return this.getSuperAssociationEndFacade().getOtherEnd();
189     }
190 
191     // from org.andromda.metafacades.uml.AssociationEndFacade
192     public java.lang.String getSetterName()
193     {
194         return this.getSuperAssociationEndFacade().getSetterName();
195     }
196 
197     // from org.andromda.metafacades.uml.AssociationEndFacade
198     public org.andromda.metafacades.uml.ClassifierFacade getType()
199     {
200         return this.getSuperAssociationEndFacade().getType();
201     }
202 
203     // from org.andromda.metafacades.uml.AssociationEndFacade
204     public int getUpper()
205     {
206         return this.getSuperAssociationEndFacade().getUpper();
207     }
208 
209     // from org.andromda.metafacades.uml.AssociationEndFacade
210     public boolean isAggregation()
211     {
212         return this.getSuperAssociationEndFacade().isAggregation();
213     }
214 
215     // from org.andromda.metafacades.uml.AssociationEndFacade
216     public boolean isChild()
217     {
218         return this.getSuperAssociationEndFacade().isChild();
219     }
220 
221     // from org.andromda.metafacades.uml.AssociationEndFacade
222     public boolean isComposition()
223     {
224         return this.getSuperAssociationEndFacade().isComposition();
225     }
226 
227     // from org.andromda.metafacades.uml.AssociationEndFacade
228     public boolean isMany()
229     {
230         return this.getSuperAssociationEndFacade().isMany();
231     }
232 
233     // from org.andromda.metafacades.uml.AssociationEndFacade
234     public boolean isMany2Many()
235     {
236         return this.getSuperAssociationEndFacade().isMany2Many();
237     }
238 
239     // from org.andromda.metafacades.uml.AssociationEndFacade
240     public boolean isMany2One()
241     {
242         return this.getSuperAssociationEndFacade().isMany2One();
243     }
244 
245     // from org.andromda.metafacades.uml.AssociationEndFacade
246     public boolean isNavigable()
247     {
248         return this.getSuperAssociationEndFacade().isNavigable();
249     }
250 
251     // from org.andromda.metafacades.uml.AssociationEndFacade
252     public boolean isOne2Many()
253     {
254         return this.getSuperAssociationEndFacade().isOne2Many();
255     }
256 
257     // from org.andromda.metafacades.uml.AssociationEndFacade
258     public boolean isOne2One()
259     {
260         return this.getSuperAssociationEndFacade().isOne2One();
261     }
262 
263     // from org.andromda.metafacades.uml.AssociationEndFacade
264     public boolean isOrdered()
265     {
266         return this.getSuperAssociationEndFacade().isOrdered();
267     }
268 
269     // from org.andromda.metafacades.uml.AssociationEndFacade
270     public boolean isReadOnly()
271     {
272         return this.getSuperAssociationEndFacade().isReadOnly();
273     }
274 
275     // from org.andromda.metafacades.uml.AssociationEndFacade
276     public boolean isRequired()
277     {
278         return this.getSuperAssociationEndFacade().isRequired();
279     }
280 
281     // from org.andromda.metafacades.uml.ModelElementFacade
282     public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
283     {
284         this.getSuperAssociationEndFacade().copyTaggedValues(element);
285     }
286 
287     // from org.andromda.metafacades.uml.ModelElementFacade
288     public java.lang.Object findTaggedValue(java.lang.String tagName)
289     {
290         return this.getSuperAssociationEndFacade().findTaggedValue(tagName);
291     }
292 
293     // from org.andromda.metafacades.uml.ModelElementFacade
294     public java.util.Collection findTaggedValues(java.lang.String tagName)
295     {
296         return this.getSuperAssociationEndFacade().findTaggedValues(tagName);
297     }
298 
299     // from org.andromda.metafacades.uml.ModelElementFacade
300     public java.util.Collection getConstraints()
301     {
302         return this.getSuperAssociationEndFacade().getConstraints();
303     }
304 
305     // from org.andromda.metafacades.uml.ModelElementFacade
306     public java.util.Collection getConstraints(java.lang.String kind)
307     {
308         return this.getSuperAssociationEndFacade().getConstraints(kind);
309     }
310 
311     // from org.andromda.metafacades.uml.ModelElementFacade
312     public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
313     {
314         return this.getSuperAssociationEndFacade().getDocumentation(indent, lineLength);
315     }
316 
317     // from org.andromda.metafacades.uml.ModelElementFacade
318     public java.lang.String getDocumentation(java.lang.String indent, int lineLength, boolean htmlStyle)
319     {
320         return this.getSuperAssociationEndFacade().getDocumentation(indent, lineLength, htmlStyle);
321     }
322 
323     // from org.andromda.metafacades.uml.ModelElementFacade
324     public java.lang.String getDocumentation(java.lang.String indent)
325     {
326         return this.getSuperAssociationEndFacade().getDocumentation(indent);
327     }
328 
329     // from org.andromda.metafacades.uml.ModelElementFacade
330     public java.lang.String getFullyQualifiedName(boolean modelName)
331     {
332         return this.getSuperAssociationEndFacade().getFullyQualifiedName(modelName);
333     }
334 
335     // from org.andromda.metafacades.uml.ModelElementFacade
336     public java.lang.String getFullyQualifiedName()
337     {
338         return this.getSuperAssociationEndFacade().getFullyQualifiedName();
339     }
340 
341     // from org.andromda.metafacades.uml.ModelElementFacade
342     public java.lang.String getFullyQualifiedNamePath()
343     {
344         return this.getSuperAssociationEndFacade().getFullyQualifiedNamePath();
345     }
346 
347     // from org.andromda.metafacades.uml.ModelElementFacade
348     public java.lang.String getId()
349     {
350         return this.getSuperAssociationEndFacade().getId();
351     }
352 
353     // from org.andromda.metafacades.uml.ModelElementFacade
354     public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
355     {
356         return this.getSuperAssociationEndFacade().getLanguageMappings();
357     }
358 
359     // from org.andromda.metafacades.uml.ModelElementFacade
360     public org.andromda.metafacades.uml.ModelFacade getModel()
361     {
362         return this.getSuperAssociationEndFacade().getModel();
363     }
364 
365     // from org.andromda.metafacades.uml.ModelElementFacade
366     public java.lang.String getName()
367     {
368         return this.getSuperAssociationEndFacade().getName();
369     }
370 
371     // from org.andromda.metafacades.uml.ModelElementFacade
372     public org.andromda.metafacades.uml.ModelElementFacade getPackage()
373     {
374         return this.getSuperAssociationEndFacade().getPackage();
375     }
376 
377     // from org.andromda.metafacades.uml.ModelElementFacade
378     public java.lang.String getPackageName(boolean modelName)
379     {
380         return this.getSuperAssociationEndFacade().getPackageName(modelName);
381     }
382 
383     // from org.andromda.metafacades.uml.ModelElementFacade
384     public java.lang.String getPackageName()
385     {
386         return this.getSuperAssociationEndFacade().getPackageName();
387     }
388 
389     // from org.andromda.metafacades.uml.ModelElementFacade
390     public java.lang.String getPackagePath()
391     {
392         return this.getSuperAssociationEndFacade().getPackagePath();
393     }
394 
395     // from org.andromda.metafacades.uml.ModelElementFacade
396     public org.andromda.metafacades.uml.PackageFacade getRootPackage()
397     {
398         return this.getSuperAssociationEndFacade().getRootPackage();
399     }
400 
401     // from org.andromda.metafacades.uml.ModelElementFacade
402     public java.util.Collection getSourceDependencies()
403     {
404         return this.getSuperAssociationEndFacade().getSourceDependencies();
405     }
406 
407     // from org.andromda.metafacades.uml.ModelElementFacade
408     public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
409     {
410         return this.getSuperAssociationEndFacade().getStateMachineContext();
411     }
412 
413     // from org.andromda.metafacades.uml.ModelElementFacade
414     public java.util.Collection getStereotypeNames()
415     {
416         return this.getSuperAssociationEndFacade().getStereotypeNames();
417     }
418 
419     // from org.andromda.metafacades.uml.ModelElementFacade
420     public java.util.Collection getStereotypes()
421     {
422         return this.getSuperAssociationEndFacade().getStereotypes();
423     }
424 
425     // from org.andromda.metafacades.uml.ModelElementFacade
426     public java.util.Collection getTaggedValues()
427     {
428         return this.getSuperAssociationEndFacade().getTaggedValues();
429     }
430 
431     // from org.andromda.metafacades.uml.ModelElementFacade
432     public java.util.Collection getTargetDependencies()
433     {
434         return this.getSuperAssociationEndFacade().getTargetDependencies();
435     }
436 
437     // from org.andromda.metafacades.uml.ModelElementFacade
438     public java.lang.Object getTemplateParameter(java.lang.String parameterName)
439     {
440         return this.getSuperAssociationEndFacade().getTemplateParameter(parameterName);
441     }
442 
443     // from org.andromda.metafacades.uml.ModelElementFacade
444     public java.util.Collection getTemplateParameters()
445     {
446         return this.getSuperAssociationEndFacade().getTemplateParameters();
447     }
448 
449     // from org.andromda.metafacades.uml.ModelElementFacade
450     public java.lang.String getVisibility()
451     {
452         return this.getSuperAssociationEndFacade().getVisibility();
453     }
454 
455     // from org.andromda.metafacades.uml.ModelElementFacade
456     public boolean hasExactStereotype(java.lang.String stereotypeName)
457     {
458         return this.getSuperAssociationEndFacade().hasExactStereotype(stereotypeName);
459     }
460 
461     // from org.andromda.metafacades.uml.ModelElementFacade
462     public boolean hasStereotype(java.lang.String stereotypeName)
463     {
464         return this.getSuperAssociationEndFacade().hasStereotype(stereotypeName);
465     }
466 
467     // from org.andromda.metafacades.uml.ModelElementFacade
468     public boolean isBindingDependenciesPresent()
469     {
470         return this.getSuperAssociationEndFacade().isBindingDependenciesPresent();
471     }
472 
473     // from org.andromda.metafacades.uml.ModelElementFacade
474     public boolean isConstraintsPresent()
475     {
476         return this.getSuperAssociationEndFacade().isConstraintsPresent();
477     }
478 
479     // from org.andromda.metafacades.uml.ModelElementFacade
480     public boolean isTemplateParametersPresent()
481     {
482         return this.getSuperAssociationEndFacade().isTemplateParametersPresent();
483     }
484 
485     // from org.andromda.metafacades.uml.ModelElementFacade
486     public java.lang.String translateConstraint(java.lang.String name, java.lang.String translation)
487     {
488         return this.getSuperAssociationEndFacade().translateConstraint(name, translation);
489     }
490 
491     // from org.andromda.metafacades.uml.ModelElementFacade
492     public java.lang.String[] translateConstraints(java.lang.String translation)
493     {
494         return this.getSuperAssociationEndFacade().translateConstraints(translation);
495     }
496 
497     // from org.andromda.metafacades.uml.ModelElementFacade
498     public java.lang.String[] translateConstraints(java.lang.String kind, java.lang.String translation)
499     {
500         return this.getSuperAssociationEndFacade().translateConstraints(kind, translation);
501     }
502 
503     /***
504      * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
505      */
506     public void initialize()
507     {
508         this.getSuperAssociationEndFacade().initialize();
509     }
510 
511     /***
512      * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
513      */
514     public Object getValidationOwner()
515     {
516         Object owner = this.getSuperAssociationEndFacade().getValidationOwner();
517         return owner;
518     }
519 
520     /***
521      * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
522      */
523     public String getValidationName()
524     {
525         String name = this.getSuperAssociationEndFacade().getValidationName();
526         return name;
527     }
528 
529     /***
530      * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
531      */
532     public void validateInvariants(java.util.Collection validationMessages)
533     {
534         this.getSuperAssociationEndFacade().validateInvariants(validationMessages);
535     }
536     
537     /***
538      * The property that stores the name of the metafacade.
539      */
540     private static final String NAME_PROPERTY = "name";
541     
542     /***
543      * @see java.lang.Object#toString()
544      */
545     public String toString()
546     {
547         final StringBuffer toString = new StringBuffer(this.getClass().getName());
548         toString.append("[");
549         try
550         {
551             toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
552         }
553         catch (final Throwable throwable)
554         {
555             // - just ignore when the metafacade doesn't have a name property
556         }
557         toString.append("]");
558         return toString.toString();
559     }
560 }