de.armax.ax.devtools.uml
Interface AXmodelElement

All Known Subinterfaces:
AXabstraction, AXassociation, AXassociationEnd, AXattribute, AXclass, AXclassifier, AXdependency, AXgeneralization, AXmodel, AXoperation, AXpackage, AXparameter, AXstructuralFeature
All Known Implementing Classes:
AXabstractionMdrImpl, AXabstractionNsumlImpl, AXassociationEndMdrImpl, AXassociationEndNsumlImpl, AXassociationMdrImpl, AXassociationNsumlImpl, AXattributeMdrImpl, AXattributeNsumlImpl, AXclassifierMdrImpl, AXclassifierNsumlImpl, AXclassifierVoid, AXclassMdrImpl, AXclassNsumlImpl, AXdependencyMdrImpl, AXdependencyNsumlImpl, AXgeneralizationMdrImpl, AXgeneralizationNsumlImpl, AXmodelBundle, AXmodelElementAbstract, AXmodelMdrImpl, AXmodelNsumlImpl, AXoperationMdrImpl, AXoperationNsumlImpl, AXpackageBundle, AXpackageMdrImpl, AXpackageNsumlImpl, AXparameterMdrImpl, AXparameterNsumlImpl, AXstructuralFeatureMdrImpl, AXstructuralFeatureNsumlImpl

public interface AXmodelElement

Metamodel for UML model elements.

This is the base interface for all model elements.

Author:
Peter Wieland, ARMAX mindware GmbH

Field Summary
static java.lang.String INTERFACE
          The qualified name of this interface.
 
Method Summary
 boolean equals(java.lang.Object o)
          Two elements are considered equal if their qualified names are equal.
 boolean existTaggedValue(java.lang.String tag)
          Check weather a tagged value with the given tag name exists.
 AXmodel getModel()
          Get the model containing this element.
 java.lang.String getName()
          Get the name for the model element.
 java.lang.String getNameForCollectionDefine()
          Get the name of the model element in upper case letters and with an additional 'S' at the end.
 java.lang.String getNameForCollectionMethod()
          Get the name of the model element beginning with an upper case letter and with an additional 's' at the end.
 java.lang.String getNameForCollectionVariable()
          Get the name of the model element beginning with a lower case letter and with an additional 's' at the end.
 java.lang.String getNameForDefine()
          Get the name of the model element in upper case letters.
 java.lang.String getNameForMethod()
          Get the name of the model element beginning with an upper case letter
 java.lang.String getNameForVariable()
          Get the name of the model element beginning with a lower case letter
 java.lang.String getNamespaceName()
          Get the namespace name for this model element.
 AXpackage getPackage()
          Get the package that contains this element.
 java.lang.String getQualifiedName()
          Get the qualified name of the model element.
 java.lang.Object getRealElement()
          Get the real element, this element wraps.
 java.lang.String getStereotype()
          Get the stereotype of this element.
 java.lang.String getSufficientlyQualifiedName()
          Get the qualified name of this model element if needed.
 java.lang.String getSufficientlyQualifiedName(AXmodelElement ref)
          Get the qualified name of this model element if needed.
 java.lang.String getTaggedValue(java.lang.String tag)
          Get a tagged value for a given tag name.
 java.lang.String getTaggedValue(java.lang.String tag, java.lang.String dflt)
          Get a tagged value for a given tag name.
 java.util.List getTaggedValues(java.lang.String tag)
          Get all tagged values for a given tag name.
 java.util.List getTaggedValueTags()
          Get all existing tag names of tagged values for this element.
 java.lang.String[] getWellKnownPackages()
          Method used to compare this model elements namespace against namespaces to determine weather elements need to be fully qualified or not.
 boolean hasStereotype(java.lang.String stereotype)
          Check weather this element has the given stereotype.
 boolean isSameNamespace(AXmodelElement me)
          Check weahter another model element has the same namespace than this element.
 boolean isSameNamespace(java.lang.String namespace)
          Check weather this model elements namespace is identical to the specified namespace.
 

Field Detail

INTERFACE

public static final java.lang.String INTERFACE

The qualified name of this interface.

See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()

Get the name for the model element.

Returns:
the name exactly as it is specified in the model

getNameForMethod

public java.lang.String getNameForMethod()

Get the name of the model element beginning with an upper case letter


getNameForCollectionMethod

public java.lang.String getNameForCollectionMethod()

Get the name of the model element beginning with an upper case letter and with an additional 's' at the end.


getNameForVariable

public java.lang.String getNameForVariable()

Get the name of the model element beginning with a lower case letter


getNameForCollectionVariable

public java.lang.String getNameForCollectionVariable()

Get the name of the model element beginning with a lower case letter and with an additional 's' at the end.


getNameForDefine

public java.lang.String getNameForDefine()

Get the name of the model element in upper case letters.


getNameForCollectionDefine

public java.lang.String getNameForCollectionDefine()

Get the name of the model element in upper case letters and with an additional 'S' at the end.


getQualifiedName

public java.lang.String getQualifiedName()

Get the qualified name of the model element.

The qualified name is the namespace name followed by a dot and the name of the model ellement


getWellKnownPackages

public java.lang.String[] getWellKnownPackages()

Method used to compare this model elements namespace against namespaces to determine weather elements need to be fully qualified or not.

This may include the java.lang package or any packages that figure in the import statement of a class.

See Also:
getSufficientlyQualifiedName(), getSufficientlyQualifiedName(AXmodelElement)

getSufficientlyQualifiedName

public java.lang.String getSufficientlyQualifiedName()

Get the qualified name of this model element if needed.

A model element is supposed to need a fully qualified name if its namespace is not contained in the well known packages.

See Also:
getWellKnownPackages(), getSufficientlyQualifiedName(AXmodelElement)

getSufficientlyQualifiedName

public java.lang.String getSufficientlyQualifiedName(AXmodelElement ref)

Get the qualified name of this model element if needed.

This is the same as getQualifiedName() without a parameter except that this method temporarily adds the namespace of the argument reference element to the well known packages

Parameters:
ref - a reference element
See Also:
getWellKnownPackages(), getSufficientlyQualifiedName()

getNamespaceName

public java.lang.String getNamespaceName()

Get the namespace name for this model element.

This includes the names of all nested UML namespaces separated by dots (as it is well known for java packages).


getPackage

public AXpackage getPackage()

Get the package that contains this element.


getTaggedValue

public java.lang.String getTaggedValue(java.lang.String tag)

Get a tagged value for a given tag name.

If more than one tagged value with the same tag name exist for this model element, the first one is returned

Parameters:
tag -
Returns:
the value of the tagged value or null if no such tagged value exists

getTaggedValue

public java.lang.String getTaggedValue(java.lang.String tag,
                                       java.lang.String dflt)

Get a tagged value for a given tag name.

If no such tagged value exists, the default value is returned.

If more than one tagged value with the same tag name exist for this model element, the first one is returned

Parameters:
tag -
dflt - a default value that will be returned if no tagged value with name tag exists

getTaggedValues

public java.util.List getTaggedValues(java.lang.String tag)

Get all tagged values for a given tag name.

Parameters:
tag -
Returns:
a List containing all tagged values for the given name or an empty List if no such tagged value exists.

getTaggedValueTags

public java.util.List getTaggedValueTags()

Get all existing tag names of tagged values for this element.


existTaggedValue

public boolean existTaggedValue(java.lang.String tag)

Check weather a tagged value with the given tag name exists.

Parameters:
tag -

isSameNamespace

public boolean isSameNamespace(AXmodelElement me)

Check weahter another model element has the same namespace than this element.

Parameters:
me -

isSameNamespace

public boolean isSameNamespace(java.lang.String namespace)

Check weather this model elements namespace is identical to the specified namespace.

Parameters:
namespace -

getModel

public AXmodel getModel()

Get the model containing this element.


getRealElement

public java.lang.Object getRealElement()

Get the real element, this element wraps.


equals

public boolean equals(java.lang.Object o)

Two elements are considered equal if their qualified names are equal.

Parameters:
o -

getStereotype

public java.lang.String getStereotype()

Get the stereotype of this element.

Returns:
a string representation of the stereotype of this element or null if this element has no stereotype.

hasStereotype

public boolean hasStereotype(java.lang.String stereotype)

Check weather this element has the given stereotype.

Shortcut for (getStereotype() == null ? stereotype == null : getStereotype().equals(stereotype))

Parameters:
stereotype - the stereotype to check
Returns:
true if a stereotype of the given name is found, else false


Copyright © 2003 ARMAX mindware GmbH. All Rights Reserved.