The MagicDraw (or other modeling tool developed by No Magic Inc.) 17.0 UML metamodel has a nested package structure. UML is a root package that has nested subpackages, for example, classes/mdkernel, components/mdbasiccomponents, mdusecases. Metadata about a specific model element can be found in the package of the element. For example, a UML model element Property is from the package uml/classes/mdkernel, so metadata about Property can be found in the package com.nomagic.uml2.ext.magicdraw.classes.mdkernel.metadata.MdkernelPackage.
EAttribute nameAttribute = UMLPackage.Literals.NAMED_ELEMENT__NAME;
Model elements can be created using the EMF UML factory com.nomagic.uml2.ext.magicdraw.metadata.UMLFactory: For example:
Component component = UMLFactory.eINSTANCE.createComponent();
The element will be created in the repository of the active project. UML model elements are not contained by any EMF resource.