Class TypeMapProfile

java.lang.Object
com.nomagic.magicdraw.modeltransformations.TypeMapProfile

@OpenApi public class TypeMapProfile extends Object
TypeMapProfile - class for type mapping.
  • Field Details

    • EMPTY_TYPE_MODIFIER

      public static final com.nomagic.magicdraw.modeltransformations.TypeMapProfile.TypeModifier EMPTY_TYPE_MODIFIER
  • Constructor Details

    • TypeMapProfile

      public TypeMapProfile(@CheckForNull Package mp)
      Constructor
      Parameters:
      mp - profile package
  • Method Details

    • isDefault

      public boolean isDefault(@CheckForNull com.nomagic.magicdraw.modeltransformations.TypeMapProfile.TypeMap typeMap)
    • getTransformationTypeTableModel

      public TableModel getTransformationTypeTableModel()
      Returns transformation type table model
      Returns:
      transformation type table model
    • getDocumentation

      public String getDocumentation()
      Returns type map documentation
      Returns:
      documentation
    • toString

      public String toString()
      Returns type map name
      Overrides:
      toString in class Object
      Returns:
      name
    • getTypeMapModelPackage

      @CheckForNull public Package 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

      public String 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

      public boolean isMappingValid(Element original, Element mapped)
      Checks if type mapping is valid. This check should check generalizations/specifications.
      Parameters:
      original - original type
      mapped - mapped type
      Returns:
      true if mapped type conforms to original type