UML 关系建模

UML Relationship Modelling

这个UML和下面的文字一致吗?

Instead of trying to either define many subclasses or introduce multiple inheritance, we can instead define a set of roles that the device is meant to play. (It should be noted that this is another reason why the concept of a managed device is a good one – now, we can define a base concept of a managed device, and model its functionality by associating one or more roles to it as appropriate). This solves the mess of having the same generic function (such as routing) assigned to two different types of devices that implement that same generic function in different ways, producing different subsets of functionality.

我相信 UML 指定每个设备可以有 0 或 1 个 DeviceRoles。一位同事断言 UML 指定每个 DeviceRole 最多可以属于一个设备。无论哪种情况,UML 似乎都没有反映设备可以聚合一组角色。

UML 和文本摘自TMForum 的信息框架(SID): 物理资源业务实体

信息框架套件 GB922实物资源 版本 15.0.1 2015 年 11 月

谢谢,格雷格

UML图与文中一致。它明确表示设备聚合了零个或多个设备角色,并且设备角色可以由零个或一个设备扮演。在 UML 中,多重性与它量化的类型相邻。

如果 属性 的名字写在关联的末尾会有所帮助。

我已经处理了这份文档并从中创建了一个数据模型。在现实世界中体验资源,例如像 mikrotik 路由器这样的物理资源可以同时具有路由器和防火墙的角色。因此,该模型必须让您满足多个角色对单个资源的需求。 我希望这个例子能阐明这个主题。