Object model UMLData
The starting point to access UML elements is the root package (IUMLPackage), which is a property of the IDocument interface. All children of the root package are a subtype of IUMLElement and are stored as defined by the OMG in the UML Superstructure Specification (http://www.uml.org). Specifically, the UML Superstructure Specification defines the following relationship for UML Element:
Which means that every UML element can have a list of owned elements, and every UML element (apart from the root-package) has an owner.
In the UModel API, an UML element is mapped to IUMLElement having the properties OwnedElement and Owner. Since these relationships are "read only" in the UML specification, both properties cannot be modified in the UModel API.
The UML Superstructure Specification also defines the following relationship between Package and PackageableElement:
This is mapped to IUMLPackageableElement having a property OwningPackage and an IUMLPackage, which not only has a property PackagedElements, but also a method InsertPackagedElementAt to insert new IUMLPackageableElements (at the specified position). The method EraseFromModel deletes any IUMLElement (and all its children) from the model.
This structure is independent of whether these elements are shown on any diagram or not.