如何用plantuml绘制互连表
我尝试用plantuml绘制互连的表(不是eentities!)。不幸的是,我找不到任何命名表的可能性。我唯一可以使用的解决方案是将其定义在另一个组件中,例如。一个对象,能够在它们之间建立互连。
@startuml
object Organization {
<#lightblue,#black>|= organizationNo |= name |= address |
<#white>| OS07 | Sphereways | 22 Rabbit Rd, London |
<#white>| OO7 | Orco | 16 Adam St, Nuremberg |
<#white>| OC11 | Cruxolutions | 163 Olga St, Budapest |
}
object OrgCust {
<#lightblue,#black>|= organizationNo |= customerNo |
<#white>| OS07 | CM67 |
<#white>| OS7 | CM67 |
<#white>| OC11 | CH11 |
}
object Customer {
<#lightblue,#black>|= customerNo |= fName |= lName |= creditLimit |
<#white>| CJ13 | John | Jeschke | 5000 |
<#white>| CK37 | Nina | Knabel | 2000 |
<#white>| CM67 | Felix | Magee | 1300 |
<#white>| CH11 | Lilla | Hopka | 3000 |
}
Organization -[hidden]-> OrgCust
OrgCust -[hidden]-> Customer
Organization ||--o{ OrgCust
Customer ||--o{ OrgCust
@enduml
看起来还不错,但是额外的框架有些打扰我。有可能避免这些帧并直接连接表(但也许仍然有标题的表格)?
I try to draw interconnected tables (not Eentities!) with PlantUml. Unfortunately, I could not find any possibility to name a table. The only solution I could use is to define it in another component, eg. an object, to be able to make interconnections between them.
@startuml
object Organization {
<#lightblue,#black>|= organizationNo |= name |= address |
<#white>| OS07 | Sphereways | 22 Rabbit Rd, London |
<#white>| OO7 | Orco | 16 Adam St, Nuremberg |
<#white>| OC11 | Cruxolutions | 163 Olga St, Budapest |
}
object OrgCust {
<#lightblue,#black>|= organizationNo |= customerNo |
<#white>| OS07 | CM67 |
<#white>| OS7 | CM67 |
<#white>| OC11 | CH11 |
}
object Customer {
<#lightblue,#black>|= customerNo |= fName |= lName |= creditLimit |
<#white>| CJ13 | John | Jeschke | 5000 |
<#white>| CK37 | Nina | Knabel | 2000 |
<#white>| CM67 | Felix | Magee | 1300 |
<#white>| CH11 | Lilla | Hopka | 3000 |
}
Organization -[hidden]-> OrgCust
OrgCust -[hidden]-> Customer
Organization ||--o{ OrgCust
Customer ||--o{ OrgCust
@enduml
It looks not that bad, but the extra frames disturb me a bit. Would be possible to avoid these frames and connect the tables directly (but maybe still have a caption for the tables)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试将它们绘制为注释(不幸的是,克里奥尔语法在矩形或软件包元素中不起作用)。 You have to hide the note outline and background:
要获得表格的标题,您可以在桌子上格式化它吗?或在注释(开始或结束)内的一行中添加
&lt; b&gt;/b&gt;
吗?EDIT
I also discovered that you can embed the table in the name of a class, such as:
You can try to draw them as notes (the Creole syntax doesn't work in Rectangle or Package elements unfortunately). You have to hide the note outline and background:
To get a caption for the tables, you could format it in the table somehow? Or add
<b>Caption here</b>
on a line inside the note (beginning or end)?EDIT
I also discovered that you can embed the table in the name of a class, such as: