1
2
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)
64 {
65 context = getContext(context);
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
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
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
161
162 public org.andromda.metafacades.uml.AssociationFacade getAssociation()
163 {
164 return this.getSuperAssociationEndFacade().getAssociation();
165 }
166
167
168 public java.lang.String getGetterName()
169 {
170 return this.getSuperAssociationEndFacade().getGetterName();
171 }
172
173
174 public java.lang.String getGetterSetterTypeName()
175 {
176 return this.getSuperAssociationEndFacade().getGetterSetterTypeName();
177 }
178
179
180 public int getLower()
181 {
182 return this.getSuperAssociationEndFacade().getLower();
183 }
184
185
186 public org.andromda.metafacades.uml.AssociationEndFacade getOtherEnd()
187 {
188 return this.getSuperAssociationEndFacade().getOtherEnd();
189 }
190
191
192 public java.lang.String getSetterName()
193 {
194 return this.getSuperAssociationEndFacade().getSetterName();
195 }
196
197
198 public org.andromda.metafacades.uml.ClassifierFacade getType()
199 {
200 return this.getSuperAssociationEndFacade().getType();
201 }
202
203
204 public int getUpper()
205 {
206 return this.getSuperAssociationEndFacade().getUpper();
207 }
208
209
210 public boolean isAggregation()
211 {
212 return this.getSuperAssociationEndFacade().isAggregation();
213 }
214
215
216 public boolean isChild()
217 {
218 return this.getSuperAssociationEndFacade().isChild();
219 }
220
221
222 public boolean isComposition()
223 {
224 return this.getSuperAssociationEndFacade().isComposition();
225 }
226
227
228 public boolean isMany()
229 {
230 return this.getSuperAssociationEndFacade().isMany();
231 }
232
233
234 public boolean isMany2Many()
235 {
236 return this.getSuperAssociationEndFacade().isMany2Many();
237 }
238
239
240 public boolean isMany2One()
241 {
242 return this.getSuperAssociationEndFacade().isMany2One();
243 }
244
245
246 public boolean isNavigable()
247 {
248 return this.getSuperAssociationEndFacade().isNavigable();
249 }
250
251
252 public boolean isOne2Many()
253 {
254 return this.getSuperAssociationEndFacade().isOne2Many();
255 }
256
257
258 public boolean isOne2One()
259 {
260 return this.getSuperAssociationEndFacade().isOne2One();
261 }
262
263
264 public boolean isOrdered()
265 {
266 return this.getSuperAssociationEndFacade().isOrdered();
267 }
268
269
270 public boolean isReadOnly()
271 {
272 return this.getSuperAssociationEndFacade().isReadOnly();
273 }
274
275
276 public boolean isRequired()
277 {
278 return this.getSuperAssociationEndFacade().isRequired();
279 }
280
281
282 public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
283 {
284 this.getSuperAssociationEndFacade().copyTaggedValues(element);
285 }
286
287
288 public java.lang.Object findTaggedValue(java.lang.String tagName)
289 {
290 return this.getSuperAssociationEndFacade().findTaggedValue(tagName);
291 }
292
293
294 public java.util.Collection findTaggedValues(java.lang.String tagName)
295 {
296 return this.getSuperAssociationEndFacade().findTaggedValues(tagName);
297 }
298
299
300 public java.util.Collection getConstraints()
301 {
302 return this.getSuperAssociationEndFacade().getConstraints();
303 }
304
305
306 public java.util.Collection getConstraints(java.lang.String kind)
307 {
308 return this.getSuperAssociationEndFacade().getConstraints(kind);
309 }
310
311
312 public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
313 {
314 return this.getSuperAssociationEndFacade().getDocumentation(indent, lineLength);
315 }
316
317
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
324 public java.lang.String getDocumentation(java.lang.String indent)
325 {
326 return this.getSuperAssociationEndFacade().getDocumentation(indent);
327 }
328
329
330 public java.lang.String getFullyQualifiedName(boolean modelName)
331 {
332 return this.getSuperAssociationEndFacade().getFullyQualifiedName(modelName);
333 }
334
335
336 public java.lang.String getFullyQualifiedName()
337 {
338 return this.getSuperAssociationEndFacade().getFullyQualifiedName();
339 }
340
341
342 public java.lang.String getFullyQualifiedNamePath()
343 {
344 return this.getSuperAssociationEndFacade().getFullyQualifiedNamePath();
345 }
346
347
348 public java.lang.String getId()
349 {
350 return this.getSuperAssociationEndFacade().getId();
351 }
352
353
354 public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
355 {
356 return this.getSuperAssociationEndFacade().getLanguageMappings();
357 }
358
359
360 public org.andromda.metafacades.uml.ModelFacade getModel()
361 {
362 return this.getSuperAssociationEndFacade().getModel();
363 }
364
365
366 public java.lang.String getName()
367 {
368 return this.getSuperAssociationEndFacade().getName();
369 }
370
371
372 public org.andromda.metafacades.uml.ModelElementFacade getPackage()
373 {
374 return this.getSuperAssociationEndFacade().getPackage();
375 }
376
377
378 public java.lang.String getPackageName(boolean modelName)
379 {
380 return this.getSuperAssociationEndFacade().getPackageName(modelName);
381 }
382
383
384 public java.lang.String getPackageName()
385 {
386 return this.getSuperAssociationEndFacade().getPackageName();
387 }
388
389
390 public java.lang.String getPackagePath()
391 {
392 return this.getSuperAssociationEndFacade().getPackagePath();
393 }
394
395
396 public org.andromda.metafacades.uml.PackageFacade getRootPackage()
397 {
398 return this.getSuperAssociationEndFacade().getRootPackage();
399 }
400
401
402 public java.util.Collection getSourceDependencies()
403 {
404 return this.getSuperAssociationEndFacade().getSourceDependencies();
405 }
406
407
408 public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
409 {
410 return this.getSuperAssociationEndFacade().getStateMachineContext();
411 }
412
413
414 public java.util.Collection getStereotypeNames()
415 {
416 return this.getSuperAssociationEndFacade().getStereotypeNames();
417 }
418
419
420 public java.util.Collection getStereotypes()
421 {
422 return this.getSuperAssociationEndFacade().getStereotypes();
423 }
424
425
426 public java.util.Collection getTaggedValues()
427 {
428 return this.getSuperAssociationEndFacade().getTaggedValues();
429 }
430
431
432 public java.util.Collection getTargetDependencies()
433 {
434 return this.getSuperAssociationEndFacade().getTargetDependencies();
435 }
436
437
438 public java.lang.Object getTemplateParameter(java.lang.String parameterName)
439 {
440 return this.getSuperAssociationEndFacade().getTemplateParameter(parameterName);
441 }
442
443
444 public java.util.Collection getTemplateParameters()
445 {
446 return this.getSuperAssociationEndFacade().getTemplateParameters();
447 }
448
449
450 public java.lang.String getVisibility()
451 {
452 return this.getSuperAssociationEndFacade().getVisibility();
453 }
454
455
456 public boolean hasExactStereotype(java.lang.String stereotypeName)
457 {
458 return this.getSuperAssociationEndFacade().hasExactStereotype(stereotypeName);
459 }
460
461
462 public boolean hasStereotype(java.lang.String stereotypeName)
463 {
464 return this.getSuperAssociationEndFacade().hasStereotype(stereotypeName);
465 }
466
467
468 public boolean isBindingDependenciesPresent()
469 {
470 return this.getSuperAssociationEndFacade().isBindingDependenciesPresent();
471 }
472
473
474 public boolean isConstraintsPresent()
475 {
476 return this.getSuperAssociationEndFacade().isConstraintsPresent();
477 }
478
479
480 public boolean isTemplateParametersPresent()
481 {
482 return this.getSuperAssociationEndFacade().isTemplateParametersPresent();
483 }
484
485
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
492 public java.lang.String[] translateConstraints(java.lang.String translation)
493 {
494 return this.getSuperAssociationEndFacade().translateConstraints(translation);
495 }
496
497
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
556 }
557 toString.append("]");
558 return toString.toString();
559 }
560 }