Skip to content

Commit

Permalink
corrected direction in sub and super union
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkopaul Sarkar committed Nov 27, 2024
1 parent 2f81ec1 commit 1c84519
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
12 changes: 11 additions & 1 deletion docs/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,16 @@ equiUnion(ns1:Machine, '["iof:PieceOfEquipment", "iof:Assembly", "iof:System"]')

#### Alternative: reference by variable

```
@startuml
oClass(iof:PieceOfEquipment)
oClass(iof:Assembly)
oClass(iof:System)
class(m1, ns1:Machine)
union(m2, '["iof:PieceOfEquipment", "iof:Assembly", "iof:System"]')
equivalent(m1, m2)
```

```plantuml
@startuml
!include https://raw.githubusercontent.com/iofoundry/ontopuml/main/iof.iuml
Expand Down Expand Up @@ -446,7 +456,7 @@ oClass(iof:PieceOfEquipment)
oClass(iof:Assembly)
oClass(iof:System)
oClass(ns1:Machine)
subUnion(ns1:Machine, '["iof:PieceOfEquipment", "iof:Assembly", "iof:System"]')
subUnion(ns1:Machine, '["iof:PieceOfEquipment", "iof:Assembly", "iof:System"]', left, left)
@enduml
```

Expand Down
8 changes: 4 additions & 4 deletions ontologyv2.iuml
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ skinparam roundCorner 10
!endfor
!$n = getVariable($class)
!if $n
$n -u-|> $var
$n -$direction-|> $var
!else
$class -u-|> $var
$class -$direction-|> $var
!endif
!endprocedure

Expand All @@ -341,9 +341,9 @@ skinparam roundCorner 10
!endfor
!$n = getVariable($class)
!if $n
$var -u-|> $n
$var -$direction-|> $n
!else
$var -u-|> $class
$var -$direction-|> $class
!endif
!endprocedure

Expand Down
2 changes: 1 addition & 1 deletion test/testv2/material-state.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ oClass(iof:System)
oClass(ns1:Machine)
' union(m2, '["iof:PieceOfEquipment", "iof:Assembly", "iof:System"]')
' equivalent(m1, m2, down)
equiUnion(ns1:Machine, '["iof:PieceOfEquipment", "iof:Assembly", "iof:System"]', left, down)
subUnion(ns1:Machine, '["iof:PieceOfEquipment", "iof:Assembly", "iof:System"]', left, left)
@enduml

0 comments on commit 1c84519

Please sign in to comment.