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 org.andromda.core.common.Introspector;
9 import org.andromda.core.metafacade.MetafacadeBase;
10 import org.andromda.core.metafacade.MetafacadeFactory;
11 import org.andromda.core.metafacade.ModelValidationMessage;
12 import org.andromda.metafacades.uml.ActivityGraphFacade;
13 import org.andromda.metafacades.uml.ConstraintFacade;
14 import org.andromda.metafacades.uml.DependencyFacade;
15 import org.andromda.metafacades.uml.ModelElementFacade;
16 import org.andromda.metafacades.uml.ModelFacade;
17 import org.andromda.metafacades.uml.PackageFacade;
18 import org.andromda.metafacades.uml.PartitionFacade;
19 import org.andromda.metafacades.uml.StateMachineFacade;
20 import org.andromda.metafacades.uml.StateVertexFacade;
21 import org.andromda.metafacades.uml.StereotypeFacade;
22 import org.andromda.metafacades.uml.TaggedValueFacade;
23 import org.andromda.metafacades.uml.TemplateParameterFacade;
24 import org.andromda.metafacades.uml.TypeMappings;
25
26 /**
27 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane
28 * MetafacadeLogic for JBpmSwimlane
29 *
30 * @see JBpmSwimlane
31 */
32 public abstract class JBpmSwimlaneLogic
33 extends MetafacadeBase
34 implements JBpmSwimlane
35 {
36 /**
37 * The underlying UML object
38 * @see Object
39 */
40 protected Object metaObject;
41
42 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
43 * @param metaObjectIn
44 * @param context
45 */
46 protected JBpmSwimlaneLogic(Object metaObjectIn, String context)
47 {
48 super(metaObjectIn, getContext(context));
49 this.superPartitionFacade =
50 (PartitionFacade)
51 MetafacadeFactory.getInstance().createFacadeImpl(
52 "org.andromda.metafacades.uml.PartitionFacade",
53 metaObjectIn,
54 getContext(context));
55 this.metaObject = metaObjectIn;
56 }
57
58 /**
59 * Gets the context for this metafacade logic instance.
60 * @param context String. Set to JBpmSwimlane if null
61 * @return context String
62 */
63 private static String getContext(String context)
64 {
65 if (context == null)
66 {
67 context = "org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane";
68 }
69 return context;
70 }
71
72 private PartitionFacade superPartitionFacade;
73 private boolean superPartitionFacadeInitialized = false;
74
75 /**
76 * Gets the PartitionFacade parent instance.
77 * @return this.superPartitionFacade PartitionFacade
78 */
79 private PartitionFacade getSuperPartitionFacade()
80 {
81 if (!this.superPartitionFacadeInitialized)
82 {
83 ((MetafacadeBase)this.superPartitionFacade).setMetafacadeContext(this.getMetafacadeContext());
84 this.superPartitionFacadeInitialized = true;
85 }
86 return this.superPartitionFacade;
87 }
88
89 /** Reset context only for non-root metafacades
90 * @param context
91 * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context)
92 */
93 @Override
94 public void resetMetafacadeContext(String context)
95 {
96 if (!this.contextRoot) // reset context only for non-root metafacades
97 {
98 context = getContext(context); // to have same value as in original constructor call
99 setMetafacadeContext (context);
100 if (this.superPartitionFacadeInitialized)
101 {
102 ((MetafacadeBase)this.superPartitionFacade).resetMetafacadeContext(context);
103 }
104 }
105 }
106
107 /**
108 * @return boolean true always
109 * @see JBpmSwimlane
110 */
111 public boolean isJBpmSwimlaneMetaType()
112 {
113 return true;
114 }
115
116 // --------------- attributes ---------------------
117
118 /**
119 * @see org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane#getAssignmentExpression()
120 * @return String
121 */
122 protected abstract String handleGetAssignmentExpression();
123
124 private String __assignmentExpression1a;
125 private boolean __assignmentExpression1aSet = false;
126
127 /**
128 * TODO: Model Documentation for
129 * org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane.assignmentExpression
130 * @return (String)handleGetAssignmentExpression()
131 */
132 public final String getAssignmentExpression()
133 {
134 String assignmentExpression1a = this.__assignmentExpression1a;
135 if (!this.__assignmentExpression1aSet)
136 {
137 // assignmentExpression has no pre constraints
138 assignmentExpression1a = handleGetAssignmentExpression();
139 // assignmentExpression has no post constraints
140 this.__assignmentExpression1a = assignmentExpression1a;
141 if (isMetafacadePropertyCachingEnabled())
142 {
143 this.__assignmentExpression1aSet = true;
144 }
145 }
146 return assignmentExpression1a;
147 }
148
149 /**
150 * @see org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane#isContainedInBusinessProcess()
151 * @return boolean
152 */
153 protected abstract boolean handleIsContainedInBusinessProcess();
154
155 private boolean __containedInBusinessProcess2a;
156 private boolean __containedInBusinessProcess2aSet = false;
157
158 /**
159 * True if this element is part of a business process usecase.
160 * @return (boolean)handleIsContainedInBusinessProcess()
161 */
162 public final boolean isContainedInBusinessProcess()
163 {
164 boolean containedInBusinessProcess2a = this.__containedInBusinessProcess2a;
165 if (!this.__containedInBusinessProcess2aSet)
166 {
167 // containedInBusinessProcess has no pre constraints
168 containedInBusinessProcess2a = handleIsContainedInBusinessProcess();
169 // containedInBusinessProcess has no post constraints
170 this.__containedInBusinessProcess2a = containedInBusinessProcess2a;
171 if (isMetafacadePropertyCachingEnabled())
172 {
173 this.__containedInBusinessProcess2aSet = true;
174 }
175 }
176 return containedInBusinessProcess2a;
177 }
178
179 /**
180 * @see org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane#getClazz()
181 * @return String
182 */
183 protected abstract String handleGetClazz();
184
185 private String __clazz3a;
186 private boolean __clazz3aSet = false;
187
188 /**
189 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane.clazz
190 * @return (String)handleGetClazz()
191 */
192 public final String getClazz()
193 {
194 String clazz3a = this.__clazz3a;
195 if (!this.__clazz3aSet)
196 {
197 // clazz has no pre constraints
198 clazz3a = handleGetClazz();
199 // clazz has no post constraints
200 this.__clazz3a = clazz3a;
201 if (isMetafacadePropertyCachingEnabled())
202 {
203 this.__clazz3aSet = true;
204 }
205 }
206 return clazz3a;
207 }
208
209 /**
210 * @see org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane#getAssignmentHandlerClassName()
211 * @return String
212 */
213 protected abstract String handleGetAssignmentHandlerClassName();
214
215 private String __assignmentHandlerClassName4a;
216 private boolean __assignmentHandlerClassName4aSet = false;
217
218 /**
219 * TODO: Model Documentation for
220 * org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane.assignmentHandlerClassName
221 * @return (String)handleGetAssignmentHandlerClassName()
222 */
223 public final String getAssignmentHandlerClassName()
224 {
225 String assignmentHandlerClassName4a = this.__assignmentHandlerClassName4a;
226 if (!this.__assignmentHandlerClassName4aSet)
227 {
228 // assignmentHandlerClassName has no pre constraints
229 assignmentHandlerClassName4a = handleGetAssignmentHandlerClassName();
230 // assignmentHandlerClassName has no post constraints
231 this.__assignmentHandlerClassName4a = assignmentHandlerClassName4a;
232 if (isMetafacadePropertyCachingEnabled())
233 {
234 this.__assignmentHandlerClassName4aSet = true;
235 }
236 }
237 return assignmentHandlerClassName4a;
238 }
239
240 /**
241 * @see org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane#getAssignmentHandlerPackageName()
242 * @return String
243 */
244 protected abstract String handleGetAssignmentHandlerPackageName();
245
246 private String __assignmentHandlerPackageName5a;
247 private boolean __assignmentHandlerPackageName5aSet = false;
248
249 /**
250 * TODO: Model Documentation for
251 * org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane.assignmentHandlerPackageName
252 * @return (String)handleGetAssignmentHandlerPackageName()
253 */
254 public final String getAssignmentHandlerPackageName()
255 {
256 String assignmentHandlerPackageName5a = this.__assignmentHandlerPackageName5a;
257 if (!this.__assignmentHandlerPackageName5aSet)
258 {
259 // assignmentHandlerPackageName has no pre constraints
260 assignmentHandlerPackageName5a = handleGetAssignmentHandlerPackageName();
261 // assignmentHandlerPackageName has no post constraints
262 this.__assignmentHandlerPackageName5a = assignmentHandlerPackageName5a;
263 if (isMetafacadePropertyCachingEnabled())
264 {
265 this.__assignmentHandlerPackageName5aSet = true;
266 }
267 }
268 return assignmentHandlerPackageName5a;
269 }
270
271 /**
272 * @see org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane#getAssignmentHandlerFullPath()
273 * @return String
274 */
275 protected abstract String handleGetAssignmentHandlerFullPath();
276
277 private String __assignmentHandlerFullPath6a;
278 private boolean __assignmentHandlerFullPath6aSet = false;
279
280 /**
281 * TODO: Model Documentation for
282 * org.andromda.cartridges.jbpm.metafacades.JBpmSwimlane.assignmentHandlerFullPath
283 * @return (String)handleGetAssignmentHandlerFullPath()
284 */
285 public final String getAssignmentHandlerFullPath()
286 {
287 String assignmentHandlerFullPath6a = this.__assignmentHandlerFullPath6a;
288 if (!this.__assignmentHandlerFullPath6aSet)
289 {
290 // assignmentHandlerFullPath has no pre constraints
291 assignmentHandlerFullPath6a = handleGetAssignmentHandlerFullPath();
292 // assignmentHandlerFullPath has no post constraints
293 this.__assignmentHandlerFullPath6a = assignmentHandlerFullPath6a;
294 if (isMetafacadePropertyCachingEnabled())
295 {
296 this.__assignmentHandlerFullPath6aSet = true;
297 }
298 }
299 return assignmentHandlerFullPath6a;
300 }
301
302 // ------------- associations ------------------
303
304 /**
305 * @return true
306 * @see PartitionFacade
307 */
308 public boolean isPartitionFacadeMetaType()
309 {
310 return true;
311 }
312
313 /**
314 * @return true
315 * @see ModelElementFacade
316 */
317 public boolean isModelElementFacadeMetaType()
318 {
319 return true;
320 }
321
322 // ----------- delegates to PartitionFacade ------------
323 /**
324 * Copies all tagged values from the given ModelElementFacade to this model element facade.
325 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
326 */
327 public void copyTaggedValues(ModelElementFacade element)
328 {
329 this.getSuperPartitionFacade().copyTaggedValues(element);
330 }
331
332 /**
333 * Finds the tagged value with the specified 'tagName'. In case there are more values the first
334 * one found will be returned.
335 * @see ModelElementFacade#findTaggedValue(String tagName)
336 */
337 public Object findTaggedValue(String tagName)
338 {
339 return this.getSuperPartitionFacade().findTaggedValue(tagName);
340 }
341
342 /**
343 * Returns all the values for the tagged value with the specified name. The returned collection
344 * will contains only String instances, or will be empty. Never null.
345 * @see ModelElementFacade#findTaggedValues(String tagName)
346 */
347 public Collection<Object> findTaggedValues(String tagName)
348 {
349 return this.getSuperPartitionFacade().findTaggedValues(tagName);
350 }
351
352 /**
353 * Returns the fully qualified name of the model element. The fully qualified name includes
354 * complete package qualified name of the underlying model element. The templates parameter will
355 * be replaced by the correct one given the binding relation of the parameter to this element.
356 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
357 */
358 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
359 {
360 return this.getSuperPartitionFacade().getBindedFullyQualifiedName(bindedElement);
361 }
362
363 /**
364 * Gets all constraints belonging to the model element.
365 * @see ModelElementFacade#getConstraints()
366 */
367 public Collection<ConstraintFacade> getConstraints()
368 {
369 return this.getSuperPartitionFacade().getConstraints();
370 }
371
372 /**
373 * Returns the constraints of the argument kind that have been placed onto this model. Typical
374 * kinds are "inv", "pre" and "post". Other kinds are possible.
375 * @see ModelElementFacade#getConstraints(String kind)
376 */
377 public Collection<ConstraintFacade> getConstraints(String kind)
378 {
379 return this.getSuperPartitionFacade().getConstraints(kind);
380 }
381
382 /**
383 * Gets the documentation for the model element, The indent argument is prefixed to each line.
384 * By default this method wraps lines after 64 characters.
385 * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
386 * @see ModelElementFacade#getDocumentation(String indent)
387 */
388 public String getDocumentation(String indent)
389 {
390 return this.getSuperPartitionFacade().getDocumentation(indent);
391 }
392
393 /**
394 * This method returns the documentation for this model element, with the lines wrapped after
395 * the specified number of characters, values of less than 1 will indicate no line wrapping is
396 * required. By default paragraphs are returned as HTML.
397 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
398 * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
399 */
400 public String getDocumentation(String indent, int lineLength)
401 {
402 return this.getSuperPartitionFacade().getDocumentation(indent, lineLength);
403 }
404
405 /**
406 * This method returns the documentation for this model element, with the lines wrapped after
407 * the specified number of characters, values of less than 1 will indicate no line wrapping is
408 * required. HTML style determines if HTML Escaping is applied.
409 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
410 */
411 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
412 {
413 return this.getSuperPartitionFacade().getDocumentation(indent, lineLength, htmlStyle);
414 }
415
416 /**
417 * The fully qualified name of this model element.
418 * @see ModelElementFacade#getFullyQualifiedName()
419 */
420 public String getFullyQualifiedName()
421 {
422 return this.getSuperPartitionFacade().getFullyQualifiedName();
423 }
424
425 /**
426 * Returns the fully qualified name of the model element. The fully qualified name includes
427 * complete package qualified name of the underlying model element. If modelName is true, then
428 * the original name of the model element (the name contained within the model) will be the name
429 * returned, otherwise a name from a language mapping will be returned.
430 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
431 */
432 public String getFullyQualifiedName(boolean modelName)
433 {
434 return this.getSuperPartitionFacade().getFullyQualifiedName(modelName);
435 }
436
437 /**
438 * Returns the fully qualified name as a path, the returned value always starts with out a slash
439 * '/'.
440 * @see ModelElementFacade#getFullyQualifiedNamePath()
441 */
442 public String getFullyQualifiedNamePath()
443 {
444 return this.getSuperPartitionFacade().getFullyQualifiedNamePath();
445 }
446
447 /**
448 * Gets the unique identifier of the underlying model element.
449 * @see ModelElementFacade#getId()
450 */
451 public String getId()
452 {
453 return this.getSuperPartitionFacade().getId();
454 }
455
456 /**
457 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
458 * are not represented by other properties, i.e. native, transient, volatile, synchronized,
459 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
460 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
461 * JDK5 compiler level.
462 * @see ModelElementFacade#getKeywords()
463 */
464 public Collection<String> getKeywords()
465 {
466 return this.getSuperPartitionFacade().getKeywords();
467 }
468
469 /**
470 * UML2: Retrieves a localized label for this named element.
471 * @see ModelElementFacade#getLabel()
472 */
473 public String getLabel()
474 {
475 return this.getSuperPartitionFacade().getLabel();
476 }
477
478 /**
479 * The language mappings that have been set for this model element.
480 * @see ModelElementFacade#getLanguageMappings()
481 */
482 public TypeMappings getLanguageMappings()
483 {
484 return this.getSuperPartitionFacade().getLanguageMappings();
485 }
486
487 /**
488 * Return the model containing this model element (multiple models may be loaded and processed
489 * at the same time).
490 * @see ModelElementFacade#getModel()
491 */
492 public ModelFacade getModel()
493 {
494 return this.getSuperPartitionFacade().getModel();
495 }
496
497 /**
498 * The name of the model element.
499 * @see ModelElementFacade#getName()
500 */
501 public String getName()
502 {
503 return this.getSuperPartitionFacade().getName();
504 }
505
506 /**
507 * Gets the package to which this model element belongs.
508 * @see ModelElementFacade#getPackage()
509 */
510 public ModelElementFacade getPackage()
511 {
512 return this.getSuperPartitionFacade().getPackage();
513 }
514
515 /**
516 * The name of this model element's package.
517 * @see ModelElementFacade#getPackageName()
518 */
519 public String getPackageName()
520 {
521 return this.getSuperPartitionFacade().getPackageName();
522 }
523
524 /**
525 * Gets the package name (optionally providing the ability to retrieve the model name and not
526 * the mapped name).
527 * @see ModelElementFacade#getPackageName(boolean modelName)
528 */
529 public String getPackageName(boolean modelName)
530 {
531 return this.getSuperPartitionFacade().getPackageName(modelName);
532 }
533
534 /**
535 * Returns the package as a path, the returned value always starts with out a slash '/'.
536 * @see ModelElementFacade#getPackagePath()
537 */
538 public String getPackagePath()
539 {
540 return this.getSuperPartitionFacade().getPackagePath();
541 }
542
543 /**
544 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
545 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
546 * the names of the containing namespaces starting at the root of the hierarchy and ending with
547 * the name of the NamedElement itself.
548 * @see ModelElementFacade#getQualifiedName()
549 */
550 public String getQualifiedName()
551 {
552 return this.getSuperPartitionFacade().getQualifiedName();
553 }
554
555 /**
556 * Gets the root package for the model element.
557 * @see ModelElementFacade#getRootPackage()
558 */
559 public PackageFacade getRootPackage()
560 {
561 return this.getSuperPartitionFacade().getRootPackage();
562 }
563
564 /**
565 * Gets the dependencies for which this model element is the source.
566 * @see ModelElementFacade#getSourceDependencies()
567 */
568 public Collection<DependencyFacade> getSourceDependencies()
569 {
570 return this.getSuperPartitionFacade().getSourceDependencies();
571 }
572
573 /**
574 * If this model element is the context of an activity graph, this represents that activity
575 * graph.
576 * @see ModelElementFacade#getStateMachineContext()
577 */
578 public StateMachineFacade getStateMachineContext()
579 {
580 return this.getSuperPartitionFacade().getStateMachineContext();
581 }
582
583 /**
584 * The collection of ALL stereotype names for this model element.
585 * @see ModelElementFacade#getStereotypeNames()
586 */
587 public Collection<String> getStereotypeNames()
588 {
589 return this.getSuperPartitionFacade().getStereotypeNames();
590 }
591
592 /**
593 * Gets all stereotypes for this model element.
594 * @see ModelElementFacade#getStereotypes()
595 */
596 public Collection<StereotypeFacade> getStereotypes()
597 {
598 return this.getSuperPartitionFacade().getStereotypes();
599 }
600
601 /**
602 * Return the TaggedValues associated with this model element, under all stereotypes.
603 * @see ModelElementFacade#getTaggedValues()
604 */
605 public Collection<TaggedValueFacade> getTaggedValues()
606 {
607 return this.getSuperPartitionFacade().getTaggedValues();
608 }
609
610 /**
611 * Gets the dependencies for which this model element is the target.
612 * @see ModelElementFacade#getTargetDependencies()
613 */
614 public Collection<DependencyFacade> getTargetDependencies()
615 {
616 return this.getSuperPartitionFacade().getTargetDependencies();
617 }
618
619 /**
620 * Get the template parameter for this model element having the parameterName
621 * @see ModelElementFacade#getTemplateParameter(String parameterName)
622 */
623 public Object getTemplateParameter(String parameterName)
624 {
625 return this.getSuperPartitionFacade().getTemplateParameter(parameterName);
626 }
627
628 /**
629 * Get the template parameters for this model element
630 * @see ModelElementFacade#getTemplateParameters()
631 */
632 public Collection<TemplateParameterFacade> getTemplateParameters()
633 {
634 return this.getSuperPartitionFacade().getTemplateParameters();
635 }
636
637 /**
638 * The visibility (i.e. public, private, protected or package) of the model element, will
639 * attempt a lookup for these values in the language mappings (if any).
640 * @see ModelElementFacade#getVisibility()
641 */
642 public String getVisibility()
643 {
644 return this.getSuperPartitionFacade().getVisibility();
645 }
646
647 /**
648 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
649 * is taken into account when searching for the stereotype), false otherwise.
650 * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
651 */
652 public boolean hasExactStereotype(String stereotypeName)
653 {
654 return this.getSuperPartitionFacade().hasExactStereotype(stereotypeName);
655 }
656
657 /**
658 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
659 * pipe, semicolon, or << >>
660 * @see ModelElementFacade#hasKeyword(String keywordName)
661 */
662 public boolean hasKeyword(String keywordName)
663 {
664 return this.getSuperPartitionFacade().hasKeyword(keywordName);
665 }
666
667 /**
668 * Returns true if the model element has the specified stereotype. If the stereotype itself
669 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
670 * one of the stereotype's ancestors has a matching name this method will return true, false
671 * otherwise.
672 * For example, if we have a certain stereotype called <<exception>> and a model element has a
673 * stereotype called <<applicationException>> which extends <<exception>>, when calling this
674 * method with 'stereotypeName' defined as 'exception' the method would return true since
675 * <<applicationException>> inherits from <<exception>>. If you want to check if the model
676 * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
677 * @see ModelElementFacade#hasStereotype(String stereotypeName)
678 */
679 public boolean hasStereotype(String stereotypeName)
680 {
681 return this.getSuperPartitionFacade().hasStereotype(stereotypeName);
682 }
683
684 /**
685 * True if there are target dependencies from this element that are instances of BindingFacade.
686 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
687 * @see ModelElementFacade#isBindingDependenciesPresent()
688 */
689 public boolean isBindingDependenciesPresent()
690 {
691 return this.getSuperPartitionFacade().isBindingDependenciesPresent();
692 }
693
694 /**
695 * Indicates if any constraints are present on this model element.
696 * @see ModelElementFacade#isConstraintsPresent()
697 */
698 public boolean isConstraintsPresent()
699 {
700 return this.getSuperPartitionFacade().isConstraintsPresent();
701 }
702
703 /**
704 * Indicates if any documentation is present on this model element.
705 * @see ModelElementFacade#isDocumentationPresent()
706 */
707 public boolean isDocumentationPresent()
708 {
709 return this.getSuperPartitionFacade().isDocumentationPresent();
710 }
711
712 /**
713 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
714 * @see ModelElementFacade#isReservedWord()
715 */
716 public boolean isReservedWord()
717 {
718 return this.getSuperPartitionFacade().isReservedWord();
719 }
720
721 /**
722 * True is there are template parameters on this model element. For UML2, applies to Class,
723 * Operation, Property, and Parameter.
724 * @see ModelElementFacade#isTemplateParametersPresent()
725 */
726 public boolean isTemplateParametersPresent()
727 {
728 return this.getSuperPartitionFacade().isTemplateParametersPresent();
729 }
730
731 /**
732 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
733 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
734 * Enumerations and Interfaces, optionally applies on other model elements.
735 * @see ModelElementFacade#isValidIdentifierName()
736 */
737 public boolean isValidIdentifierName()
738 {
739 return this.getSuperPartitionFacade().isValidIdentifierName();
740 }
741
742 /**
743 * Searches for the constraint with the specified 'name' on this model element, and if found
744 * translates it using the specified 'translation' from a translation library discovered by the
745 * framework.
746 * @see ModelElementFacade#translateConstraint(String name, String translation)
747 */
748 public String translateConstraint(String name, String translation)
749 {
750 return this.getSuperPartitionFacade().translateConstraint(name, translation);
751 }
752
753 /**
754 * Translates all constraints belonging to this model element with the given 'translation'.
755 * @see ModelElementFacade#translateConstraints(String translation)
756 */
757 public String[] translateConstraints(String translation)
758 {
759 return this.getSuperPartitionFacade().translateConstraints(translation);
760 }
761
762 /**
763 * Translates the constraints of the specified 'kind' belonging to this model element.
764 * @see ModelElementFacade#translateConstraints(String kind, String translation)
765 */
766 public String[] translateConstraints(String kind, String translation)
767 {
768 return this.getSuperPartitionFacade().translateConstraints(kind, translation);
769 }
770
771 /**
772 * State machines can be used to express the behavior of part of a system. Behavior is modeled
773 * as a
774 * traversal of a graph of state nodes interconnected by one or more joined transition arcs that
775 * are
776 * triggered by the dispatching of series of (event) occurrences. During this traversal, the
777 * state
778 * machine executes a series of activities associated with various elements of the state
779 * machine.
780 * @see PartitionFacade#getActivityGraph()
781 */
782 public ActivityGraphFacade getActivityGraph()
783 {
784 return this.getSuperPartitionFacade().getActivityGraph();
785 }
786
787 /**
788 * All vertices enveloped by this partition.
789 * @see PartitionFacade#getVertices()
790 */
791 public Collection<StateVertexFacade> getVertices()
792 {
793 return this.getSuperPartitionFacade().getVertices();
794 }
795
796 /**
797 * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
798 */
799 @Override
800 public void initialize()
801 {
802 this.getSuperPartitionFacade().initialize();
803 }
804
805 /**
806 * @return Object getSuperPartitionFacade().getValidationOwner()
807 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
808 */
809 @Override
810 public Object getValidationOwner()
811 {
812 Object owner = this.getSuperPartitionFacade().getValidationOwner();
813 return owner;
814 }
815
816 /**
817 * @return String getSuperPartitionFacade().getValidationName()
818 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
819 */
820 @Override
821 public String getValidationName()
822 {
823 String name = this.getSuperPartitionFacade().getValidationName();
824 return name;
825 }
826
827 /**
828 * @param validationMessages Collection<ModelValidationMessage>
829 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages)
830 */
831 @Override
832 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
833 {
834 this.getSuperPartitionFacade().validateInvariants(validationMessages);
835 }
836
837 /**
838 * The property that stores the name of the metafacade.
839 */
840 private static final String NAME_PROPERTY = "name";
841 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
842
843 /**
844 * @see Object#toString()
845 */
846 @Override
847 public String toString()
848 {
849 final StringBuilder toString = new StringBuilder(this.getClass().getName());
850 toString.append("[");
851 try
852 {
853 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
854 }
855 catch (final Throwable tryAgain)
856 {
857 try
858 {
859 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
860 }
861 catch (final Throwable ignore)
862 {
863 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
864 }
865 }
866 toString.append("]");
867 return toString.toString();
868 }
869 }