如何在类图中指定顺序重要的结构

海里

在上一个问题中,我试图实现对类进行排序的想法。尽管我提出的示例不合适。

所以这是我想通过UML类图归因的情况:

在ODT文档中,我有一个叫做的东西figure该图由两个原子元素组成:imagetitle(图像的)。该标准允许我将放置title在上方image或下方。尽管在我的应用程序中,title它将始终image下面这样:

在此处输入图片说明

So in my case I want to submit the (more specific) information that the title must be beneath the image (although the standard does not obligate so). Thus I came up to the idea of making order in my class diagram (this is first, then this, then this, etc...). Because in my case that matters.

Here is my despaired attempt:

在此处输入图片说明

Is there any approach to present that information through a UML Class Diagram?

Jim L.

In the UML meta-model, there are meta-elements called Class and Property. An instance of a Class meta-element (e.g., called Figure) may own instances of a Property meta-element. Each instance of a Property meta-element has a type (e.g., Image and Figure). Both of the instances of the Property meta-element in your model are unnamed, which, unfortunately, makes it difficult to refer to them. Nonetheless, all of the instances of the Property meta-element that an instance of the Class meta-element owns are ordered. When you create a property in a UML tool, you generally add it to the end of an ordered list.

In your diagram there are two unnamed properties that are already ordered (implicitly, based on which you created first in the tool). This order can be seen and changed in a UML compliant tool. Here is an example UML model:

在此处输入图片说明

I strongly recommend you name all your properties, as I have done in my example model. For example, I named them title and image, starting with a lower-case letter. Among other benefits, that way you can see which is which more easily when you reorder them.

Here is a specification window in a professional tool called MagicDraw, where you can drag properties into the order you like:

在此处输入图片说明

You could change the order to say that the image comes before the title.

PS,在分析模型中,如果此排序是在问题领域中很重要的规则,则实际上我将显示一个显式的关联,ImageTitle在关联末端具有类似comes before和的名称comes after

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何在JAR清单文件中指定类路径的加载顺序

来自分类Dev

如何在API蓝图中指定请求标头

来自分类Dev

如何在R中的表格图中指定条形的颜色

来自分类Dev

如何在OSGi蓝图中指定属性文件的位置?

来自分类Dev

如何在ReactCSSTransitionGroup中指定项目的顺序?

来自分类Dev

传单:如何在图层控件中指定叠加顺序?

来自分类Dev

如何在angular js测试中指定http响应顺序?

来自分类Dev

如何在JavaFX 8 Alert中指定按钮的特定顺序

来自分类Dev

如何在ivot_wider中指定特定的列顺序

来自分类Dev

如何在JSF中指定评估顺序?

来自分类Dev

如何在类图中指示类型列表

来自分类Dev

如何在Java中指定泛型类的内部类?

来自分类Dev

如何在app.config中指定类的类型?

来自分类Dev

Ruby:如何在循环块参数中指定类

来自分类Dev

IntelliJ IDEA:如何在Kotlin中指定主类?

来自分类Dev

如何在目标C中指定完全限定的类名?

来自分类Dev

如何在IntelliJ中指定Java类所需的依赖关系?

来自分类Dev

如何在剃刀视图中指定全局MVC布局而不指定布局路径

来自分类Dev

如何在sed中指定“或”

来自分类Dev

如何在Rails应用程序视图中指定销毁路径助手?

来自分类Dev

如何在单个ggplot2图中指定不同的调色板和线条大小

来自分类Dev

matplotlib:如何在2D历史图中指定颜色级别

来自分类Dev

如何在Apiary.io/API蓝图中指定请求正文属性?

来自分类Dev

如何在jqPlot堆叠条形图中指定条形颜色?

来自分类Dev

如何在plot.loglm图中指定每个变量位置(图形侧)

来自分类Dev

如何在amCharts的堆叠柱形图中指定堆叠类别的颜色?

来自分类Dev

如何在每页多个图的图中指定字体大小?

来自分类Dev

如何在node.js中的MongoDB索引的javascript对象中指定属性的顺序?

来自分类Dev

如何在Intellij Idea中指定多模块项目的编译顺序?

Related 相关文章

  1. 1

    如何在JAR清单文件中指定类路径的加载顺序

  2. 2

    如何在API蓝图中指定请求标头

  3. 3

    如何在R中的表格图中指定条形的颜色

  4. 4

    如何在OSGi蓝图中指定属性文件的位置?

  5. 5

    如何在ReactCSSTransitionGroup中指定项目的顺序?

  6. 6

    传单:如何在图层控件中指定叠加顺序?

  7. 7

    如何在angular js测试中指定http响应顺序?

  8. 8

    如何在JavaFX 8 Alert中指定按钮的特定顺序

  9. 9

    如何在ivot_wider中指定特定的列顺序

  10. 10

    如何在JSF中指定评估顺序?

  11. 11

    如何在类图中指示类型列表

  12. 12

    如何在Java中指定泛型类的内部类?

  13. 13

    如何在app.config中指定类的类型?

  14. 14

    Ruby:如何在循环块参数中指定类

  15. 15

    IntelliJ IDEA:如何在Kotlin中指定主类?

  16. 16

    如何在目标C中指定完全限定的类名?

  17. 17

    如何在IntelliJ中指定Java类所需的依赖关系?

  18. 18

    如何在剃刀视图中指定全局MVC布局而不指定布局路径

  19. 19

    如何在sed中指定“或”

  20. 20

    如何在Rails应用程序视图中指定销毁路径助手?

  21. 21

    如何在单个ggplot2图中指定不同的调色板和线条大小

  22. 22

    matplotlib:如何在2D历史图中指定颜色级别

  23. 23

    如何在Apiary.io/API蓝图中指定请求正文属性?

  24. 24

    如何在jqPlot堆叠条形图中指定条形颜色?

  25. 25

    如何在plot.loglm图中指定每个变量位置(图形侧)

  26. 26

    如何在amCharts的堆叠柱形图中指定堆叠类别的颜色?

  27. 27

    如何在每页多个图的图中指定字体大小?

  28. 28

    如何在node.js中的MongoDB索引的javascript对象中指定属性的顺序?

  29. 29

    如何在Intellij Idea中指定多模块项目的编译顺序?

热门标签

归档