org.andromda.metafacades.uml
Interface ConstraintFacade

All Superinterfaces:
ModelElementFacade

public interface ConstraintFacade
extends ModelElementFacade

Metafacade interface to be used by AndroMDA cartridges.


Method Summary
 java.lang.String getBody()
           Gets the 'body' or text of this constraint.
 ModelElementFacade getContextElement()
           Gets the model element to which the constraint applies (i.e.
 java.lang.String getTranslation(java.lang.String language)
           This constraint's translation for the argument languange.
 boolean isBodyExpression()
           True if this constraint denotes a body expression.
 boolean isConstraintFacadeMetaType()
          Indicates the metafacade type (used for metafacade mappings).
 boolean isDefinition()
           True if this constraint denotes a definition.
 boolean isInvariant()
           True if this constraint denotes an invariant.
 boolean isPostCondition()
           True if this constraint denotes a postcondition.
 boolean isPreCondition()
           True if this constraint denotes a precondition.
 
Methods inherited from interface org.andromda.metafacades.uml.ModelElementFacade
copyTaggedValues, findTaggedValue, findTaggedValues, getConstraints, getConstraints, getDocumentation, getDocumentation, getDocumentation, getFullyQualifiedName, getFullyQualifiedName, getFullyQualifiedNamePath, getId, getLanguageMappings, getModel, getName, getPackage, getPackageName, getPackageName, getPackagePath, getRootPackage, getSourceDependencies, getStateMachineContext, getStereotypeNames, getStereotypes, getTaggedValues, getTargetDependencies, getTemplateParameter, getTemplateParameters, getValidationName, getValidationOwner, getVisibility, hasExactStereotype, hasStereotype, initialize, isBindingDependenciesPresent, isConstraintsPresent, isModelElementFacadeMetaType, isTemplateParametersPresent, translateConstraint, translateConstraints, translateConstraints, validateInvariants
 

Method Detail

isConstraintFacadeMetaType

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

Returns:
always true

getBody

java.lang.String getBody()

Gets the 'body' or text of this constraint.


getContextElement

ModelElementFacade getContextElement()

Gets the model element to which the constraint applies (i.e. is the context of).


getTranslation

java.lang.String getTranslation(java.lang.String language)

This constraint's translation for the argument languange.


isBodyExpression

boolean isBodyExpression()

True if this constraint denotes a body expression.

For example:

 

context CustomerCard:getTransaction(from:Date, until:Date)

body: transactions->select(date.isAfter(from) and date.isBefore(until))

False otherwise.


isDefinition

boolean isDefinition()

True if this constraint denotes a definition.

For example:

 

context CustomerCard

def: getTotalPoints(d: date) : Integer = transaction->select(date.isAfter(d)).points->sum()

False otherwise.


isInvariant

boolean isInvariant()

True if this constraint denotes an invariant.

For example:

 

context LivingAnimal

inv: alive = true

False otherwise.


isPostCondition

boolean isPostCondition()

True if this constraint denotes a postcondition.

For example:

 

context LivingAnimal::getNumberOfLegs()

post: numberOfLegs >= 0

False otherwise.


isPreCondition

boolean isPreCondition()

True if this constraint denotes a precondition.

For example:

 

context LivingAnimal::canFly()

pre: hasWings = true

False otherwise.



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