org.andromda.metafacades.uml
Interface ModelElementFacade

All Known Subinterfaces:
ActionFacade, ActionStateFacade, ActivityGraphFacade, ActorFacade, ArgumentFacade, AssociationClassFacade, AssociationEndFacade, AssociationFacade, AttributeFacade, AttributeLinkFacade, BindingFacade, CallActionFacade, CallEventFacade, ClassifierFacade, ConstraintFacade, DependencyFacade, Destination, Entity, EntityAssociation, EntityAssociationEnd, EntityAttribute, EntityQueryOperation, EnumerationFacade, EnumerationLiteralFacade, EventFacade, ExtendFacade, ExtensionPointFacade, FinalStateFacade, FrontEndAction, FrontEndActionState, FrontEndActivityGraph, FrontEndController, FrontEndControllerOperation, FrontEndEvent, FrontEndExceptionHandler, FrontEndFinalState, FrontEndForward, FrontEndPackage, FrontEndParameter, FrontEndPseudostate, FrontEndUseCase, FrontEndView, GeneralizableElementFacade, GeneralizationFacade, GuardFacade, IncludeFacade, InstanceFacade, InteractionFacade, LinkEndFacade, LinkFacade, ManageableEntity, ManageableEntityAssociationEnd, ManageableEntityAttribute, NamespaceFacade, NodeFacade, ObjectFlowStateFacade, OperationFacade, PackageFacade, ParameterFacade, PartitionFacade, PseudostateFacade, Queue, Role, Service, ServiceOperation, StateFacade, StateMachineFacade, StateVertexFacade, StereotypeFacade, SubactivityStateFacade, TaggedValueFacade, Topic, TransitionFacade, UseCaseFacade, ValueObject, ValueObjectAssociationEnd

public interface ModelElementFacade

Represents a model element.

Metafacade interface to be used by AndroMDA cartridges.


Method Summary
 void copyTaggedValues(ModelElementFacade element)
           Copies all tagged values from the given ModelElementFacade to this model element facade.
 java.lang.Object findTaggedValue(java.lang.String tagName)
           Finds the tagged value with the specified 'tagName'.
 java.util.Collection findTaggedValues(java.lang.String tagName)
           Returns all the values for the tagged value with the specified name.
 java.util.Collection getConstraints()
           Gets all constraints belonging to the model element.
 java.util.Collection getConstraints(java.lang.String kind)
           Returns the constraints of the argument kind that have been placed onto this model.
 java.lang.String getDocumentation(java.lang.String indent)
           Gets the documentation for the model element, The indent argument is prefixed to each line.
 java.lang.String getDocumentation(java.lang.String indent, int lineLength)
           This method returns the documentation for this model element, with the lines wrapped after the specified number of characters, values of less than 1 will indicate no line wrapping is required.
 java.lang.String getDocumentation(java.lang.String indent, int lineLength, boolean htmlStyle)
           
 java.lang.String getFullyQualifiedName()
           The fully qualified name of this model element.
 java.lang.String getFullyQualifiedName(boolean modelName)
           Returns the fully qualified name of the model element.
 java.lang.String getFullyQualifiedNamePath()
           Returns the fully qualified name as a path, the returned value always starts with out a slash '/'.
 java.lang.String getId()
           Gets the unique identifier of the underlying model element.
 TypeMappings getLanguageMappings()
           The language mappings that have been set for this model elemnt.
 ModelFacade getModel()
           
 java.lang.String getName()
           The name of the model element.
 ModelElementFacade getPackage()
           Gets the package to which this model element belongs.
 java.lang.String getPackageName()
           The name of this model element's package.
 java.lang.String getPackageName(boolean modelName)
           Gets the package name (optionally providing the ability to retrieve the model name and not the mapped name).
 java.lang.String getPackagePath()
           Returns the package as a path, the returned value always starts with out a slash '/'.
 PackageFacade getRootPackage()
           Gets the root package for the model element.
 java.util.Collection getSourceDependencies()
           Gets the dependencies for which this model element is the source.
 StateMachineFacade getStateMachineContext()
           If this model element is the context of an activity graph, this represents that activity graph.
 java.util.Collection getStereotypeNames()
           The collection of ALL stereotype names for this model element.
 java.util.Collection getStereotypes()
           Gets all stereotypes for this model element.
 java.util.Collection getTaggedValues()
           
 java.util.Collection getTargetDependencies()
           Gets the dependencies for which this model element is the target.
 java.lang.Object getTemplateParameter(java.lang.String parameterName)
           
 java.util.Collection getTemplateParameters()
           
 java.lang.String getValidationName()
          Gets the name of the metafacade used within validation messages.
 java.lang.Object getValidationOwner()
          Gets the metafacade that acts as the owner of this metafacade.
 java.lang.String getVisibility()
           The visibility (i.e.
 boolean hasExactStereotype(java.lang.String stereotypeName)
           Returns true if the model element has the exact stereotype (meaning no stereotype inheritence is taken into account when searching for the stereotype), false otherwise.
 boolean hasStereotype(java.lang.String stereotypeName)
           Returns true if the model element has the specified stereotype.
 void initialize()
          Provides any required initialization of the metafacade.
 boolean isBindingDependenciesPresent()
           
 boolean isConstraintsPresent()
           Indicates if any constraints are present on this model element.
 boolean isModelElementFacadeMetaType()
          Indicates the metafacade type (used for metafacade mappings).
 boolean isTemplateParametersPresent()
           
 java.lang.String translateConstraint(java.lang.String name, java.lang.String translation)
           Searches for the constraint with the specified 'name' on this model element, and if found translates it using the specified 'translation' from a translation library discovered by the framework.
 java.lang.String[] translateConstraints(java.lang.String translation)
           Translates all constraints belonging to this model element with the given 'translation'.
 java.lang.String[] translateConstraints(java.lang.String kind, java.lang.String translation)
           Translates the constraints of the specified 'kind' belonging to this model element.
 void validateInvariants(java.util.Collection validationMessages)
          Performs validation of any invariants found on this model element and stores the messages within the validationMessages collection.
 

Method Detail

isModelElementFacadeMetaType

boolean isModelElementFacadeMetaType()
Indicates the metafacade type (used for metafacade mappings).

Returns:
always true

initialize

void initialize()
Provides any required initialization of the metafacade.


getValidationOwner

java.lang.Object getValidationOwner()
Gets the metafacade that acts as the owner of this metafacade. (for example: an operation is an owner of its parameters, etc). This is used by AndroMDA's validation framework to provide more context as to where the error has occurred.


getValidationName

java.lang.String getValidationName()
Gets the name of the metafacade used within validation messages. This provides the full name of the metafacade.


validateInvariants

void validateInvariants(java.util.Collection validationMessages)
Performs validation of any invariants found on this model element and stores the messages within the validationMessages collection.

Parameters:
validationMessages - the collection of messages to which additional validation messages will be added if invariants are broken.

copyTaggedValues

void copyTaggedValues(ModelElementFacade element)

Copies all tagged values from the given ModelElementFacade to this model element facade.


findTaggedValue

java.lang.Object findTaggedValue(java.lang.String tagName)

Finds the tagged value with the specified 'tagName'. In case there are more values the first one found will be returned.


findTaggedValues

java.util.Collection findTaggedValues(java.lang.String tagName)

Returns all the values for the tagged value with the specified name. The returned collection will contains only String instances, or will be empty. Never null.


getConstraints

java.util.Collection getConstraints()

Gets all constraints belonging to the model element.


getConstraints

java.util.Collection getConstraints(java.lang.String kind)

Returns the constraints of the argument kind that have been placed onto this model. Typical kinds are "inv", "pre" and "post". Other kinds are possible.


getDocumentation

java.lang.String getDocumentation(java.lang.String indent,
                                  int lineLength,
                                  boolean htmlStyle)

getDocumentation

java.lang.String getDocumentation(java.lang.String indent,
                                  int lineLength)

This method returns the documentation for this model element, with the lines wrapped after the specified number of characters, values of less than 1 will indicate no line wrapping is required. By default paragraphs are returned as HTML.

This method is equivalent to getDocumentation(indent, lineLength, true).


getDocumentation

java.lang.String getDocumentation(java.lang.String indent)

Gets the documentation for the model element, The indent argument is prefixed to each line. By default this method wraps lines after 64 characters.

This method is equivalent to getDocumentation(indent, 64).


getFullyQualifiedName

java.lang.String getFullyQualifiedName(boolean modelName)

Returns the fully qualified name of the model element. The fully qualified name includes complete package qualified name of the underlying model element. If modelName is true, then the original name of the model element (the name contained within the model) will be the name returned, otherwise a name from a language mapping will be returned.


getFullyQualifiedName

java.lang.String getFullyQualifiedName()

The fully qualified name of this model element.


getFullyQualifiedNamePath

java.lang.String getFullyQualifiedNamePath()

Returns the fully qualified name as a path, the returned value always starts with out a slash '/'.


getId

java.lang.String getId()

Gets the unique identifier of the underlying model element.


getLanguageMappings

TypeMappings getLanguageMappings()

The language mappings that have been set for this model elemnt.


getModel

ModelFacade getModel()

getName

java.lang.String getName()

The name of the model element.


getPackage

ModelElementFacade getPackage()

Gets the package to which this model element belongs.


getPackageName

java.lang.String getPackageName(boolean modelName)

Gets the package name (optionally providing the ability to retrieve the model name and not the mapped name).


getPackageName

java.lang.String getPackageName()

The name of this model element's package.


getPackagePath

java.lang.String getPackagePath()

Returns the package as a path, the returned value always starts with out a slash '/'.


getRootPackage

PackageFacade getRootPackage()

Gets the root package for the model element.


getSourceDependencies

java.util.Collection getSourceDependencies()

Gets the dependencies for which this model element is the source.


getStateMachineContext

StateMachineFacade getStateMachineContext()

If this model element is the context of an activity graph, this represents that activity graph.


getStereotypeNames

java.util.Collection getStereotypeNames()

The collection of ALL stereotype names for this model element.


getStereotypes

java.util.Collection getStereotypes()

Gets all stereotypes for this model element.


getTaggedValues

java.util.Collection getTaggedValues()

getTargetDependencies

java.util.Collection getTargetDependencies()

Gets the dependencies for which this model element is the target.


getTemplateParameter

java.lang.Object getTemplateParameter(java.lang.String parameterName)

getTemplateParameters

java.util.Collection getTemplateParameters()

getVisibility

java.lang.String getVisibility()

The visibility (i.e. public, private, protected or package) of the model element, will attempt a lookup for these values in the language mappings (if any).


hasExactStereotype

boolean hasExactStereotype(java.lang.String stereotypeName)

Returns true if the model element has the exact stereotype (meaning no stereotype inheritence is taken into account when searching for the stereotype), false otherwise.


hasStereotype

boolean hasStereotype(java.lang.String stereotypeName)

Returns true if the model element has the specified stereotype. If the stereotype itself does not match, then a search will be made up the steretype inheritance hiearchy, and if one of the stereotype's ancestors has a matching name this method will return true, false otherwise.

For example, if we have a certain stereotype called <> and a model element has a stereotype called <> which extends <>, when calling this method with 'stereotypeName' defined as 'exception' the method would return true since <> inherits from <>. If you want to check if the model element has the exact stereotype, then use the method 'hasExactStereotype' instead.


isBindingDependenciesPresent

boolean isBindingDependenciesPresent()

isConstraintsPresent

boolean isConstraintsPresent()

Indicates if any constraints are present on this model element.


isTemplateParametersPresent

boolean isTemplateParametersPresent()

translateConstraint

java.lang.String translateConstraint(java.lang.String name,
                                     java.lang.String translation)

Searches for the constraint with the specified 'name' on this model element, and if found translates it using the specified 'translation' from a translation library discovered by the framework.


translateConstraints

java.lang.String[] translateConstraints(java.lang.String translation)

Translates all constraints belonging to this model element with the given 'translation'.


translateConstraints

java.lang.String[] translateConstraints(java.lang.String kind,
                                        java.lang.String translation)

Translates the constraints of the specified 'kind' belonging to this model element.



Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.