Package Diagram

The package diagram is a structure diagram of Unified Modeling Language (UML). It depicts a view of the structure of the package structure.

You can use the established MID modeling tool to create a Package Diagram.
Test the Innovator Enterprise Modeling Suite for free.

Definition

The package diagram is a structure diagram which makes use of appropriate package structures to represent classifiers that are in a relationship and are therefore assigned to a package, in order to achieve a simplified overview of the model.

The package diagram icon shows a diagram with a package icon.

Use

A package diagram supports the modeler when graphically portraying the basic system structure.

Packages and their relationships to each other are modeled for various different purposes.

  • Customers can identify what the structure of the completed system will look like at an early stage.
  • A structure is set by the system's developers.
  • Authors of the documentation and help are given an idea of what to write about.
  • Reusability is facilitated by encapsulation of internal details.

Package diagrams offer a high degree of freedom in structuring the system since packages do not explicitly need to correspond to a system component.

Elements in Package Diagrams

Nodes

The following model elements can be shown as nodes in the package diagram:

Table: Node Types
Icon Element Brief Description
Component Components are modular parts of a system that are structured so that they could be replaced in their environment by another, equivalent component. A component separates its inner structure from the outside as a module and instead provides a set of interfaces or ports that exist or are required.
Package A package groups a set of model elements into a group and provides a namespace for this group. Packages can contain other packages as sub packages.
Interface

An interface declares a list of attributes, operations and signal receivers with public visibility.

If a classifier provides an interface, this ensures that it realizes all of the interface's operations and implements all attributes in a suitable way.

A classifier which needs an interface expects a second classifier that realizes the interface to provide operations and attributes suitable for use.

Class

A class contains the description and structure of objects which can be created using it (templates for objects). A class is defined by its attributes and operations.

If you drag the class to an existing class, the newly-created class becomes the inner class of the existing class.

Artifact Artifacts show a physical information entity, e.g. models, source code, scripts or documents which are created or required in the development process or runtime of your system.
Global Condition A global condition is a Boolean term that specifies the semantic of one or more model elements.

Edges

Edges in package diagrams represent interfaces or show dependencies between the diagram's nodes.

Table: Edge Types
Icon Element Brief Description
Provided Interface A provided interface is an interface that realizes, and therefore offers, a classifier.
Required Interface A required interface is an interface that a classifier requires so it can function.
Dependency A dependency is a directed relationship that states that the source element depends on the target element.
Use A use is a dependency relationship that shows that the element uses the linked element.
Abstraction An abstraction is a directed relationship that demonstrates that the element shows an abstraction of the linked element.
Realization A realization is a directed relationship that demonstrates that the element shows a realization of the linked element.
Public element import or package import The public element import or package import is a directed relationship to an imported element or package; this can then be transitively imported by other namespaces.
Private element import or package import The private element import or package import is a directed relationship to an imported element or package; this can then not be indirectly imported by other namespaces.
Component realization A component realization is a dependency relationship that shows that the classifier realizes part of the linked components.
Interface Realization An interface realization is a dependency relationship that sets that the classifier realizes the behavior specified in the linked interface.
Create Default A create default is a special dependency relationship that indicates that newly-created elements are created in the target container.
Membership Adds an existing membership edge to an element.
Association Edge Adds an existing association edge to an element.
Directed Relationship Edge Adds an existing directed relationships edge to an element.
Socket/Ball Edge Adds an existing socket/ball edge to an element.

Example for a Package Diagram

Further Information

http://www.uml.org/