1 // license-header java merge-point
2 //
3 // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4 //
5 package org.andromda.cartridges.jbpm.metafacades;
6
7 import java.util.Collection;
8 import java.util.List;
9 import org.andromda.core.common.Introspector;
10 import org.andromda.core.metafacade.MetafacadeBase;
11 import org.andromda.core.metafacade.MetafacadeFactory;
12 import org.andromda.core.metafacade.ModelValidationMessage;
13 import org.andromda.metafacades.uml.ActivityGraphFacade;
14 import org.andromda.metafacades.uml.AssociationEndFacade;
15 import org.andromda.metafacades.uml.AttributeFacade;
16 import org.andromda.metafacades.uml.ClassifierFacade;
17 import org.andromda.metafacades.uml.ConstraintFacade;
18 import org.andromda.metafacades.uml.DependencyFacade;
19 import org.andromda.metafacades.uml.ExtendFacade;
20 import org.andromda.metafacades.uml.ExtensionPointFacade;
21 import org.andromda.metafacades.uml.GeneralizableElementFacade;
22 import org.andromda.metafacades.uml.GeneralizationFacade;
23 import org.andromda.metafacades.uml.IncludeFacade;
24 import org.andromda.metafacades.uml.ModelElementFacade;
25 import org.andromda.metafacades.uml.ModelFacade;
26 import org.andromda.metafacades.uml.OperationFacade;
27 import org.andromda.metafacades.uml.PackageFacade;
28 import org.andromda.metafacades.uml.StateMachineFacade;
29 import org.andromda.metafacades.uml.StereotypeFacade;
30 import org.andromda.metafacades.uml.TaggedValueFacade;
31 import org.andromda.metafacades.uml.TemplateParameterFacade;
32 import org.andromda.metafacades.uml.TypeMappings;
33 import org.andromda.metafacades.uml.UseCaseFacade;
34 import org.apache.log4j.Logger;
35
36 /**
37 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
38 * MetafacadeLogic for JBpmProcessDefinition
39 *
40 * @see JBpmProcessDefinition
41 */
42 public abstract class JBpmProcessDefinitionLogic
43 extends MetafacadeBase
44 implements JBpmProcessDefinition
45 {
46 /**
47 * The underlying UML object
48 * @see Object
49 */
50 protected Object metaObject;
51
52 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
53 * @param metaObjectIn
54 * @param context
55 */
56 protected JBpmProcessDefinitionLogic(Object metaObjectIn, String context)
57 {
58 super(metaObjectIn, getContext(context));
59 this.superUseCaseFacade =
60 (UseCaseFacade)
61 MetafacadeFactory.getInstance().createFacadeImpl(
62 "org.andromda.metafacades.uml.UseCaseFacade",
63 metaObjectIn,
64 getContext(context));
65 this.metaObject = metaObjectIn;
66 }
67
68 /**
69 * The logger instance.
70 */
71 private static final Logger logger = Logger.getLogger(JBpmProcessDefinitionLogic.class);
72
73 /**
74 * Gets the context for this metafacade logic instance.
75 * @param context String. Set to JBpmProcessDefinition if null
76 * @return context String
77 */
78 private static String getContext(String context)
79 {
80 if (context == null)
81 {
82 context = "org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition";
83 }
84 return context;
85 }
86
87 private UseCaseFacade superUseCaseFacade;
88 private boolean superUseCaseFacadeInitialized = false;
89
90 /**
91 * Gets the UseCaseFacade parent instance.
92 * @return this.superUseCaseFacade UseCaseFacade
93 */
94 private UseCaseFacade getSuperUseCaseFacade()
95 {
96 if (!this.superUseCaseFacadeInitialized)
97 {
98 ((MetafacadeBase)this.superUseCaseFacade).setMetafacadeContext(this.getMetafacadeContext());
99 this.superUseCaseFacadeInitialized = true;
100 }
101 return this.superUseCaseFacade;
102 }
103
104 /** Reset context only for non-root metafacades
105 * @param context
106 * @see MetafacadeBase#resetMetafacadeContext(String context)
107 */
108 @Override
109 public void resetMetafacadeContext(String context)
110 {
111 if (!this.contextRoot) // reset context only for non-root metafacades
112 {
113 context = getContext(context); // to have same value as in original constructor call
114 setMetafacadeContext (context);
115 if (this.superUseCaseFacadeInitialized)
116 {
117 ((MetafacadeBase)this.superUseCaseFacade).resetMetafacadeContext(context);
118 }
119 }
120 }
121
122 /**
123 * @return boolean true always
124 * @see JBpmProcessDefinition
125 */
126 public boolean isJBpmProcessDefinitionMetaType()
127 {
128 return true;
129 }
130
131 // --------------- attributes ---------------------
132
133 /**
134 * @see org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition#isBusinessProcess()
135 * @return boolean
136 */
137 protected abstract boolean handleIsBusinessProcess();
138
139 private boolean __businessProcess1a;
140 private boolean __businessProcess1aSet = false;
141
142 /**
143 * TODO: Model Documentation for
144 * org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition.businessProcess
145 * @return (boolean)handleIsBusinessProcess()
146 */
147 public final boolean isBusinessProcess()
148 {
149 boolean businessProcess1a = this.__businessProcess1a;
150 if (!this.__businessProcess1aSet)
151 {
152 // businessProcess has no pre constraints
153 businessProcess1a = handleIsBusinessProcess();
154 // businessProcess has no post constraints
155 this.__businessProcess1a = businessProcess1a;
156 if (isMetafacadePropertyCachingEnabled())
157 {
158 this.__businessProcess1aSet = true;
159 }
160 }
161 return businessProcess1a;
162 }
163
164 /**
165 * @see org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition#getDescriptorFullPath()
166 * @return String
167 */
168 protected abstract String handleGetDescriptorFullPath();
169
170 private String __descriptorFullPath2a;
171 private boolean __descriptorFullPath2aSet = false;
172
173 /**
174 * TODO: Model Documentation for
175 * org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition.descriptorFullPath
176 * @return (String)handleGetDescriptorFullPath()
177 */
178 public final String getDescriptorFullPath()
179 {
180 String descriptorFullPath2a = this.__descriptorFullPath2a;
181 if (!this.__descriptorFullPath2aSet)
182 {
183 // descriptorFullPath has no pre constraints
184 descriptorFullPath2a = handleGetDescriptorFullPath();
185 // descriptorFullPath has no post constraints
186 this.__descriptorFullPath2a = descriptorFullPath2a;
187 if (isMetafacadePropertyCachingEnabled())
188 {
189 this.__descriptorFullPath2aSet = true;
190 }
191 }
192 return descriptorFullPath2a;
193 }
194
195 /**
196 * @see org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition#getNodeInterfaceName()
197 * @return String
198 */
199 protected abstract String handleGetNodeInterfaceName();
200
201 private String __nodeInterfaceName3a;
202 private boolean __nodeInterfaceName3aSet = false;
203
204 /**
205 * TODO: Model Documentation for
206 * org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition.nodeInterfaceName
207 * @return (String)handleGetNodeInterfaceName()
208 */
209 public final String getNodeInterfaceName()
210 {
211 String nodeInterfaceName3a = this.__nodeInterfaceName3a;
212 if (!this.__nodeInterfaceName3aSet)
213 {
214 // nodeInterfaceName has no pre constraints
215 nodeInterfaceName3a = handleGetNodeInterfaceName();
216 // nodeInterfaceName has no post constraints
217 this.__nodeInterfaceName3a = nodeInterfaceName3a;
218 if (isMetafacadePropertyCachingEnabled())
219 {
220 this.__nodeInterfaceName3aSet = true;
221 }
222 }
223 return nodeInterfaceName3a;
224 }
225
226 // ------------- associations ------------------
227
228 private List<JBpmNode> __getTaskNodes1r;
229 private boolean __getTaskNodes1rSet = false;
230
231 /**
232 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
233 * @return (List<JBpmNode>)handleGetTaskNodes()
234 */
235 public final List<JBpmNode> getTaskNodes()
236 {
237 List<JBpmNode> getTaskNodes1r = this.__getTaskNodes1r;
238 if (!this.__getTaskNodes1rSet)
239 {
240 // jBpmProcessDefinition has no pre constraints
241 List result = handleGetTaskNodes();
242 List shieldedResult = this.shieldedElements(result);
243 try
244 {
245 getTaskNodes1r = (List<JBpmNode>)shieldedResult;
246 }
247 catch (ClassCastException ex)
248 {
249 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
250 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getTaskNodes List<JBpmNode> " + result + ": " + shieldedResult);
251 }
252 // jBpmProcessDefinition has no post constraints
253 this.__getTaskNodes1r = getTaskNodes1r;
254 if (isMetafacadePropertyCachingEnabled())
255 {
256 this.__getTaskNodes1rSet = true;
257 }
258 }
259 return getTaskNodes1r;
260 }
261
262 /**
263 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
264 * @return List
265 */
266 protected abstract List handleGetTaskNodes();
267
268 private List<JBpmAction> __getTasks2r;
269 private boolean __getTasks2rSet = false;
270
271 /**
272 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
273 * @return (List<JBpmAction>)handleGetTasks()
274 */
275 public final List<JBpmAction> getTasks()
276 {
277 List<JBpmAction> getTasks2r = this.__getTasks2r;
278 if (!this.__getTasks2rSet)
279 {
280 // jBpmProcessDefinition has no pre constraints
281 List result = handleGetTasks();
282 List shieldedResult = this.shieldedElements(result);
283 try
284 {
285 getTasks2r = (List<JBpmAction>)shieldedResult;
286 }
287 catch (ClassCastException ex)
288 {
289 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
290 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getTasks List<JBpmAction> " + result + ": " + shieldedResult);
291 }
292 // jBpmProcessDefinition has no post constraints
293 this.__getTasks2r = getTasks2r;
294 if (isMetafacadePropertyCachingEnabled())
295 {
296 this.__getTasks2rSet = true;
297 }
298 }
299 return getTasks2r;
300 }
301
302 /**
303 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
304 * @return List
305 */
306 protected abstract List handleGetTasks();
307
308 private JBpmPseudostate __getStartState3r;
309 private boolean __getStartState3rSet = false;
310
311 /**
312 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
313 * @return (JBpmPseudostate)handleGetStartState()
314 */
315 public final JBpmPseudostate getStartState()
316 {
317 JBpmPseudostate getStartState3r = this.__getStartState3r;
318 if (!this.__getStartState3rSet)
319 {
320 // jBpmProcessDefinition has no pre constraints
321 Object result = handleGetStartState();
322 MetafacadeBase shieldedResult = this.shieldedElement(result);
323 try
324 {
325 getStartState3r = (JBpmPseudostate)shieldedResult;
326 }
327 catch (ClassCastException ex)
328 {
329 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
330 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getStartState JBpmPseudostate " + result + ": " + shieldedResult);
331 }
332 // jBpmProcessDefinition has no post constraints
333 this.__getStartState3r = getStartState3r;
334 if (isMetafacadePropertyCachingEnabled())
335 {
336 this.__getStartState3rSet = true;
337 }
338 }
339 return getStartState3r;
340 }
341
342 /**
343 * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
344 * @return Object
345 */
346 protected abstract Object handleGetStartState();
347
348 private List<JBpmNode> __getNodes4r;
349 private boolean __getNodes4rSet = false;
350
351 /**
352 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
353 * @return (List<JBpmNode>)handleGetNodes()
354 */
355 public final List<JBpmNode> getNodes()
356 {
357 List<JBpmNode> getNodes4r = this.__getNodes4r;
358 if (!this.__getNodes4rSet)
359 {
360 // jBpmProcessDefinition has no pre constraints
361 List result = handleGetNodes();
362 List shieldedResult = this.shieldedElements(result);
363 try
364 {
365 getNodes4r = (List<JBpmNode>)shieldedResult;
366 }
367 catch (ClassCastException ex)
368 {
369 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
370 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getNodes List<JBpmNode> " + result + ": " + shieldedResult);
371 }
372 // jBpmProcessDefinition has no post constraints
373 this.__getNodes4r = getNodes4r;
374 if (isMetafacadePropertyCachingEnabled())
375 {
376 this.__getNodes4rSet = true;
377 }
378 }
379 return getNodes4r;
380 }
381
382 /**
383 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
384 * @return List
385 */
386 protected abstract List handleGetNodes();
387
388 private List<JBpmPseudostate> __getForks5r;
389 private boolean __getForks5rSet = false;
390
391 /**
392 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
393 * @return (List<JBpmPseudostate>)handleGetForks()
394 */
395 public final List<JBpmPseudostate> getForks()
396 {
397 List<JBpmPseudostate> getForks5r = this.__getForks5r;
398 if (!this.__getForks5rSet)
399 {
400 // jBpmProcessDefinition has no pre constraints
401 List result = handleGetForks();
402 List shieldedResult = this.shieldedElements(result);
403 try
404 {
405 getForks5r = (List<JBpmPseudostate>)shieldedResult;
406 }
407 catch (ClassCastException ex)
408 {
409 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
410 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getForks List<JBpmPseudostate> " + result + ": " + shieldedResult);
411 }
412 // jBpmProcessDefinition has no post constraints
413 this.__getForks5r = getForks5r;
414 if (isMetafacadePropertyCachingEnabled())
415 {
416 this.__getForks5rSet = true;
417 }
418 }
419 return getForks5r;
420 }
421
422 /**
423 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
424 * @return List
425 */
426 protected abstract List handleGetForks();
427
428 private List<JBpmSwimlane> __getSwimlanes6r;
429 private boolean __getSwimlanes6rSet = false;
430
431 /**
432 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
433 * @return (List<JBpmSwimlane>)handleGetSwimlanes()
434 */
435 public final List<JBpmSwimlane> getSwimlanes()
436 {
437 List<JBpmSwimlane> getSwimlanes6r = this.__getSwimlanes6r;
438 if (!this.__getSwimlanes6rSet)
439 {
440 // jBpmProcessDefinition has no pre constraints
441 List result = handleGetSwimlanes();
442 List shieldedResult = this.shieldedElements(result);
443 try
444 {
445 getSwimlanes6r = (List<JBpmSwimlane>)shieldedResult;
446 }
447 catch (ClassCastException ex)
448 {
449 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
450 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getSwimlanes List<JBpmSwimlane> " + result + ": " + shieldedResult);
451 }
452 // jBpmProcessDefinition has no post constraints
453 this.__getSwimlanes6r = getSwimlanes6r;
454 if (isMetafacadePropertyCachingEnabled())
455 {
456 this.__getSwimlanes6rSet = true;
457 }
458 }
459 return getSwimlanes6r;
460 }
461
462 /**
463 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
464 * @return List
465 */
466 protected abstract List handleGetSwimlanes();
467
468 private List<JBpmState> __getStates7r;
469 private boolean __getStates7rSet = false;
470
471 /**
472 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
473 * @return (List<JBpmState>)handleGetStates()
474 */
475 public final List<JBpmState> getStates()
476 {
477 List<JBpmState> getStates7r = this.__getStates7r;
478 if (!this.__getStates7rSet)
479 {
480 // jBpmProcessDefinition has no pre constraints
481 List result = handleGetStates();
482 List shieldedResult = this.shieldedElements(result);
483 try
484 {
485 getStates7r = (List<JBpmState>)shieldedResult;
486 }
487 catch (ClassCastException ex)
488 {
489 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
490 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getStates List<JBpmState> " + result + ": " + shieldedResult);
491 }
492 // jBpmProcessDefinition has no post constraints
493 this.__getStates7r = getStates7r;
494 if (isMetafacadePropertyCachingEnabled())
495 {
496 this.__getStates7rSet = true;
497 }
498 }
499 return getStates7r;
500 }
501
502 /**
503 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
504 * @return List
505 */
506 protected abstract List handleGetStates();
507
508 private List<JBpmPseudostate> __getDecisions8r;
509 private boolean __getDecisions8rSet = false;
510
511 /**
512 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
513 * @return (List<JBpmPseudostate>)handleGetDecisions()
514 */
515 public final List<JBpmPseudostate> getDecisions()
516 {
517 List<JBpmPseudostate> getDecisions8r = this.__getDecisions8r;
518 if (!this.__getDecisions8rSet)
519 {
520 // jBpmProcessDefinition has no pre constraints
521 List result = handleGetDecisions();
522 List shieldedResult = this.shieldedElements(result);
523 try
524 {
525 getDecisions8r = (List<JBpmPseudostate>)shieldedResult;
526 }
527 catch (ClassCastException ex)
528 {
529 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
530 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getDecisions List<JBpmPseudostate> " + result + ": " + shieldedResult);
531 }
532 // jBpmProcessDefinition has no post constraints
533 this.__getDecisions8r = getDecisions8r;
534 if (isMetafacadePropertyCachingEnabled())
535 {
536 this.__getDecisions8rSet = true;
537 }
538 }
539 return getDecisions8r;
540 }
541
542 /**
543 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
544 * @return List
545 */
546 protected abstract List handleGetDecisions();
547
548 private List<JBpmEndState> __getEndStates9r;
549 private boolean __getEndStates9rSet = false;
550
551 /**
552 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
553 * @return (List<JBpmEndState>)handleGetEndStates()
554 */
555 public final List<JBpmEndState> getEndStates()
556 {
557 List<JBpmEndState> getEndStates9r = this.__getEndStates9r;
558 if (!this.__getEndStates9rSet)
559 {
560 // jBpmProcessDefinition has no pre constraints
561 List result = handleGetEndStates();
562 List shieldedResult = this.shieldedElements(result);
563 try
564 {
565 getEndStates9r = (List<JBpmEndState>)shieldedResult;
566 }
567 catch (ClassCastException ex)
568 {
569 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
570 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getEndStates List<JBpmEndState> " + result + ": " + shieldedResult);
571 }
572 // jBpmProcessDefinition has no post constraints
573 this.__getEndStates9r = getEndStates9r;
574 if (isMetafacadePropertyCachingEnabled())
575 {
576 this.__getEndStates9rSet = true;
577 }
578 }
579 return getEndStates9r;
580 }
581
582 /**
583 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
584 * @return List
585 */
586 protected abstract List handleGetEndStates();
587
588 private List<JBpmPseudostate> __getJoins10r;
589 private boolean __getJoins10rSet = false;
590
591 /**
592 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmProcessDefinition
593 * @return (List<JBpmPseudostate>)handleGetJoins()
594 */
595 public final List<JBpmPseudostate> getJoins()
596 {
597 List<JBpmPseudostate> getJoins10r = this.__getJoins10r;
598 if (!this.__getJoins10rSet)
599 {
600 // jBpmProcessDefinition has no pre constraints
601 List result = handleGetJoins();
602 List shieldedResult = this.shieldedElements(result);
603 try
604 {
605 getJoins10r = (List<JBpmPseudostate>)shieldedResult;
606 }
607 catch (ClassCastException ex)
608 {
609 // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
610 JBpmProcessDefinitionLogic.logger.warn("incorrect metafacade cast for JBpmProcessDefinitionLogic.getJoins List<JBpmPseudostate> " + result + ": " + shieldedResult);
611 }
612 // jBpmProcessDefinition has no post constraints
613 this.__getJoins10r = getJoins10r;
614 if (isMetafacadePropertyCachingEnabled())
615 {
616 this.__getJoins10rSet = true;
617 }
618 }
619 return getJoins10r;
620 }
621
622 /**
623 * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
624 * @return List
625 */
626 protected abstract List handleGetJoins();
627
628 /**
629 * @return true
630 * @see UseCaseFacade
631 */
632 public boolean isUseCaseFacadeMetaType()
633 {
634 return true;
635 }
636
637 /**
638 * @return true
639 * @see org.andromda.metafacades.uml.NamespaceFacade
640 */
641 public boolean isNamespaceFacadeMetaType()
642 {
643 return true;
644 }
645
646 /**
647 * @return true
648 * @see ClassifierFacade
649 */
650 public boolean isClassifierFacadeMetaType()
651 {
652 return true;
653 }
654
655 /**
656 * @return true
657 * @see GeneralizableElementFacade
658 */
659 public boolean isGeneralizableElementFacadeMetaType()
660 {
661 return true;
662 }
663
664 /**
665 * @return true
666 * @see ModelElementFacade
667 */
668 public boolean isModelElementFacadeMetaType()
669 {
670 return true;
671 }
672
673 // ----------- delegates to UseCaseFacade ------------
674 /**
675 * Return the attribute which name matches the parameter
676 * @see ClassifierFacade#findAttribute(String name)
677 */
678 public AttributeFacade findAttribute(String name)
679 {
680 return this.getSuperUseCaseFacade().findAttribute(name);
681 }
682
683 /**
684 * Those abstraction dependencies for which this classifier is the client.
685 * @see ClassifierFacade#getAbstractions()
686 */
687 public Collection<ClassifierFacade> getAbstractions()
688 {
689 return this.getSuperUseCaseFacade().getAbstractions();
690 }
691
692 /**
693 * Lists all classes associated to this one and any ancestor classes (through generalization).
694 * There will be no duplicates. The order of the elements is predictable.
695 * @see ClassifierFacade#getAllAssociatedClasses()
696 */
697 public Collection<ClassifierFacade> getAllAssociatedClasses()
698 {
699 return this.getSuperUseCaseFacade().getAllAssociatedClasses();
700 }
701
702 /**
703 * A collection containing all 'properties' of the classifier and its ancestors. Properties are
704 * any attributes and navigable connecting association ends.
705 * @see ClassifierFacade#getAllProperties()
706 */
707 public Collection<ModelElementFacade> getAllProperties()
708 {
709 return this.getSuperUseCaseFacade().getAllProperties();
710 }
711
712 /**
713 * A collection containing all required and/or read-only 'properties' of the classifier and its
714 * ancestors. Properties are any attributes and navigable connecting association ends.
715 * @see ClassifierFacade#getAllRequiredConstructorParameters()
716 */
717 public Collection<ModelElementFacade> getAllRequiredConstructorParameters()
718 {
719 return this.getSuperUseCaseFacade().getAllRequiredConstructorParameters();
720 }
721
722 /**
723 * Gets the array type for this classifier. If this classifier already represents an array, it
724 * just returns itself.
725 * @see ClassifierFacade#getArray()
726 */
727 public ClassifierFacade getArray()
728 {
729 return this.getSuperUseCaseFacade().getArray();
730 }
731
732 /**
733 * The name of the classifier as an array.
734 * @see ClassifierFacade#getArrayName()
735 */
736 public String getArrayName()
737 {
738 return this.getSuperUseCaseFacade().getArrayName();
739 }
740
741 /**
742 * Lists the classes associated to this one, there is no repitition of classes. The order of the
743 * elements is predictable.
744 * @see ClassifierFacade#getAssociatedClasses()
745 */
746 public Collection<ClassifierFacade> getAssociatedClasses()
747 {
748 return this.getSuperUseCaseFacade().getAssociatedClasses();
749 }
750
751 /**
752 * Gets the association ends belonging to a classifier.
753 * @see ClassifierFacade#getAssociationEnds()
754 */
755 public List<AssociationEndFacade> getAssociationEnds()
756 {
757 return this.getSuperUseCaseFacade().getAssociationEnds();
758 }
759
760 /**
761 * Gets the attributes that belong to the classifier.
762 * @see ClassifierFacade#getAttributes()
763 */
764 public List<AttributeFacade> getAttributes()
765 {
766 return this.getSuperUseCaseFacade().getAttributes();
767 }
768
769 /**
770 * Gets all attributes for the classifier and if 'follow' is true goes up the inheritance
771 * hierarchy and gets the attributes from the super classes as well.
772 * @see ClassifierFacade#getAttributes(boolean follow)
773 */
774 public List<AttributeFacade> getAttributes(boolean follow)
775 {
776 return this.getSuperUseCaseFacade().getAttributes(follow);
777 }
778
779 /**
780 * The fully qualified name of the classifier as an array.
781 * @see ClassifierFacade#getFullyQualifiedArrayName()
782 */
783 public String getFullyQualifiedArrayName()
784 {
785 return this.getSuperUseCaseFacade().getFullyQualifiedArrayName();
786 }
787
788 /**
789 * Returns all those operations that could be implemented at this classifier's level. This means
790 * the operations owned by this classifier as well as any realized interface's operations
791 * (recursively) in case this classifier itself is not already an interface, or generalized when
792 * this classifier is an interface.
793 * @see ClassifierFacade#getImplementationOperations()
794 */
795 public Collection<OperationFacade> getImplementationOperations()
796 {
797 return this.getSuperUseCaseFacade().getImplementationOperations();
798 }
799
800 /**
801 * A comma separated list of the fully qualified names of all implemented interfaces.
802 * @see ClassifierFacade#getImplementedInterfaceList()
803 */
804 public String getImplementedInterfaceList()
805 {
806 return this.getSuperUseCaseFacade().getImplementedInterfaceList();
807 }
808
809 /**
810 * Those attributes that are scoped to an instance of this class.
811 * @see ClassifierFacade#getInstanceAttributes()
812 */
813 public Collection<AttributeFacade> getInstanceAttributes()
814 {
815 return this.getSuperUseCaseFacade().getInstanceAttributes();
816 }
817
818 /**
819 * Those operations that are scoped to an instance of this class.
820 * @see ClassifierFacade#getInstanceOperations()
821 */
822 public List<OperationFacade> getInstanceOperations()
823 {
824 return this.getSuperUseCaseFacade().getInstanceOperations();
825 }
826
827 /**
828 * Those interfaces that are abstractions of this classifier, this basically means this
829 * classifier realizes them.
830 * @see ClassifierFacade#getInterfaceAbstractions()
831 */
832 public Collection<ClassifierFacade> getInterfaceAbstractions()
833 {
834 return this.getSuperUseCaseFacade().getInterfaceAbstractions();
835 }
836
837 /**
838 * A String representing a new Constructor declaration for this classifier type to be used in a
839 * Java environment.
840 * @see ClassifierFacade#getJavaNewString()
841 */
842 public String getJavaNewString()
843 {
844 return this.getSuperUseCaseFacade().getJavaNewString();
845 }
846
847 /**
848 * A String representing the null-value for this classifier type to be used in a Java
849 * environment.
850 * @see ClassifierFacade#getJavaNullString()
851 */
852 public String getJavaNullString()
853 {
854 return this.getSuperUseCaseFacade().getJavaNullString();
855 }
856
857 /**
858 * The other ends of this classifier's association ends which are navigable.
859 * @see ClassifierFacade#getNavigableConnectingEnds()
860 */
861 public Collection<AssociationEndFacade> getNavigableConnectingEnds()
862 {
863 return this.getSuperUseCaseFacade().getNavigableConnectingEnds();
864 }
865
866 /**
867 * Get the other ends of this classifier's association ends which are navigable and if 'follow'
868 * is true goes up the inheritance hierarchy and gets the super association ends as well.
869 * @see ClassifierFacade#getNavigableConnectingEnds(boolean follow)
870 */
871 public List<AssociationEndFacade> getNavigableConnectingEnds(boolean follow)
872 {
873 return this.getSuperUseCaseFacade().getNavigableConnectingEnds(follow);
874 }
875
876 /**
877 * Assuming that the classifier is an array, this will return the non array type of the
878 * classifier from
879 * the model. If the classifier is NOT an array, it will just return itself.
880 * @see ClassifierFacade#getNonArray()
881 */
882 public ClassifierFacade getNonArray()
883 {
884 return this.getSuperUseCaseFacade().getNonArray();
885 }
886
887 /**
888 * The attributes from this classifier in the form of an operation call (this example would be
889 * in Java): '(String attributeOne, String attributeTwo). If there were no attributes on the
890 * classifier, the result would be an empty '()'.
891 * @see ClassifierFacade#getOperationCallFromAttributes()
892 */
893 public String getOperationCallFromAttributes()
894 {
895 return this.getSuperUseCaseFacade().getOperationCallFromAttributes();
896 }
897
898 /**
899 * The operations owned by this classifier.
900 * @see ClassifierFacade#getOperations()
901 */
902 public List<OperationFacade> getOperations()
903 {
904 return this.getSuperUseCaseFacade().getOperations();
905 }
906
907 /**
908 * A collection containing all 'properties' of the classifier. Properties are any attributes
909 * and navigable connecting association ends.
910 * @see ClassifierFacade#getProperties()
911 */
912 public List<ModelElementFacade> getProperties()
913 {
914 return this.getSuperUseCaseFacade().getProperties();
915 }
916
917 /**
918 * Gets all properties (attributes and navigable association ends) for the classifier and if
919 * 'follow' is true goes up the inheritance hierarchy and gets the properties from the super
920 * classes as well.
921 * @see ClassifierFacade#getProperties(boolean follow)
922 */
923 public List getProperties(boolean follow)
924 {
925 return this.getSuperUseCaseFacade().getProperties(follow);
926 }
927
928 /**
929 * A collection containing all required and/or read-only 'properties' of the classifier.
930 * Properties are any attributes and navigable connecting association ends.
931 * @see ClassifierFacade#getRequiredConstructorParameters()
932 */
933 public Collection<ModelElementFacade> getRequiredConstructorParameters()
934 {
935 return this.getSuperUseCaseFacade().getRequiredConstructorParameters();
936 }
937
938 /**
939 * Returns the serial version UID of the underlying model element.
940 * @see ClassifierFacade#getSerialVersionUID()
941 */
942 public long getSerialVersionUID()
943 {
944 return this.getSuperUseCaseFacade().getSerialVersionUID();
945 }
946
947 /**
948 * Those attributes that are scoped to the definition of this class.
949 * @see ClassifierFacade#getStaticAttributes()
950 */
951 public Collection<AttributeFacade> getStaticAttributes()
952 {
953 return this.getSuperUseCaseFacade().getStaticAttributes();
954 }
955
956 /**
957 * Those operations that are scoped to the definition of this class.
958 * @see ClassifierFacade#getStaticOperations()
959 */
960 public List<OperationFacade> getStaticOperations()
961 {
962 return this.getSuperUseCaseFacade().getStaticOperations();
963 }
964
965 /**
966 * This class' superclass, returns the generalization if it is a ClassifierFacade, null
967 * otherwise.
968 * @see ClassifierFacade#getSuperClass()
969 */
970 public ClassifierFacade getSuperClass()
971 {
972 return this.getSuperUseCaseFacade().getSuperClass();
973 }
974
975 /**
976 * The wrapper name for this classifier if a mapped type has a defined wrapper class (ie. 'long'
977 * maps to 'Long'). If the classifier doesn't have a wrapper defined for it, this method will
978 * return a null. Note that wrapper mappings must be defined for the namespace by defining the
979 * 'wrapperMappingsUri', this property must point to the location of the mappings file which
980 * maps the primitives to wrapper types.
981 * @see ClassifierFacade#getWrapperName()
982 */
983 public String getWrapperName()
984 {
985 return this.getSuperUseCaseFacade().getWrapperName();
986 }
987
988 /**
989 * Indicates if this classifier is 'abstract'.
990 * @see ClassifierFacade#isAbstract()
991 */
992 public boolean isAbstract()
993 {
994 return this.getSuperUseCaseFacade().isAbstract();
995 }
996
997 /**
998 * True if this classifier represents an array type. False otherwise.
999 * @see ClassifierFacade#isArrayType()
1000 */
1001 public boolean isArrayType()
1002 {
1003 return this.getSuperUseCaseFacade().isArrayType();
1004 }
1005
1006 /**
1007 * True if the ClassifierFacade is an AssociationClass.
1008 * @see ClassifierFacade#isAssociationClass()
1009 */
1010 public boolean isAssociationClass()
1011 {
1012 return this.getSuperUseCaseFacade().isAssociationClass();
1013 }
1014
1015 /**
1016 * Returns true if this type represents a Blob type.
1017 * @see ClassifierFacade#isBlobType()
1018 */
1019 public boolean isBlobType()
1020 {
1021 return this.getSuperUseCaseFacade().isBlobType();
1022 }
1023
1024 /**
1025 * Indicates if this type represents a boolean type or not.
1026 * @see ClassifierFacade#isBooleanType()
1027 */
1028 public boolean isBooleanType()
1029 {
1030 return this.getSuperUseCaseFacade().isBooleanType();
1031 }
1032
1033 /**
1034 * Indicates if this type represents a char, Character, or java.lang.Character type or not.
1035 * @see ClassifierFacade#isCharacterType()
1036 */
1037 public boolean isCharacterType()
1038 {
1039 return this.getSuperUseCaseFacade().isCharacterType();
1040 }
1041
1042 /**
1043 * Returns true if this type represents a Clob type.
1044 * @see ClassifierFacade#isClobType()
1045 */
1046 public boolean isClobType()
1047 {
1048 return this.getSuperUseCaseFacade().isClobType();
1049 }
1050
1051 /**
1052 * True if this classifier represents a collection type. False otherwise.
1053 * @see ClassifierFacade#isCollectionType()
1054 */
1055 public boolean isCollectionType()
1056 {
1057 return this.getSuperUseCaseFacade().isCollectionType();
1058 }
1059
1060 /**
1061 * True/false depending on whether or not this classifier represents a datatype. A data type is
1062 * a type whose instances are identified only by their value. A data type may contain attributes
1063 * to support the modeling of structured data types.
1064 * @see ClassifierFacade#isDataType()
1065 */
1066 public boolean isDataType()
1067 {
1068 return this.getSuperUseCaseFacade().isDataType();
1069 }
1070
1071 /**
1072 * True when this classifier is a date type.
1073 * @see ClassifierFacade#isDateType()
1074 */
1075 public boolean isDateType()
1076 {
1077 return this.getSuperUseCaseFacade().isDateType();
1078 }
1079
1080 /**
1081 * Indicates if this type represents a Double type or not.
1082 * @see ClassifierFacade#isDoubleType()
1083 */
1084 public boolean isDoubleType()
1085 {
1086 return this.getSuperUseCaseFacade().isDoubleType();
1087 }
1088
1089 /**
1090 * Indicates whether or not this classifier represents an "EmbeddedValue'.
1091 * @see ClassifierFacade#isEmbeddedValue()
1092 */
1093 public boolean isEmbeddedValue()
1094 {
1095 return this.getSuperUseCaseFacade().isEmbeddedValue();
1096 }
1097
1098 /**
1099 * True if this classifier is in fact marked as an enumeration.
1100 * @see ClassifierFacade#isEnumeration()
1101 */
1102 public boolean isEnumeration()
1103 {
1104 return this.getSuperUseCaseFacade().isEnumeration();
1105 }
1106
1107 /**
1108 * Returns true if this type represents a 'file' type.
1109 * @see ClassifierFacade#isFileType()
1110 */
1111 public boolean isFileType()
1112 {
1113 return this.getSuperUseCaseFacade().isFileType();
1114 }
1115
1116 /**
1117 * Indicates if this type represents a Float type or not.
1118 * @see ClassifierFacade#isFloatType()
1119 */
1120 public boolean isFloatType()
1121 {
1122 return this.getSuperUseCaseFacade().isFloatType();
1123 }
1124
1125 /**
1126 * Indicates if this type represents an int or Integer or java.lang.Integer type or not.
1127 * @see ClassifierFacade#isIntegerType()
1128 */
1129 public boolean isIntegerType()
1130 {
1131 return this.getSuperUseCaseFacade().isIntegerType();
1132 }
1133
1134 /**
1135 * True/false depending on whether or not this Classifier represents an interface.
1136 * @see ClassifierFacade#isInterface()
1137 */
1138 public boolean isInterface()
1139 {
1140 return this.getSuperUseCaseFacade().isInterface();
1141 }
1142
1143 /**
1144 * True if this classifier cannot be extended and represent a leaf in the inheritance tree.
1145 * @see ClassifierFacade#isLeaf()
1146 */
1147 public boolean isLeaf()
1148 {
1149 return this.getSuperUseCaseFacade().isLeaf();
1150 }
1151
1152 /**
1153 * True if this classifier represents a list type. False otherwise.
1154 * @see ClassifierFacade#isListType()
1155 */
1156 public boolean isListType()
1157 {
1158 return this.getSuperUseCaseFacade().isListType();
1159 }
1160
1161 /**
1162 * Indicates if this type represents a Long type or not.
1163 * @see ClassifierFacade#isLongType()
1164 */
1165 public boolean isLongType()
1166 {
1167 return this.getSuperUseCaseFacade().isLongType();
1168 }
1169
1170 /**
1171 * Indicates whether or not this classifier represents a Map type.
1172 * @see ClassifierFacade#isMapType()
1173 */
1174 public boolean isMapType()
1175 {
1176 return this.getSuperUseCaseFacade().isMapType();
1177 }
1178
1179 /**
1180 * Indicates whether or not this classifier represents a primitive type.
1181 * @see ClassifierFacade#isPrimitive()
1182 */
1183 public boolean isPrimitive()
1184 {
1185 return this.getSuperUseCaseFacade().isPrimitive();
1186 }
1187
1188 /**
1189 * True if this classifier represents a set type. False otherwise.
1190 * @see ClassifierFacade#isSetType()
1191 */
1192 public boolean isSetType()
1193 {
1194 return this.getSuperUseCaseFacade().isSetType();
1195 }
1196
1197 /**
1198 * Indicates whether or not this classifier represents a string type.
1199 * @see ClassifierFacade#isStringType()
1200 */
1201 public boolean isStringType()
1202 {
1203 return this.getSuperUseCaseFacade().isStringType();
1204 }
1205
1206 /**
1207 * Indicates whether or not this classifier represents a time type.
1208 * @see ClassifierFacade#isTimeType()
1209 */
1210 public boolean isTimeType()
1211 {
1212 return this.getSuperUseCaseFacade().isTimeType();
1213 }
1214
1215 /**
1216 * Returns true if this type is a wrapped primitive type.
1217 * @see ClassifierFacade#isWrappedPrimitive()
1218 */
1219 public boolean isWrappedPrimitive()
1220 {
1221 return this.getSuperUseCaseFacade().isWrappedPrimitive();
1222 }
1223
1224 /**
1225 * Finds the tagged value optional searching the entire inheritance hierarchy if 'follow' is set
1226 * to true.
1227 * @see GeneralizableElementFacade#findTaggedValue(String tagName, boolean follow)
1228 */
1229 public Object findTaggedValue(String tagName, boolean follow)
1230 {
1231 return this.getSuperUseCaseFacade().findTaggedValue(tagName, follow);
1232 }
1233
1234 /**
1235 * All generalizations for this generalizable element, goes up the inheritance tree.
1236 * @see GeneralizableElementFacade#getAllGeneralizations()
1237 */
1238 public Collection<GeneralizableElementFacade> getAllGeneralizations()
1239 {
1240 return this.getSuperUseCaseFacade().getAllGeneralizations();
1241 }
1242
1243 /**
1244 * All specializations (travels down the inheritance hierarchy).
1245 * @see GeneralizableElementFacade#getAllSpecializations()
1246 */
1247 public Collection<GeneralizableElementFacade> getAllSpecializations()
1248 {
1249 return this.getSuperUseCaseFacade().getAllSpecializations();
1250 }
1251
1252 /**
1253 * Gets the direct generalization for this generalizable element.
1254 * @see GeneralizableElementFacade#getGeneralization()
1255 */
1256 public GeneralizableElementFacade getGeneralization()
1257 {
1258 return this.getSuperUseCaseFacade().getGeneralization();
1259 }
1260
1261 /**
1262 * Gets the actual links that this generalization element is part of (it plays either the
1263 * specialization or generalization).
1264 * @see GeneralizableElementFacade#getGeneralizationLinks()
1265 */
1266 public Collection<GeneralizationFacade> getGeneralizationLinks()
1267 {
1268 return this.getSuperUseCaseFacade().getGeneralizationLinks();
1269 }
1270
1271 /**
1272 * A comma separated list of the fully qualified names of all generalizations.
1273 * @see GeneralizableElementFacade#getGeneralizationList()
1274 */
1275 public String getGeneralizationList()
1276 {
1277 return this.getSuperUseCaseFacade().getGeneralizationList();
1278 }
1279
1280 /**
1281 * The element found when you recursively follow the generalization path up to the root. If an
1282 * element has no generalization itself will be considered the root.
1283 * @see GeneralizableElementFacade#getGeneralizationRoot()
1284 */
1285 public GeneralizableElementFacade getGeneralizationRoot()
1286 {
1287 return this.getSuperUseCaseFacade().getGeneralizationRoot();
1288 }
1289
1290 /**
1291 * Return all generalizations (ancestors) from this generalizable element.
1292 * @see GeneralizableElementFacade#getGeneralizations()
1293 */
1294 public Collection<GeneralizableElementFacade> getGeneralizations()
1295 {
1296 return this.getSuperUseCaseFacade().getGeneralizations();
1297 }
1298
1299 /**
1300 * Gets the direct specializations (i.e. sub elements) for this generalizatble element.
1301 * @see GeneralizableElementFacade#getSpecializations()
1302 */
1303 public Collection<GeneralizableElementFacade> getSpecializations()
1304 {
1305 return this.getSuperUseCaseFacade().getSpecializations();
1306 }
1307
1308 /**
1309 * Copies all tagged values from the given ModelElementFacade to this model element facade.
1310 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
1311 */
1312 public void copyTaggedValues(ModelElementFacade element)
1313 {
1314 this.getSuperUseCaseFacade().copyTaggedValues(element);
1315 }
1316
1317 /**
1318 * Finds the tagged value with the specified 'tagName'. In case there are more values the first
1319 * one found will be returned.
1320 * @see ModelElementFacade#findTaggedValue(String tagName)
1321 */
1322 public Object findTaggedValue(String tagName)
1323 {
1324 return this.getSuperUseCaseFacade().findTaggedValue(tagName);
1325 }
1326
1327 /**
1328 * Returns all the values for the tagged value with the specified name. The returned collection
1329 * will contains only String instances, or will be empty. Never null.
1330 * @see ModelElementFacade#findTaggedValues(String tagName)
1331 */
1332 public Collection<Object> findTaggedValues(String tagName)
1333 {
1334 return this.getSuperUseCaseFacade().findTaggedValues(tagName);
1335 }
1336
1337 /**
1338 * Returns the fully qualified name of the model element. The fully qualified name includes
1339 * complete package qualified name of the underlying model element. The templates parameter will
1340 * be replaced by the correct one given the binding relation of the parameter to this element.
1341 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1342 */
1343 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1344 {
1345 return this.getSuperUseCaseFacade().getBindedFullyQualifiedName(bindedElement);
1346 }
1347
1348 /**
1349 * Gets all constraints belonging to the model element.
1350 * @see ModelElementFacade#getConstraints()
1351 */
1352 public Collection<ConstraintFacade> getConstraints()
1353 {
1354 return this.getSuperUseCaseFacade().getConstraints();
1355 }
1356
1357 /**
1358 * Returns the constraints of the argument kind that have been placed onto this model. Typical
1359 * kinds are "inv", "pre" and "post". Other kinds are possible.
1360 * @see ModelElementFacade#getConstraints(String kind)
1361 */
1362 public Collection<ConstraintFacade> getConstraints(String kind)
1363 {
1364 return this.getSuperUseCaseFacade().getConstraints(kind);
1365 }
1366
1367 /**
1368 * Gets the documentation for the model element, The indent argument is prefixed to each line.
1369 * By default this method wraps lines after 64 characters.
1370 * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
1371 * @see ModelElementFacade#getDocumentation(String indent)
1372 */
1373 public String getDocumentation(String indent)
1374 {
1375 return this.getSuperUseCaseFacade().getDocumentation(indent);
1376 }
1377
1378 /**
1379 * This method returns the documentation for this model element, with the lines wrapped after
1380 * the specified number of characters, values of less than 1 will indicate no line wrapping is
1381 * required. By default paragraphs are returned as HTML.
1382 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
1383 * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
1384 */
1385 public String getDocumentation(String indent, int lineLength)
1386 {
1387 return this.getSuperUseCaseFacade().getDocumentation(indent, lineLength);
1388 }
1389
1390 /**
1391 * This method returns the documentation for this model element, with the lines wrapped after
1392 * the specified number of characters, values of less than 1 will indicate no line wrapping is
1393 * required. HTML style determines if HTML Escaping is applied.
1394 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
1395 */
1396 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
1397 {
1398 return this.getSuperUseCaseFacade().getDocumentation(indent, lineLength, htmlStyle);
1399 }
1400
1401 /**
1402 * The fully qualified name of this model element.
1403 * @see ModelElementFacade#getFullyQualifiedName()
1404 */
1405 public String getFullyQualifiedName()
1406 {
1407 return this.getSuperUseCaseFacade().getFullyQualifiedName();
1408 }
1409
1410 /**
1411 * Returns the fully qualified name of the model element. The fully qualified name includes
1412 * complete package qualified name of the underlying model element. If modelName is true, then
1413 * the original name of the model element (the name contained within the model) will be the name
1414 * returned, otherwise a name from a language mapping will be returned.
1415 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
1416 */
1417 public String getFullyQualifiedName(boolean modelName)
1418 {
1419 return this.getSuperUseCaseFacade().getFullyQualifiedName(modelName);
1420 }
1421
1422 /**
1423 * Returns the fully qualified name as a path, the returned value always starts with out a slash
1424 * '/'.
1425 * @see ModelElementFacade#getFullyQualifiedNamePath()
1426 */
1427 public String getFullyQualifiedNamePath()
1428 {
1429 return this.getSuperUseCaseFacade().getFullyQualifiedNamePath();
1430 }
1431
1432 /**
1433 * Gets the unique identifier of the underlying model element.
1434 * @see ModelElementFacade#getId()
1435 */
1436 public String getId()
1437 {
1438 return this.getSuperUseCaseFacade().getId();
1439 }
1440
1441 /**
1442 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
1443 * are not represented by other properties, i.e. native, transient, volatile, synchronized,
1444 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
1445 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
1446 * JDK5 compiler level.
1447 * @see ModelElementFacade#getKeywords()
1448 */
1449 public Collection<String> getKeywords()
1450 {
1451 return this.getSuperUseCaseFacade().getKeywords();
1452 }
1453
1454 /**
1455 * UML2: Retrieves a localized label for this named element.
1456 * @see ModelElementFacade#getLabel()
1457 */
1458 public String getLabel()
1459 {
1460 return this.getSuperUseCaseFacade().getLabel();
1461 }
1462
1463 /**
1464 * The language mappings that have been set for this model element.
1465 * @see ModelElementFacade#getLanguageMappings()
1466 */
1467 public TypeMappings getLanguageMappings()
1468 {
1469 return this.getSuperUseCaseFacade().getLanguageMappings();
1470 }
1471
1472 /**
1473 * Return the model containing this model element (multiple models may be loaded and processed
1474 * at the same time).
1475 * @see ModelElementFacade#getModel()
1476 */
1477 public ModelFacade getModel()
1478 {
1479 return this.getSuperUseCaseFacade().getModel();
1480 }
1481
1482 /**
1483 * The name of the model element.
1484 * @see ModelElementFacade#getName()
1485 */
1486 public String getName()
1487 {
1488 return this.getSuperUseCaseFacade().getName();
1489 }
1490
1491 /**
1492 * Gets the package to which this model element belongs.
1493 * @see ModelElementFacade#getPackage()
1494 */
1495 public ModelElementFacade getPackage()
1496 {
1497 return this.getSuperUseCaseFacade().getPackage();
1498 }
1499
1500 /**
1501 * The name of this model element's package.
1502 * @see ModelElementFacade#getPackageName()
1503 */
1504 public String getPackageName()
1505 {
1506 return this.getSuperUseCaseFacade().getPackageName();
1507 }
1508
1509 /**
1510 * Gets the package name (optionally providing the ability to retrieve the model name and not
1511 * the mapped name).
1512 * @see ModelElementFacade#getPackageName(boolean modelName)
1513 */
1514 public String getPackageName(boolean modelName)
1515 {
1516 return this.getSuperUseCaseFacade().getPackageName(modelName);
1517 }
1518
1519 /**
1520 * Returns the package as a path, the returned value always starts with out a slash '/'.
1521 * @see ModelElementFacade#getPackagePath()
1522 */
1523 public String getPackagePath()
1524 {
1525 return this.getSuperUseCaseFacade().getPackagePath();
1526 }
1527
1528 /**
1529 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
1530 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
1531 * the names of the containing namespaces starting at the root of the hierarchy and ending with
1532 * the name of the NamedElement itself.
1533 * @see ModelElementFacade#getQualifiedName()
1534 */
1535 public String getQualifiedName()
1536 {
1537 return this.getSuperUseCaseFacade().getQualifiedName();
1538 }
1539
1540 /**
1541 * Gets the root package for the model element.
1542 * @see ModelElementFacade#getRootPackage()
1543 */
1544 public PackageFacade getRootPackage()
1545 {
1546 return this.getSuperUseCaseFacade().getRootPackage();
1547 }
1548
1549 /**
1550 * Gets the dependencies for which this model element is the source.
1551 * @see ModelElementFacade#getSourceDependencies()
1552 */
1553 public Collection<DependencyFacade> getSourceDependencies()
1554 {
1555 return this.getSuperUseCaseFacade().getSourceDependencies();
1556 }
1557
1558 /**
1559 * If this model element is the context of an activity graph, this represents that activity
1560 * graph.
1561 * @see ModelElementFacade#getStateMachineContext()
1562 */
1563 public StateMachineFacade getStateMachineContext()
1564 {
1565 return this.getSuperUseCaseFacade().getStateMachineContext();
1566 }
1567
1568 /**
1569 * The collection of ALL stereotype names for this model element.
1570 * @see ModelElementFacade#getStereotypeNames()
1571 */
1572 public Collection<String> getStereotypeNames()
1573 {
1574 return this.getSuperUseCaseFacade().getStereotypeNames();
1575 }
1576
1577 /**
1578 * Gets all stereotypes for this model element.
1579 * @see ModelElementFacade#getStereotypes()
1580 */
1581 public Collection<StereotypeFacade> getStereotypes()
1582 {
1583 return this.getSuperUseCaseFacade().getStereotypes();
1584 }
1585
1586 /**
1587 * Return the TaggedValues associated with this model element, under all stereotypes.
1588 * @see ModelElementFacade#getTaggedValues()
1589 */
1590 public Collection<TaggedValueFacade> getTaggedValues()
1591 {
1592 return this.getSuperUseCaseFacade().getTaggedValues();
1593 }
1594
1595 /**
1596 * Gets the dependencies for which this model element is the target.
1597 * @see ModelElementFacade#getTargetDependencies()
1598 */
1599 public Collection<DependencyFacade> getTargetDependencies()
1600 {
1601 return this.getSuperUseCaseFacade().getTargetDependencies();
1602 }
1603
1604 /**
1605 * Get the template parameter for this model element having the parameterName
1606 * @see ModelElementFacade#getTemplateParameter(String parameterName)
1607 */
1608 public Object getTemplateParameter(String parameterName)
1609 {
1610 return this.getSuperUseCaseFacade().getTemplateParameter(parameterName);
1611 }
1612
1613 /**
1614 * Get the template parameters for this model element
1615 * @see ModelElementFacade#getTemplateParameters()
1616 */
1617 public Collection<TemplateParameterFacade> getTemplateParameters()
1618 {
1619 return this.getSuperUseCaseFacade().getTemplateParameters();
1620 }
1621
1622 /**
1623 * The visibility (i.e. public, private, protected or package) of the model element, will
1624 * attempt a lookup for these values in the language mappings (if any).
1625 * @see ModelElementFacade#getVisibility()
1626 */
1627 public String getVisibility()
1628 {
1629 return this.getSuperUseCaseFacade().getVisibility();
1630 }
1631
1632 /**
1633 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
1634 * is taken into account when searching for the stereotype), false otherwise.
1635 * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
1636 */
1637 public boolean hasExactStereotype(String stereotypeName)
1638 {
1639 return this.getSuperUseCaseFacade().hasExactStereotype(stereotypeName);
1640 }
1641
1642 /**
1643 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
1644 * pipe, semicolon, or << >>
1645 * @see ModelElementFacade#hasKeyword(String keywordName)
1646 */
1647 public boolean hasKeyword(String keywordName)
1648 {
1649 return this.getSuperUseCaseFacade().hasKeyword(keywordName);
1650 }
1651
1652 /**
1653 * Returns true if the model element has the specified stereotype. If the stereotype itself
1654 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
1655 * one of the stereotype's ancestors has a matching name this method will return true, false
1656 * otherwise.
1657 * For example, if we have a certain stereotype called <<exception>> and a model element has a
1658 * stereotype called <<applicationException>> which extends <<exception>>, when calling this
1659 * method with 'stereotypeName' defined as 'exception' the method would return true since
1660 * <<applicationException>> inherits from <<exception>>. If you want to check if the model
1661 * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
1662 * @see ModelElementFacade#hasStereotype(String stereotypeName)
1663 */
1664 public boolean hasStereotype(String stereotypeName)
1665 {
1666 return this.getSuperUseCaseFacade().hasStereotype(stereotypeName);
1667 }
1668
1669 /**
1670 * True if there are target dependencies from this element that are instances of BindingFacade.
1671 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
1672 * @see ModelElementFacade#isBindingDependenciesPresent()
1673 */
1674 public boolean isBindingDependenciesPresent()
1675 {
1676 return this.getSuperUseCaseFacade().isBindingDependenciesPresent();
1677 }
1678
1679 /**
1680 * Indicates if any constraints are present on this model element.
1681 * @see ModelElementFacade#isConstraintsPresent()
1682 */
1683 public boolean isConstraintsPresent()
1684 {
1685 return this.getSuperUseCaseFacade().isConstraintsPresent();
1686 }
1687
1688 /**
1689 * Indicates if any documentation is present on this model element.
1690 * @see ModelElementFacade#isDocumentationPresent()
1691 */
1692 public boolean isDocumentationPresent()
1693 {
1694 return this.getSuperUseCaseFacade().isDocumentationPresent();
1695 }
1696
1697 /**
1698 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
1699 * @see ModelElementFacade#isReservedWord()
1700 */
1701 public boolean isReservedWord()
1702 {
1703 return this.getSuperUseCaseFacade().isReservedWord();
1704 }
1705
1706 /**
1707 * True is there are template parameters on this model element. For UML2, applies to Class,
1708 * Operation, Property, and Parameter.
1709 * @see ModelElementFacade#isTemplateParametersPresent()
1710 */
1711 public boolean isTemplateParametersPresent()
1712 {
1713 return this.getSuperUseCaseFacade().isTemplateParametersPresent();
1714 }
1715
1716 /**
1717 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
1718 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
1719 * Enumerations and Interfaces, optionally applies on other model elements.
1720 * @see ModelElementFacade#isValidIdentifierName()
1721 */
1722 public boolean isValidIdentifierName()
1723 {
1724 return this.getSuperUseCaseFacade().isValidIdentifierName();
1725 }
1726
1727 /**
1728 * Searches for the constraint with the specified 'name' on this model element, and if found
1729 * translates it using the specified 'translation' from a translation library discovered by the
1730 * framework.
1731 * @see ModelElementFacade#translateConstraint(String name, String translation)
1732 */
1733 public String translateConstraint(String name, String translation)
1734 {
1735 return this.getSuperUseCaseFacade().translateConstraint(name, translation);
1736 }
1737
1738 /**
1739 * Translates all constraints belonging to this model element with the given 'translation'.
1740 * @see ModelElementFacade#translateConstraints(String translation)
1741 */
1742 public String[] translateConstraints(String translation)
1743 {
1744 return this.getSuperUseCaseFacade().translateConstraints(translation);
1745 }
1746
1747 /**
1748 * Translates the constraints of the specified 'kind' belonging to this model element.
1749 * @see ModelElementFacade#translateConstraints(String kind, String translation)
1750 */
1751 public String[] translateConstraints(String kind, String translation)
1752 {
1753 return this.getSuperUseCaseFacade().translateConstraints(kind, translation);
1754 }
1755
1756 /**
1757 * Gets the model elements which this namespace owns.
1758 * @see org.andromda.metafacades.uml.NamespaceFacade#getOwnedElements()
1759 */
1760 public Collection<ModelElementFacade> getOwnedElements()
1761 {
1762 return this.getSuperUseCaseFacade().getOwnedElements();
1763 }
1764
1765 /**
1766 * The extend instances related to this use-case.
1767 * @see UseCaseFacade#getExtends()
1768 */
1769 public Collection<ExtendFacade> getExtends()
1770 {
1771 return this.getSuperUseCaseFacade().getExtends();
1772 }
1773
1774 /**
1775 * The extension points related to this use-case.
1776 * @see UseCaseFacade#getExtensionPoints()
1777 */
1778 public Collection<ExtensionPointFacade> getExtensionPoints()
1779 {
1780 return this.getSuperUseCaseFacade().getExtensionPoints();
1781 }
1782
1783 /**
1784 * The first activity graph directly owned by this use-case.
1785 * @see UseCaseFacade#getFirstActivityGraph()
1786 */
1787 public ActivityGraphFacade getFirstActivityGraph()
1788 {
1789 return this.getSuperUseCaseFacade().getFirstActivityGraph();
1790 }
1791
1792 /**
1793 * The included instances related to this use-case.
1794 * @see UseCaseFacade#getIncludes()
1795 */
1796 public Collection<IncludeFacade> getIncludes()
1797 {
1798 return this.getSuperUseCaseFacade().getIncludes();
1799 }
1800
1801 /**
1802 * @see MetafacadeBase#initialize()
1803 */
1804 @Override
1805 public void initialize()
1806 {
1807 this.getSuperUseCaseFacade().initialize();
1808 }
1809
1810 /**
1811 * @return Object getSuperUseCaseFacade().getValidationOwner()
1812 * @see MetafacadeBase#getValidationOwner()
1813 */
1814 @Override
1815 public Object getValidationOwner()
1816 {
1817 Object owner = this.getSuperUseCaseFacade().getValidationOwner();
1818 return owner;
1819 }
1820
1821 /**
1822 * @return String getSuperUseCaseFacade().getValidationName()
1823 * @see MetafacadeBase#getValidationName()
1824 */
1825 @Override
1826 public String getValidationName()
1827 {
1828 String name = this.getSuperUseCaseFacade().getValidationName();
1829 return name;
1830 }
1831
1832 /**
1833 * @param validationMessages Collection<ModelValidationMessage>
1834 * @see MetafacadeBase#validateInvariants(Collection validationMessages)
1835 */
1836 @Override
1837 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1838 {
1839 this.getSuperUseCaseFacade().validateInvariants(validationMessages);
1840 }
1841
1842 /**
1843 * The property that stores the name of the metafacade.
1844 */
1845 private static final String NAME_PROPERTY = "name";
1846 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1847
1848 /**
1849 * @see Object#toString()
1850 */
1851 @Override
1852 public String toString()
1853 {
1854 final StringBuilder toString = new StringBuilder(this.getClass().getName());
1855 toString.append("[");
1856 try
1857 {
1858 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1859 }
1860 catch (final Throwable tryAgain)
1861 {
1862 try
1863 {
1864 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1865 }
1866 catch (final Throwable ignore)
1867 {
1868 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
1869 }
1870 }
1871 toString.append("]");
1872 return toString.toString();
1873 }
1874 }