Object model UMLData

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  UModel Programmer's Reference > The UModel API > Overview > Object Model >

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 2.4 Superstructure Specification (also see http://www.uml.org).

 

E.g. the UML Superstructure Specification defines the following relationship for UML Element:

UMLSS_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:

UMLSS_Package

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.

 

The sample below shows the mapping of a project which consists of two classes (IUMLClass) with a dependency (IUMLDependency) between them:

Object model UMLData - no GuiElements

This structure is independent of whether these elements are shown on any diagram or not.

 

The representation of graphical objects on diagrams (as shown in the image below) is stored in a second structure with elements of kind IUMLGuiElement (also see Graphical Objects).

MyClassDiagram1

The starting point to access UML GUI elements is the GuiRoot (IUMLGuiRootElement), which is a property of the IDocument interface.

 

Lines are handled by IUMLGuiLineLinks, most other objects (like classes, interfaces, packages,...) by IUMLGuiNodeLinks.

Object model UMLData


© 2019 Altova GmbH