UML元模型:派生,派生联合和子集 [英] UML metamodel: derived, derived union and subsetting

查看:143
本文介绍了UML元模型:派生,派生联合和子集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您曾经使用过UML的元模型,就应该了解联合和子集的概念-就我所知:

If you have ever worked with the metamodel of UML, you propably know the concepts of unions and subsets - As far as I understand it:

  • 标记为"派生的联合"的元素/类的属性和关联不能直接使用.在更具体的子类中,您可能会找到可以使用的子集,只要它们本身未标记为派生的并集即可.
  • "派生的"(不具有并集)属性和关联在更特定的类中也具有子集,但是与上述不同,您可以直接使用它们而不必在更特定的类中查找子集
  • Attributes and associations of an element/class marked as "derived union" cannot be used directly. In more specific sub-classes, you can possibly find subsets of them that can be used, as long as they are not marked as derived unions themselves.
  • "derived" (without union) attributes and associations have also subsets in more specific classes, but unlike above you can use them directly without having to look for subsets in more specific classes

我的问题:

  1. 这有意义吗,还是我在这里走错了路?
  2. 在某些字符前面可以找到"/"(斜杠)的含义是什么 属性/关联,它们在子类中有子集吗? 例如. /general:分类器[*]
  1. Does this make sense or am I on the wrong track here?
  2. What is the meaning of the "/" (slash) you can find in front of some attributes/associations, that they have subsets in child-classes? E.g. /general : Classifier[*]

推荐答案

联合属性是由多个其他属性组成的属性.当您组合所有子集时,您只能理解联合.从定义上看,清单几乎是一个联合. 几乎是因为它可能尚未初始化.

An union property is a property that consists of multiple other properties. You can only understand the union, when you combine all subsets. A list is almost by definition an union. Almost, because it might be uninitialized.

派生联合是需要特定子集集合的属性.我不会谈论直接访问它们,而是谈论您可以多么直接地理解它们.在进行解释之前,您需要所有信息.

A derived union is a property requiring a specific collection of subsets. I would not talk about accessing them directly, but about how direct you can understand them. You need all information before you can make an interpretation.

两者之间的区别是,派生的并集需要一个特定的子集,而一个并集可能具有一个子集,并且在不同的上下文中可能具有不同的子集.一个非常简单的示例是表单上的字段.所有必填字段均显示派生联合的定义.所有其他字段都是完整联合的一部分.

The difference between the two that a derived union requires a specific subset and an union might have a subset and might have different subsets in different contexts. A very simple example being the fields on a form. All required fields show the definition of a derived union. All other fields are part of the complete union.

派生联合可以在其子集中包含派生联合.它指导了类及其实例的创建,但并没有使它们成为不可能.

Derived unions can contain derived unions in their subsets. It directs the creation of classes and their instances, it does not make them impossible.

所有派生的功能都需要其他功能才能知道.可以直接读取温度,但是要知道某人发烧需要更多的知识,例如一天中的时间,收集信息的地方等.

All derived features require other features to be known. Temperature can be read directly, but to know if someone has fever requires more knowledge, like the time of the day, the place of collecting information etc..

斜杠表示它是派生的.

这篇关于UML元模型:派生,派生联合和子集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆