de.armax.ax.devtools.uml
Class AXmodelElementAbstract

java.lang.Object
  extended byde.armax.ax.devtools.uml.AXmodelElementAbstract
All Implemented Interfaces:
AXmodelElement
Direct Known Subclasses:
AXclassifierVoid, AXmodelBundle, AXmodelElementMdrImpl, AXmodelElementNsumlImpl, AXmodelMdrImpl, AXmodelNsumlImpl, AXpackageBundle

public abstract class AXmodelElementAbstract
extends java.lang.Object
implements AXmodelElement

Abstract base class of all model elements.

Provides general implementation of the AXmodelElement interface part that is independant of the wrapped model.

Author:
Peter Wieland, ARMAX mindware GmbH

Field Summary
 
Fields inherited from interface de.armax.ax.devtools.uml.AXmodelElement
INTERFACE
 
Constructor Summary
AXmodelElementAbstract()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Two elements are considered equal if their qualified names are equal.
abstract  boolean existTaggedValue(java.lang.String tag)
          Check weather a tagged value with the given tag name exists.
abstract  AXmodel getModel()
          Get the model containing this element.
abstract  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
abstract  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.
abstract  java.lang.Object getRealElement()
          Get the real element, this element wraps.
abstract  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.
abstract  java.lang.String getTaggedValue(java.lang.String tag)
          Get a tagged value for a given tag name.
abstract  java.lang.String getTaggedValue(java.lang.String tag, java.lang.String dflt)
          Get a tagged value for a given tag name.
abstract  java.util.List getTaggedValues(java.lang.String tag)
          Get all tagged values for a given tag name.
abstract  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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AXmodelElementAbstract

public AXmodelElementAbstract()
Method Detail

getName

public abstract java.lang.String getName()
Description copied from interface: AXmodelElement

Get the name for the model element.

Specified by:
getName in interface AXmodelElement
Returns:
the name exactly as it is specified in the model

getNameForMethod

public java.lang.String getNameForMethod()
Description copied from interface: AXmodelElement

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

Specified by:
getNameForMethod in interface AXmodelElement

getNameForVariable

public java.lang.String getNameForVariable()
Description copied from interface: AXmodelElement

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

Specified by:
getNameForVariable in interface AXmodelElement

getNameForDefine

public java.lang.String getNameForDefine()
Description copied from interface: AXmodelElement

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

Specified by:
getNameForDefine in interface AXmodelElement

getQualifiedName

public java.lang.String getQualifiedName()
Description copied from interface: AXmodelElement

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

Specified by:
getQualifiedName in interface AXmodelElement

getWellKnownPackages

public java.lang.String[] getWellKnownPackages()
Description copied from interface: AXmodelElement

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.

Specified by:
getWellKnownPackages in interface AXmodelElement
See Also:
AXmodelElement.getSufficientlyQualifiedName(), AXmodelElement.getSufficientlyQualifiedName(AXmodelElement)

getSufficientlyQualifiedName

public java.lang.String getSufficientlyQualifiedName()
Description copied from interface: AXmodelElement

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.

Specified by:
getSufficientlyQualifiedName in interface AXmodelElement
See Also:
AXmodelElement.getWellKnownPackages(), AXmodelElement.getSufficientlyQualifiedName(AXmodelElement)

getSufficientlyQualifiedName

public java.lang.String getSufficientlyQualifiedName(AXmodelElement ref)
Description copied from interface: AXmodelElement

Get the qualified name of this model element if needed.

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

Specified by:
getSufficientlyQualifiedName in interface AXmodelElement
Parameters:
ref - a reference element
See Also:
AXmodelElement.getWellKnownPackages(), AXmodelElement.getSufficientlyQualifiedName()

getNamespaceName

public abstract java.lang.String getNamespaceName()
Description copied from interface: AXmodelElement

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).

Specified by:
getNamespaceName in interface AXmodelElement

getPackage

public AXpackage getPackage()
Description copied from interface: AXmodelElement

Get the package that contains this element.

Specified by:
getPackage in interface AXmodelElement

getTaggedValue

public abstract java.lang.String getTaggedValue(java.lang.String tag)
Description copied from interface: AXmodelElement

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

Specified by:
getTaggedValue in interface AXmodelElement
Parameters:
tag -
Returns:
the value of the tagged value or null if no such tagged value exists

getTaggedValue

public abstract java.lang.String getTaggedValue(java.lang.String tag,
                                                java.lang.String dflt)
Description copied from interface: AXmodelElement

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

Specified by:
getTaggedValue in interface AXmodelElement
Parameters:
tag -
dflt - a default value that will be returned if no tagged value with name tag exists

getTaggedValues

public abstract java.util.List getTaggedValues(java.lang.String tag)
Description copied from interface: AXmodelElement

Get all tagged values for a given tag name.

Specified by:
getTaggedValues in interface AXmodelElement
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 abstract java.util.List getTaggedValueTags()
Description copied from interface: AXmodelElement

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

Specified by:
getTaggedValueTags in interface AXmodelElement

existTaggedValue

public abstract boolean existTaggedValue(java.lang.String tag)
Description copied from interface: AXmodelElement

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

Specified by:
existTaggedValue in interface AXmodelElement
Parameters:
tag -

isSameNamespace

public boolean isSameNamespace(AXmodelElement me)
Description copied from interface: AXmodelElement

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

Specified by:
isSameNamespace in interface AXmodelElement
Parameters:
me -

isSameNamespace

public boolean isSameNamespace(java.lang.String namespace)
Description copied from interface: AXmodelElement

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

Specified by:
isSameNamespace in interface AXmodelElement
Parameters:
namespace -

getModel

public abstract AXmodel getModel()
Description copied from interface: AXmodelElement

Get the model containing this element.

Specified by:
getModel in interface AXmodelElement

getRealElement

public abstract java.lang.Object getRealElement()
Description copied from interface: AXmodelElement

Get the real element, this element wraps.

Specified by:
getRealElement in interface AXmodelElement

equals

public boolean equals(java.lang.Object o)
Description copied from interface: AXmodelElement

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

Specified by:
equals in interface AXmodelElement

toString

public java.lang.String toString()

getStereotype

public abstract java.lang.String getStereotype()
Description copied from interface: AXmodelElement

Get the stereotype of this element.

Specified by:
getStereotype in interface AXmodelElement
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)
Description copied from interface: AXmodelElement

Check weather this element has the given stereotype.

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

Specified by:
hasStereotype in interface AXmodelElement
Parameters:
stereotype - the stereotype to check
Returns:
true if a stereotype of the given name is found, else false

getNameForCollectionMethod

public java.lang.String getNameForCollectionMethod()
Description copied from interface: AXmodelElement

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

Specified by:
getNameForCollectionMethod in interface AXmodelElement

getNameForCollectionVariable

public java.lang.String getNameForCollectionVariable()
Description copied from interface: AXmodelElement

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

Specified by:
getNameForCollectionVariable in interface AXmodelElement

getNameForCollectionDefine

public java.lang.String getNameForCollectionDefine()
Description copied from interface: AXmodelElement

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

Specified by:
getNameForCollectionDefine in interface AXmodelElement


Copyright © 2003 ARMAX mindware GmbH. All Rights Reserved.