Namespace (UML)

from Wikipedia, the free encyclopedia

A namespace ( English namespace ) is a model element in the Unified Modeling Language (UML). In this way, names of model elements should be clearly distinguishable, so that a clear assignment (= identification) between name and model element is possible.

Namespace is an abstract model element in the UML2 metamodel . This means that a modeler who creates a model based on UML does not work directly with namespace . It is more likely to come into contact with one of the UML model elements that specialize in namespaces , for example with the package model element .

A namespace contains a group of model elements that must meet two conditions. First, they must have a name. Second, each element must be assigned one of the visibility public , private , protected or package .

Model elements in a namespace must be clearly distinguishable. The rule for this is relatively simple: two model elements are exactly the same if they have the same name and if their metaclasses are based on the same generalization type. Otherwise they are considered different.

Two model elements in different namespaces can, however, have the same name. In this case, they differ in their qualified name . The qualified name of a model element consists of the simple name preceded by the names of all enclosing namespaces. The individual segments of the qualified name are also ::separated. The class Heizung in the namespace Heizungssteuerungbears the qualified name, for example Heizungssteuerung::Heizung.

See also

Individual evidence

  1. a b c Unified Modeling Language Specification: Namespace. Retrieved September 18, 2018 .
  2. Vienna University of Technology: UML namespace. Retrieved September 18, 2018 .