language-lawyerumldeployment-diagram

UML Deployments and Node ownership


The UML 2.5.1 specification says this about Node (p. 658, section 19.4.3 "Semantics"):

"(...) The internal structure of Nodes can only consist of other Nodes."

However, it doesn't directly specify what Element can own a top-level Node in the model (as used on a deployment diagram, for example). Node inherits from Class as well as from the abstract type DeploymentTarget which inherits NamedElement.

Is it only Package that can own a Node that is not a nested Node? Or would other owner types be permissible?


Solution

  • nestedNodes are defined in the namespace of a node. That doesn't mean they are part of the structure of this node. To model this, you use them as types of the parts of the node. These types may or may not be in the set of nestedNodes. Often they are, but it is by no means necessary.

    As mentioned in a comment above, nodes are special classes and can be owned by the same elements as classes (packages, other classes, components...). The ownership itself doesn't mean much.