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