001// license-header java merge-point
002//
003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
004//
005package org.andromda.cartridges.spring.metafacades;
006
007import java.util.Collection;
008import org.andromda.core.common.Introspector;
009import org.andromda.core.metafacade.MetafacadeBase;
010import org.andromda.core.metafacade.MetafacadeFactory;
011import org.andromda.core.metafacade.ModelValidationMessage;
012import org.andromda.metafacades.uml.ClassifierFacade;
013import org.andromda.metafacades.uml.ConstraintFacade;
014import org.andromda.metafacades.uml.DependencyFacade;
015import org.andromda.metafacades.uml.EnumerationFacade;
016import org.andromda.metafacades.uml.ManageableEntityAttribute;
017import org.andromda.metafacades.uml.ModelElementFacade;
018import org.andromda.metafacades.uml.ModelFacade;
019import org.andromda.metafacades.uml.PackageFacade;
020import org.andromda.metafacades.uml.StateMachineFacade;
021import org.andromda.metafacades.uml.StereotypeFacade;
022import org.andromda.metafacades.uml.TaggedValueFacade;
023import org.andromda.metafacades.uml.TemplateParameterFacade;
024import org.andromda.metafacades.uml.TypeMappings;
025
026/**
027 * TODO: Model Documentation for
028 * org.andromda.cartridges.spring.metafacades.SpringManageableEntityAttribute
029 * MetafacadeLogic for SpringManageableEntityAttribute
030 *
031 * @see SpringManageableEntityAttribute
032 */
033public abstract class SpringManageableEntityAttributeLogic
034    extends MetafacadeBase
035    implements SpringManageableEntityAttribute
036{
037    /**
038     * The underlying UML object
039     * @see Object
040     */
041    protected Object metaObject;
042
043    /** Create Metafacade implementation instance using the MetafacadeFactory from the context
044     * @param metaObjectIn
045     * @param context
046     */
047    protected SpringManageableEntityAttributeLogic(Object metaObjectIn, String context)
048    {
049        super(metaObjectIn, getContext(context));
050        this.superManageableEntityAttribute =
051           (ManageableEntityAttribute)
052            MetafacadeFactory.getInstance().createFacadeImpl(
053                    "org.andromda.metafacades.uml.ManageableEntityAttribute",
054                    metaObjectIn,
055                    getContext(context));
056        this.metaObject = metaObjectIn;
057    }
058
059    /**
060     * Gets the context for this metafacade logic instance.
061     * @param context String. Set to SpringManageableEntityAttribute if null
062     * @return context String
063     */
064    private static String getContext(String context)
065    {
066        if (context == null)
067        {
068            context = "org.andromda.cartridges.spring.metafacades.SpringManageableEntityAttribute";
069        }
070        return context;
071    }
072
073    private ManageableEntityAttribute superManageableEntityAttribute;
074    private boolean superManageableEntityAttributeInitialized = false;
075
076    /**
077     * Gets the ManageableEntityAttribute parent instance.
078     * @return this.superManageableEntityAttribute ManageableEntityAttribute
079     */
080    private ManageableEntityAttribute getSuperManageableEntityAttribute()
081    {
082        if (!this.superManageableEntityAttributeInitialized)
083        {
084            ((MetafacadeBase)this.superManageableEntityAttribute).setMetafacadeContext(this.getMetafacadeContext());
085            this.superManageableEntityAttributeInitialized = true;
086        }
087        return this.superManageableEntityAttribute;
088    }
089
090    /** Reset context only for non-root metafacades
091     * @param context
092     * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context)
093     */
094    @Override
095    public void resetMetafacadeContext(String context)
096    {
097        if (!this.contextRoot) // reset context only for non-root metafacades
098        {
099            context = getContext(context);  // to have same value as in original constructor call
100            setMetafacadeContext (context);
101            if (this.superManageableEntityAttributeInitialized)
102            {
103                ((MetafacadeBase)this.superManageableEntityAttribute).resetMetafacadeContext(context);
104            }
105        }
106    }
107
108    /**
109     * @return boolean true always
110     * @see SpringManageableEntityAttribute
111     */
112    public boolean isSpringManageableEntityAttributeMetaType()
113    {
114        return true;
115    }
116
117    /**
118     * @return true
119     * @see ManageableEntityAttribute
120     */
121    public boolean isManageableEntityAttributeMetaType()
122    {
123        return true;
124    }
125
126    /**
127     * @return true
128     * @see org.andromda.metafacades.uml.EntityAttribute
129     */
130    public boolean isEntityAttributeMetaType()
131    {
132        return true;
133    }
134
135    /**
136     * @return true
137     * @see org.andromda.metafacades.uml.AttributeFacade
138     */
139    public boolean isAttributeFacadeMetaType()
140    {
141        return true;
142    }
143
144    /**
145     * @return true
146     * @see ModelElementFacade
147     */
148    public boolean isModelElementFacadeMetaType()
149    {
150        return true;
151    }
152
153    // ----------- delegates to ManageableEntityAttribute ------------
154    /**
155     * Searches the given feature for the specified tag.
156     * If the follow boolean is set to true then the search will continue from the class attribute
157     * to the class itself and then up the class hierarchy.
158     * @see org.andromda.metafacades.uml.AttributeFacade#findTaggedValue(String name, boolean follow)
159     */
160    public Object findTaggedValue(String name, boolean follow)
161    {
162        return this.getSuperManageableEntityAttribute().findTaggedValue(name, follow);
163    }
164
165    /**
166     * The default value of the attribute.  This is the value given if no value is defined.
167     * @see org.andromda.metafacades.uml.AttributeFacade#getDefaultValue()
168     */
169    public String getDefaultValue()
170    {
171        return this.getSuperManageableEntityAttribute().getDefaultValue();
172    }
173
174    /**
175     * If the attribute is an enumeration literal this represents the owning enumeration. Can be
176     * empty.
177     * @see org.andromda.metafacades.uml.AttributeFacade#getEnumeration()
178     */
179    public EnumerationFacade getEnumeration()
180    {
181        return this.getSuperManageableEntityAttribute().getEnumeration();
182    }
183
184    /**
185     * Returns the enumeration literal parameters defined by tagged value as a comma separated list.
186     * @see org.andromda.metafacades.uml.AttributeFacade#getEnumerationLiteralParameters()
187     */
188    public String getEnumerationLiteralParameters()
189    {
190        return this.getSuperManageableEntityAttribute().getEnumerationLiteralParameters();
191    }
192
193    /**
194     * The value for this attribute if it is an enumeration literal, null otherwise. The default
195     * value is returned as a String if it has been specified, if it's not specified this
196     * attribute's name is assumed.
197     * @see org.andromda.metafacades.uml.AttributeFacade#getEnumerationValue()
198     */
199    public String getEnumerationValue()
200    {
201        return this.getSuperManageableEntityAttribute().getEnumerationValue();
202    }
203
204    /**
205     * The name of the accessor operation that would retrieve this attribute's value.
206     * @see org.andromda.metafacades.uml.AttributeFacade#getGetterName()
207     */
208    public String getGetterName()
209    {
210        return this.getSuperManageableEntityAttribute().getGetterName();
211    }
212
213    /**
214     * The name of the type that is returned on the accessor and mutator operations,  determined in
215     * part by the multiplicity.
216     * @see org.andromda.metafacades.uml.AttributeFacade#getGetterSetterTypeName()
217     */
218    public String getGetterSetterTypeName()
219    {
220        return this.getSuperManageableEntityAttribute().getGetterSetterTypeName();
221    }
222
223    /**
224     * the lower value for the multiplicity
225     * -only applicable for UML2
226     * @see org.andromda.metafacades.uml.AttributeFacade#getLower()
227     */
228    public int getLower()
229    {
230        return this.getSuperManageableEntityAttribute().getLower();
231    }
232
233    /**
234     * Gets the classifier who is the owner of the attributes.
235     * @see org.andromda.metafacades.uml.AttributeFacade#getOwner()
236     */
237    public ClassifierFacade getOwner()
238    {
239        return this.getSuperManageableEntityAttribute().getOwner();
240    }
241
242    /**
243     * The name of the mutator operation that would retrieve this attribute's value.
244     * @see org.andromda.metafacades.uml.AttributeFacade#getSetterName()
245     */
246    public String getSetterName()
247    {
248        return this.getSuperManageableEntityAttribute().getSetterName();
249    }
250
251    /**
252     * The classifier owning this attribute.
253     * @see org.andromda.metafacades.uml.AttributeFacade#getType()
254     */
255    public ClassifierFacade getType()
256    {
257        return this.getSuperManageableEntityAttribute().getType();
258    }
259
260    /**
261     * the upper value for the multiplicity (will be -1 for *)
262     * -only applicable for UML2
263     * @see org.andromda.metafacades.uml.AttributeFacade#getUpper()
264     */
265    public int getUpper()
266    {
267        return this.getSuperManageableEntityAttribute().getUpper();
268    }
269
270    /**
271     * True if this attribute can only be set.
272     * @see org.andromda.metafacades.uml.AttributeFacade#isAddOnly()
273     */
274    public boolean isAddOnly()
275    {
276        return this.getSuperManageableEntityAttribute().isAddOnly();
277    }
278
279    /**
280     * True if this attribute can be modified.
281     * @see org.andromda.metafacades.uml.AttributeFacade#isChangeable()
282     */
283    public boolean isChangeable()
284    {
285        return this.getSuperManageableEntityAttribute().isChangeable();
286    }
287
288    /**
289     * Indicates if the default value is present.
290     * @see org.andromda.metafacades.uml.AttributeFacade#isDefaultValuePresent()
291     */
292    public boolean isDefaultValuePresent()
293    {
294        return this.getSuperManageableEntityAttribute().isDefaultValuePresent();
295    }
296
297    /**
298     * If the attribute is derived (its value is computed). UML2 only. UML14 always returns false.
299     * Default=false.
300     * @see org.andromda.metafacades.uml.AttributeFacade#isDerived()
301     */
302    public boolean isDerived()
303    {
304        return this.getSuperManageableEntityAttribute().isDerived();
305    }
306
307    /**
308     * True if this attribute is owned by an enumeration.
309     * @see org.andromda.metafacades.uml.AttributeFacade#isEnumerationLiteral()
310     */
311    public boolean isEnumerationLiteral()
312    {
313        return this.getSuperManageableEntityAttribute().isEnumerationLiteral();
314    }
315
316    /**
317     * Returns true if enumeration literal parameters exist (defined by tagged value) for the
318     * literal.
319     * @see org.andromda.metafacades.uml.AttributeFacade#isEnumerationLiteralParametersExist()
320     */
321    public boolean isEnumerationLiteralParametersExist()
322    {
323        return this.getSuperManageableEntityAttribute().isEnumerationLiteralParametersExist();
324    }
325
326    /**
327     * True if this attribute is owned by an enumeration but is defined as a member variable (NOT a
328     * literal).
329     * @see org.andromda.metafacades.uml.AttributeFacade#isEnumerationMember()
330     */
331    public boolean isEnumerationMember()
332    {
333        return this.getSuperManageableEntityAttribute().isEnumerationMember();
334    }
335
336    /**
337     * IsLeaf property in the operation. If true, operation is final, cannot be extended or
338     * implemented by a descendant.
339     * @see org.andromda.metafacades.uml.AttributeFacade#isLeaf()
340     */
341    public boolean isLeaf()
342    {
343        return this.getSuperManageableEntityAttribute().isLeaf();
344    }
345
346    /**
347     * Whether or not this attribute has a multiplicity greater than 1.
348     * @see org.andromda.metafacades.uml.AttributeFacade#isMany()
349     */
350    public boolean isMany()
351    {
352        return this.getSuperManageableEntityAttribute().isMany();
353    }
354
355    /**
356     * Indicates whether or not the attributes are ordered (if multiplicity is greater than 1).
357     * @see org.andromda.metafacades.uml.AttributeFacade#isOrdered()
358     */
359    public boolean isOrdered()
360    {
361        return this.getSuperManageableEntityAttribute().isOrdered();
362    }
363
364    /**
365     * Whether or not this attribute can be modified.
366     * @see org.andromda.metafacades.uml.AttributeFacade#isReadOnly()
367     */
368    public boolean isReadOnly()
369    {
370        return this.getSuperManageableEntityAttribute().isReadOnly();
371    }
372
373    /**
374     * Whether or not the multiplicity of this attribute is 1.
375     * @see org.andromda.metafacades.uml.AttributeFacade#isRequired()
376     */
377    public boolean isRequired()
378    {
379        return this.getSuperManageableEntityAttribute().isRequired();
380    }
381
382    /**
383     * Indicates if this attribute is 'static', meaning it has a classifier scope.
384     * @see org.andromda.metafacades.uml.AttributeFacade#isStatic()
385     */
386    public boolean isStatic()
387    {
388        return this.getSuperManageableEntityAttribute().isStatic();
389    }
390
391    /**
392     * If the attribute is unique within the Collection type. UML2 only. UML14 always returns false.
393     * Unique+Ordered determines the implementation Collection type. Default=false.
394     * @see org.andromda.metafacades.uml.AttributeFacade#isUnique()
395     */
396    public boolean isUnique()
397    {
398        return this.getSuperManageableEntityAttribute().isUnique();
399    }
400
401    /**
402     * The name of the index to create on a column that persists the entity attribute.
403     * @see org.andromda.metafacades.uml.EntityAttribute#getColumnIndex()
404     */
405    public String getColumnIndex()
406    {
407        return this.getSuperManageableEntityAttribute().getColumnIndex();
408    }
409
410    /**
411     * The length of the column that persists this entity attribute.
412     * @see org.andromda.metafacades.uml.EntityAttribute#getColumnLength()
413     */
414    public String getColumnLength()
415    {
416        return this.getSuperManageableEntityAttribute().getColumnLength();
417    }
418
419    /**
420     * The name of the table column to which this entity is mapped.
421     * @see org.andromda.metafacades.uml.EntityAttribute#getColumnName()
422     */
423    public String getColumnName()
424    {
425        return this.getSuperManageableEntityAttribute().getColumnName();
426    }
427
428    /**
429     * The PIM to language specific mappings for JDBC.
430     * @see org.andromda.metafacades.uml.EntityAttribute#getJdbcMappings()
431     */
432    public TypeMappings getJdbcMappings()
433    {
434        return this.getSuperManageableEntityAttribute().getJdbcMappings();
435    }
436
437    /**
438     * The JDBC type for this entity attribute.
439     * @see org.andromda.metafacades.uml.EntityAttribute#getJdbcType()
440     */
441    public String getJdbcType()
442    {
443        return this.getSuperManageableEntityAttribute().getJdbcType();
444    }
445
446    /**
447     * The SQL mappings (i.e. the mappings which provide PIM to SQL mappings).
448     * @see org.andromda.metafacades.uml.EntityAttribute#getSqlMappings()
449     */
450    public TypeMappings getSqlMappings()
451    {
452        return this.getSuperManageableEntityAttribute().getSqlMappings();
453    }
454
455    /**
456     * The SQL type for this attribute.
457     * @see org.andromda.metafacades.uml.EntityAttribute#getSqlType()
458     */
459    public String getSqlType()
460    {
461        return this.getSuperManageableEntityAttribute().getSqlType();
462    }
463
464    /**
465     * The name of the unique-key that this unique attribute belongs
466     * @see org.andromda.metafacades.uml.EntityAttribute#getUniqueGroup()
467     */
468    public String getUniqueGroup()
469    {
470        return this.getSuperManageableEntityAttribute().getUniqueGroup();
471    }
472
473    /**
474     * True if this attribute is an identifier for its entity.
475     * @see org.andromda.metafacades.uml.EntityAttribute#isIdentifier()
476     */
477    public boolean isIdentifier()
478    {
479        return this.getSuperManageableEntityAttribute().isIdentifier();
480    }
481
482    /**
483     * Indicates this attribute should be ignored by the persistence layer.
484     * @see org.andromda.metafacades.uml.EntityAttribute#isTransient()
485     */
486    public boolean isTransient()
487    {
488        return this.getSuperManageableEntityAttribute().isTransient();
489    }
490
491    /**
492     * Whether or not this attribute should be displayed.
493     * @see ManageableEntityAttribute#isDisplay()
494     */
495    public boolean isDisplay()
496    {
497        return this.getSuperManageableEntityAttribute().isDisplay();
498    }
499
500    /**
501     * Whether or not this attribute can be read in a call isolated from the rest (for example when
502     * downloading binary fields).
503     * @see ManageableEntityAttribute#isManageableGetterAvailable()
504     */
505    public boolean isManageableGetterAvailable()
506    {
507        return this.getSuperManageableEntityAttribute().isManageableGetterAvailable();
508    }
509
510    /**
511     * Copies all tagged values from the given ModelElementFacade to this model element facade.
512     * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
513     */
514    public void copyTaggedValues(ModelElementFacade element)
515    {
516        this.getSuperManageableEntityAttribute().copyTaggedValues(element);
517    }
518
519    /**
520     * Finds the tagged value with the specified 'tagName'. In case there are more values the first
521     * one found will be returned.
522     * @see ModelElementFacade#findTaggedValue(String tagName)
523     */
524    public Object findTaggedValue(String tagName)
525    {
526        return this.getSuperManageableEntityAttribute().findTaggedValue(tagName);
527    }
528
529    /**
530     * Returns all the values for the tagged value with the specified name. The returned collection
531     * will contains only String instances, or will be empty. Never null.
532     * @see ModelElementFacade#findTaggedValues(String tagName)
533     */
534    public Collection<Object> findTaggedValues(String tagName)
535    {
536        return this.getSuperManageableEntityAttribute().findTaggedValues(tagName);
537    }
538
539    /**
540     * Returns the fully qualified name of the model element. The fully qualified name includes
541     * complete package qualified name of the underlying model element. The templates parameter will
542     * be replaced by the correct one given the binding relation of the parameter to this element.
543     * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
544     */
545    public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
546    {
547        return this.getSuperManageableEntityAttribute().getBindedFullyQualifiedName(bindedElement);
548    }
549
550    /**
551     * Gets all constraints belonging to the model element.
552     * @see ModelElementFacade#getConstraints()
553     */
554    public Collection<ConstraintFacade> getConstraints()
555    {
556        return this.getSuperManageableEntityAttribute().getConstraints();
557    }
558
559    /**
560     * Returns the constraints of the argument kind that have been placed onto this model. Typical
561     * kinds are "inv", "pre" and "post". Other kinds are possible.
562     * @see ModelElementFacade#getConstraints(String kind)
563     */
564    public Collection<ConstraintFacade> getConstraints(String kind)
565    {
566        return this.getSuperManageableEntityAttribute().getConstraints(kind);
567    }
568
569    /**
570     * Gets the documentation for the model element, The indent argument is prefixed to each line.
571     * By default this method wraps lines after 64 characters.
572     * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
573     * @see ModelElementFacade#getDocumentation(String indent)
574     */
575    public String getDocumentation(String indent)
576    {
577        return this.getSuperManageableEntityAttribute().getDocumentation(indent);
578    }
579
580    /**
581     * This method returns the documentation for this model element, with the lines wrapped after
582     * the specified number of characters, values of less than 1 will indicate no line wrapping is
583     * required. By default paragraphs are returned as HTML.
584     * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
585     * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
586     */
587    public String getDocumentation(String indent, int lineLength)
588    {
589        return this.getSuperManageableEntityAttribute().getDocumentation(indent, lineLength);
590    }
591
592    /**
593     * This method returns the documentation for this model element, with the lines wrapped after
594     * the specified number of characters, values of less than 1 will indicate no line wrapping is
595     * required. HTML style determines if HTML Escaping is applied.
596     * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
597     */
598    public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
599    {
600        return this.getSuperManageableEntityAttribute().getDocumentation(indent, lineLength, htmlStyle);
601    }
602
603    /**
604     * The fully qualified name of this model element.
605     * @see ModelElementFacade#getFullyQualifiedName()
606     */
607    public String getFullyQualifiedName()
608    {
609        return this.getSuperManageableEntityAttribute().getFullyQualifiedName();
610    }
611
612    /**
613     * Returns the fully qualified name of the model element. The fully qualified name includes
614     * complete package qualified name of the underlying model element.  If modelName is true, then
615     * the original name of the model element (the name contained within the model) will be the name
616     * returned, otherwise a name from a language mapping will be returned.
617     * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
618     */
619    public String getFullyQualifiedName(boolean modelName)
620    {
621        return this.getSuperManageableEntityAttribute().getFullyQualifiedName(modelName);
622    }
623
624    /**
625     * Returns the fully qualified name as a path, the returned value always starts with out a slash
626     * '/'.
627     * @see ModelElementFacade#getFullyQualifiedNamePath()
628     */
629    public String getFullyQualifiedNamePath()
630    {
631        return this.getSuperManageableEntityAttribute().getFullyQualifiedNamePath();
632    }
633
634    /**
635     * Gets the unique identifier of the underlying model element.
636     * @see ModelElementFacade#getId()
637     */
638    public String getId()
639    {
640        return this.getSuperManageableEntityAttribute().getId();
641    }
642
643    /**
644     * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
645     * are not represented by other properties, i.e. native, transient, volatile, synchronized,
646     * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
647     * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
648     * JDK5 compiler level.
649     * @see ModelElementFacade#getKeywords()
650     */
651    public Collection<String> getKeywords()
652    {
653        return this.getSuperManageableEntityAttribute().getKeywords();
654    }
655
656    /**
657     * UML2: Retrieves a localized label for this named element.
658     * @see ModelElementFacade#getLabel()
659     */
660    public String getLabel()
661    {
662        return this.getSuperManageableEntityAttribute().getLabel();
663    }
664
665    /**
666     * The language mappings that have been set for this model element.
667     * @see ModelElementFacade#getLanguageMappings()
668     */
669    public TypeMappings getLanguageMappings()
670    {
671        return this.getSuperManageableEntityAttribute().getLanguageMappings();
672    }
673
674    /**
675     * Return the model containing this model element (multiple models may be loaded and processed
676     * at the same time).
677     * @see ModelElementFacade#getModel()
678     */
679    public ModelFacade getModel()
680    {
681        return this.getSuperManageableEntityAttribute().getModel();
682    }
683
684    /**
685     * The name of the model element.
686     * @see ModelElementFacade#getName()
687     */
688    public String getName()
689    {
690        return this.getSuperManageableEntityAttribute().getName();
691    }
692
693    /**
694     * Gets the package to which this model element belongs.
695     * @see ModelElementFacade#getPackage()
696     */
697    public ModelElementFacade getPackage()
698    {
699        return this.getSuperManageableEntityAttribute().getPackage();
700    }
701
702    /**
703     * The name of this model element's package.
704     * @see ModelElementFacade#getPackageName()
705     */
706    public String getPackageName()
707    {
708        return this.getSuperManageableEntityAttribute().getPackageName();
709    }
710
711    /**
712     * Gets the package name (optionally providing the ability to retrieve the model name and not
713     * the mapped name).
714     * @see ModelElementFacade#getPackageName(boolean modelName)
715     */
716    public String getPackageName(boolean modelName)
717    {
718        return this.getSuperManageableEntityAttribute().getPackageName(modelName);
719    }
720
721    /**
722     * Returns the package as a path, the returned value always starts with out a slash '/'.
723     * @see ModelElementFacade#getPackagePath()
724     */
725    public String getPackagePath()
726    {
727        return this.getSuperManageableEntityAttribute().getPackagePath();
728    }
729
730    /**
731     * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
732     * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
733     * the names of the containing namespaces starting at the root of the hierarchy and ending with
734     * the name of the NamedElement itself.
735     * @see ModelElementFacade#getQualifiedName()
736     */
737    public String getQualifiedName()
738    {
739        return this.getSuperManageableEntityAttribute().getQualifiedName();
740    }
741
742    /**
743     * Gets the root package for the model element.
744     * @see ModelElementFacade#getRootPackage()
745     */
746    public PackageFacade getRootPackage()
747    {
748        return this.getSuperManageableEntityAttribute().getRootPackage();
749    }
750
751    /**
752     * Gets the dependencies for which this model element is the source.
753     * @see ModelElementFacade#getSourceDependencies()
754     */
755    public Collection<DependencyFacade> getSourceDependencies()
756    {
757        return this.getSuperManageableEntityAttribute().getSourceDependencies();
758    }
759
760    /**
761     * If this model element is the context of an activity graph, this represents that activity
762     * graph.
763     * @see ModelElementFacade#getStateMachineContext()
764     */
765    public StateMachineFacade getStateMachineContext()
766    {
767        return this.getSuperManageableEntityAttribute().getStateMachineContext();
768    }
769
770    /**
771     * The collection of ALL stereotype names for this model element.
772     * @see ModelElementFacade#getStereotypeNames()
773     */
774    public Collection<String> getStereotypeNames()
775    {
776        return this.getSuperManageableEntityAttribute().getStereotypeNames();
777    }
778
779    /**
780     * Gets all stereotypes for this model element.
781     * @see ModelElementFacade#getStereotypes()
782     */
783    public Collection<StereotypeFacade> getStereotypes()
784    {
785        return this.getSuperManageableEntityAttribute().getStereotypes();
786    }
787
788    /**
789     * Return the TaggedValues associated with this model element, under all stereotypes.
790     * @see ModelElementFacade#getTaggedValues()
791     */
792    public Collection<TaggedValueFacade> getTaggedValues()
793    {
794        return this.getSuperManageableEntityAttribute().getTaggedValues();
795    }
796
797    /**
798     * Gets the dependencies for which this model element is the target.
799     * @see ModelElementFacade#getTargetDependencies()
800     */
801    public Collection<DependencyFacade> getTargetDependencies()
802    {
803        return this.getSuperManageableEntityAttribute().getTargetDependencies();
804    }
805
806    /**
807     * Get the template parameter for this model element having the parameterName
808     * @see ModelElementFacade#getTemplateParameter(String parameterName)
809     */
810    public Object getTemplateParameter(String parameterName)
811    {
812        return this.getSuperManageableEntityAttribute().getTemplateParameter(parameterName);
813    }
814
815    /**
816     * Get the template parameters for this model element
817     * @see ModelElementFacade#getTemplateParameters()
818     */
819    public Collection<TemplateParameterFacade> getTemplateParameters()
820    {
821        return this.getSuperManageableEntityAttribute().getTemplateParameters();
822    }
823
824    /**
825     * The visibility (i.e. public, private, protected or package) of the model element, will
826     * attempt a lookup for these values in the language mappings (if any).
827     * @see ModelElementFacade#getVisibility()
828     */
829    public String getVisibility()
830    {
831        return this.getSuperManageableEntityAttribute().getVisibility();
832    }
833
834    /**
835     * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
836     * is taken into account when searching for the stereotype), false otherwise.
837     * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
838     */
839    public boolean hasExactStereotype(String stereotypeName)
840    {
841        return this.getSuperManageableEntityAttribute().hasExactStereotype(stereotypeName);
842    }
843
844    /**
845     * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
846     * pipe, semicolon, or << >>
847     * @see ModelElementFacade#hasKeyword(String keywordName)
848     */
849    public boolean hasKeyword(String keywordName)
850    {
851        return this.getSuperManageableEntityAttribute().hasKeyword(keywordName);
852    }
853
854    /**
855     * Returns true if the model element has the specified stereotype.  If the stereotype itself
856     * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
857     * one of the stereotype's ancestors has a matching name this method will return true, false
858     * otherwise.
859     * For example, if we have a certain stereotype called <<exception>> and a model element has a
860     * stereotype called <<applicationException>> which extends <<exception>>, when calling this
861     * method with 'stereotypeName' defined as 'exception' the method would return true since
862     * <<applicationException>> inherits from <<exception>>.  If you want to check if the model
863     * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
864     * @see ModelElementFacade#hasStereotype(String stereotypeName)
865     */
866    public boolean hasStereotype(String stereotypeName)
867    {
868        return this.getSuperManageableEntityAttribute().hasStereotype(stereotypeName);
869    }
870
871    /**
872     * True if there are target dependencies from this element that are instances of BindingFacade.
873     * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
874     * @see ModelElementFacade#isBindingDependenciesPresent()
875     */
876    public boolean isBindingDependenciesPresent()
877    {
878        return this.getSuperManageableEntityAttribute().isBindingDependenciesPresent();
879    }
880
881    /**
882     * Indicates if any constraints are present on this model element.
883     * @see ModelElementFacade#isConstraintsPresent()
884     */
885    public boolean isConstraintsPresent()
886    {
887        return this.getSuperManageableEntityAttribute().isConstraintsPresent();
888    }
889
890    /**
891     * Indicates if any documentation is present on this model element.
892     * @see ModelElementFacade#isDocumentationPresent()
893     */
894    public boolean isDocumentationPresent()
895    {
896        return this.getSuperManageableEntityAttribute().isDocumentationPresent();
897    }
898
899    /**
900     * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
901     * @see ModelElementFacade#isReservedWord()
902     */
903    public boolean isReservedWord()
904    {
905        return this.getSuperManageableEntityAttribute().isReservedWord();
906    }
907
908    /**
909     * True is there are template parameters on this model element. For UML2, applies to Class,
910     * Operation, Property, and Parameter.
911     * @see ModelElementFacade#isTemplateParametersPresent()
912     */
913    public boolean isTemplateParametersPresent()
914    {
915        return this.getSuperManageableEntityAttribute().isTemplateParametersPresent();
916    }
917
918    /**
919     * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
920     * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
921     * Enumerations and Interfaces, optionally applies on other model elements.
922     * @see ModelElementFacade#isValidIdentifierName()
923     */
924    public boolean isValidIdentifierName()
925    {
926        return this.getSuperManageableEntityAttribute().isValidIdentifierName();
927    }
928
929    /**
930     * Searches for the constraint with the specified 'name' on this model element, and if found
931     * translates it using the specified 'translation' from a translation library discovered by the
932     * framework.
933     * @see ModelElementFacade#translateConstraint(String name, String translation)
934     */
935    public String translateConstraint(String name, String translation)
936    {
937        return this.getSuperManageableEntityAttribute().translateConstraint(name, translation);
938    }
939
940    /**
941     * Translates all constraints belonging to this model element with the given 'translation'.
942     * @see ModelElementFacade#translateConstraints(String translation)
943     */
944    public String[] translateConstraints(String translation)
945    {
946        return this.getSuperManageableEntityAttribute().translateConstraints(translation);
947    }
948
949    /**
950     * Translates the constraints of the specified 'kind' belonging to this model element.
951     * @see ModelElementFacade#translateConstraints(String kind, String translation)
952     */
953    public String[] translateConstraints(String kind, String translation)
954    {
955        return this.getSuperManageableEntityAttribute().translateConstraints(kind, translation);
956    }
957
958    /**
959     * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
960     */
961    @Override
962    public void initialize()
963    {
964        this.getSuperManageableEntityAttribute().initialize();
965    }
966
967    /**
968     * @return Object getSuperManageableEntityAttribute().getValidationOwner()
969     * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
970     */
971    @Override
972    public Object getValidationOwner()
973    {
974        Object owner = this.getSuperManageableEntityAttribute().getValidationOwner();
975        return owner;
976    }
977
978    /**
979     * @return String getSuperManageableEntityAttribute().getValidationName()
980     * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
981     */
982    @Override
983    public String getValidationName()
984    {
985        String name = this.getSuperManageableEntityAttribute().getValidationName();
986        return name;
987    }
988
989    /**
990     * @param validationMessages Collection<ModelValidationMessage>
991     * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages)
992     */
993    @Override
994    public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
995    {
996        this.getSuperManageableEntityAttribute().validateInvariants(validationMessages);
997    }
998
999    /**
1000     * The property that stores the name of the metafacade.
1001     */
1002    private static final String NAME_PROPERTY = "name";
1003    private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1004
1005    /**
1006     * @see Object#toString()
1007     */
1008    @Override
1009    public String toString()
1010    {
1011        final StringBuilder toString = new StringBuilder(this.getClass().getName());
1012        toString.append("[");
1013        try
1014        {
1015            toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1016        }
1017        catch (final Throwable tryAgain)
1018        {
1019            try
1020            {
1021                toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1022            }
1023            catch (final Throwable ignore)
1024            {
1025                // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
1026            }
1027        }
1028        toString.append("]");
1029        return toString.toString();
1030    }
1031}