E.g. 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 this 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).
Note: "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.