Package Diagrams

Parent Previous Next

Package Diagrams
Package Diagrams are used to reflect the organization of packages and their elements. When used to represent class elements package diagrams are used to provide a visualization of the namespaces. The most common uses for Package diagrams is to use them to organize Use-Case Diagrams and Class diagrams, although the use of Package Diagrams is not limited to these UML elements.

Elements contained in a Package share the same namespace, this sharing of namespace requires the elements contained in a specific namespace to have unique names.

Packages can be built to represent either physical or logical relationships. When choosing to include classes to specific packages, it is useful to assign the classes with the same inheritance hierarchy to packages, classes that are related via composition and classes that collaborate with also have a strong argument for being included into the same package..

Packages are represented in UML 2.0 as folders and contain the elements that share a namespace; all elements within a package must have a unique identifier. The Package must show the Package name and can optionally show the elements within the Package in extra compartments.

Package Merge
When a «merge» connector is used on a package, the source of the merge imports the targets nested and imported contents. If an element exists within the source and in the target the sources elements definitions will be expanded to will be expanded to include the element definitions contained in the target. All of the elements added or updated by a merge are noted by a generalization relationship from the source to the target.

Package Import
The «import» connector indicates that the elements within the target package, which in this example is a single class, the target package, will be imported into the source package. The Source Packages namespace will gain access to the Targets class/s; the Targets namespace is not affected.

Nesting Connectors
The nesting connector between the target package and source packages reflect what the package contents reveal.

Created with the Personal Edition of HelpNDoc: Easily create Help documents