Poseidon for UML: User Guide
Prev |  | Next

# Appendix A. UML-to-Ecore Plug-In

# A.1. Mappings

## A.1.1. UML Package

- All directly contained classes will also be converted.

- A package with stereotype <<ecoremodel>> will be converted to an EPackage.

- Tagged values nsURI and nsPrefix are required. They will be transfered to the EPackage, e.g.:

      nsURI http://www.mysite.org/myMetaModel
                                  nsPrefix myMetaModel

## A.1.2. UML Class

- Attributes must have primitive types. Model other attributes as associations.

- All attributes and associations are converted.

- Stereotype <<enumeration>> will be converted to EEnum.

  - All attributes of an <<enumeration>> class are converted to EEnumerationLiterals with the same name.

- Stereotype <<metaclass>> will be converted to the Ecore element with the same name.

## A.1.3. UML Attributes

- Primitive types are converted to corresponding Ecore datatypes.

- The object versions of primitive types are converted to Ecore object datatypes, e.g. Long is converted to ELongObject .

## A.1.4. UML AssociationEnds

- Will be converted to corresponding EReferences with the same name.

- Composite ends will result in a containment EReference.

- If an AssociationEnd is non-navigable, no EReference will be created.

- The multiplicity is converted accordingly.

Prev | Home | Next
Epilogue |  | Poseidon C# Code Generation Plug-In Guide