Class TypeMapProfile
java.lang.Object
com.nomagic.magicdraw.modeltransformations.TypeMapProfile
TypeMapProfile - class for type mapping.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.nomagic.magicdraw.modeltransformations.TypeMapProfile.TypeModifier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns type map documentationReturns error message for broken type mapcom.nomagic.magicdraw.modeltransformations.TypeMapProfile.Type
getMappedType
(Element original) Returns mapped typeReturns transformation type table modelReturns model package of type mapboolean
isBroken()
Is type map brokenboolean
isDefault
(com.nomagic.magicdraw.modeltransformations.TypeMapProfile.TypeMap typeMap) boolean
Is forward mapping setboolean
boolean
isMappingValid
(Element original, Element mapped) Checks if type mapping is valid.boolean
void
setForwardMapping
(boolean forward) Sets forward mappingtoString()
Returns type map name
-
Field Details
-
EMPTY_TYPE_MODIFIER
public static final com.nomagic.magicdraw.modeltransformations.TypeMapProfile.TypeModifier EMPTY_TYPE_MODIFIER
-
-
Constructor Details
-
TypeMapProfile
Constructor- Parameters:
mp
- profile package
-
-
Method Details
-
isDefault
public boolean isDefault(@CheckForNull com.nomagic.magicdraw.modeltransformations.TypeMapProfile.TypeMap typeMap) -
getTransformationTypeTableModel
Returns transformation type table model- Returns:
- transformation type table model
-
getDocumentation
Returns type map documentation- Returns:
- documentation
-
toString
Returns type map name -
getTypeMapModelPackage
Returns model package of type map- Returns:
- model package of type map
-
isForwardMapping
public boolean isForwardMapping()Is forward mapping set- Returns:
- true for forward mapping, false for reverse
-
isBroken
public boolean isBroken()Is type map broken- Returns:
- true if broken
-
isForwardMappingBroken
public boolean isForwardMappingBroken() -
isReverseMappingBroken
public boolean isReverseMappingBroken() -
getErrorMessage
Returns error message for broken type map- Returns:
- error message
-
setForwardMapping
public void setForwardMapping(boolean forward) Sets forward mapping- Parameters:
forward
- true for forward mapping, false for reverse
-
getMappedType
public com.nomagic.magicdraw.modeltransformations.TypeMapProfile.Type getMappedType(Element original) Returns mapped type- Parameters:
original
- original type, null for EmptySourceType/EmptyDestinationType- Returns:
- mapped (default) type for original type. If there is no maping return original element. Return null for EmtyTypes.
-
isMappingValid
Checks if type mapping is valid. This check should check generalizations/specifications.- Parameters:
original
- original typemapped
- mapped type- Returns:
- true if mapped type conforms to original type
-