Skip to content

Commit d416103

Browse files
committed
Forked examples from plantUML git
1 parent 1b65130 commit d416103

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1100
-0
lines changed

examples/input/Activity.puml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@startuml Activity
2+
start
3+
:init;
4+
-> test of color;
5+
if (color?) is (<color:red>red) then
6+
:print red;
7+
else
8+
:print not red;
9+
note right: no color
10+
endif
11+
partition End {
12+
:end;
13+
}
14+
-> this is the end;
15+
end
16+
@enduml

examples/input/Board.puml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@startboard
2+
A1
3+
+U1.1
4+
++S1 R1
5+
++S1 R2
6+
+U1.2
7+
A2
8+
@endboard
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
@startuml
2+
hide empty members
3+
abstract class AbstractList
4+
abstract AbstractCollection
5+
interface List
6+
interface Collection
7+
8+
List <|-- AbstractList : AList to List <
9+
Collection "many" <|-- "many" AbstractCollection : AColl to Coll
10+
11+
Collection <|- List : List to Coll
12+
AbstractCollection <|- AbstractList : AList to AColl
13+
AbstractList <|-- ArrayList : ArList to AList
14+
note on link: this is a note\non link
15+
16+
class ArrayList {
17+
Object[] elementData
18+
size()
19+
}
20+
21+
enum TimeUnit {
22+
DAYS
23+
HOURS
24+
MINUTES
25+
}
26+
27+
annotation SuppressWarnings
28+
SuppressWarnings +-l-> ArrayList
29+
annotation Annotation <<stereotype>> {
30+
annotation with members
31+
String foo()
32+
String bar()
33+
}
34+
35+
class Dummy {
36+
-field1
37+
#field2
38+
~method1()
39+
+method2()
40+
{static} String id
41+
{abstract} void methods()
42+
}
43+
44+
note "This is a floating note" as N1
45+
46+
N1 #-u-> AbstractCollection
47+
N1 -r-> ArrayList
48+
49+
package foo_frame <<Frame>> {
50+
class Foo<? extends Element> {
51+
int si ze()
52+
}
53+
}
54+
Foo *-- Element
55+
Element --() interface
56+
57+
note right of Foo::size
58+
This is a note
59+
end note
60+
61+
note right of Element
62+
This is a note
63+
end note
64+
65+
class User <<user>> <<admin>> {
66+
.. Simple Getter ..
67+
+ getName()
68+
+ getAddress()
69+
.. Some setter ..
70+
+ setName()
71+
__ private data __
72+
int age
73+
-- encrypted --
74+
String password
75+
}
76+
@enduml
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@startuml
2+
' Source: https://github.com/plantuml/plantuml/issues/1467 '
3+
4+
interface Map<K,V>
5+
class HashMap<Long,Customer>
6+
7+
Map <|.. HashMap
8+
Shop [customerId: long] ---> "customer\n1" Customer
9+
HashMap [id: Long] -r-> "value" Customer
10+
@enduml

examples/input/Class.puml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@startuml
2+
abstract abstract
3+
abstract class "abstract class"
4+
annotation annotation
5+
circle circle
6+
() circle_short_form
7+
class class
8+
class class_stereo <<stereotype>>
9+
diamond diamond
10+
<> diamond_short_form
11+
entity entity
12+
enum enum
13+
exception exception
14+
interface interface
15+
metaclass metaclass
16+
protocol protocol
17+
stereotype stereotype
18+
struct struct
19+
@enduml

examples/input/Deployment.puml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
@startuml
2+
action action
3+
actor actor
4+
actor/ "actor/"
5+
agent agent
6+
artifact artifact
7+
boundary boundary
8+
card card
9+
circle circle
10+
cloud cloud
11+
collections collections
12+
component component
13+
control control
14+
database database
15+
entity entity
16+
file file
17+
folder folder
18+
frame frame
19+
'hexagon hexagon
20+
interface interface
21+
label label
22+
node node
23+
package package
24+
person person
25+
process process
26+
queue queue
27+
rectangle rectangle
28+
stack stack
29+
storage storage
30+
usecase usecase
31+
usecase/ "usecase/"
32+
@enduml
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@startuml
2+
3+
package "Some Group" {
4+
HTTP - [First Component]
5+
[Another Component]
6+
}
7+
8+
node "Other Groups" {
9+
FTP - [Second Component]
10+
[First Component] --> FTP
11+
}
12+
13+
cloud {
14+
[Example 1]
15+
}
16+
17+
database "MySql" {
18+
folder "This is my folder" {
19+
[Folder 3]
20+
}
21+
frame "Foo" {
22+
[Frame 4]
23+
}
24+
}
25+
26+
[Another Component] --> [Example 1]
27+
[Example 1] --> [Folder 3]
28+
[Folder 3] --> [Frame 4]
29+
30+
@enduml

examples/input/EBNF.puml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@startebnf
2+
(* Test of some EBNF elements *)
3+
rule-0 = rule, "litteral_dq", 'litteral_sq', ?special?;
4+
r1 = t, [h], {e}, {o}-;
5+
r2 =(3 * nil | z), (r | s), t;
6+
e = ;
7+
@endebnf

examples/input/Files.puml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@startfiles
2+
/.github/
3+
/tests/v1/example_test.py
4+
/tests/__init__.py
5+
/doc/dummy.doc
6+
<note>
7+
this is a note
8+
on two lines
9+
</note>
10+
/LICENSE
11+
@endfiles

examples/input/Gantt.puml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@startgantt
2+
[Task1] lasts 10 days
3+
note bottom
4+
memo1 ...
5+
memo2 ...
6+
explanations1 ...
7+
explanations2 ...
8+
end note
9+
[Task2] lasts 4 days
10+
[Task1] -> [Task2]
11+
[Test 000] lasts 7 days and starts at [Task2]'s end and is 0% complete
12+
[Test 025] lasts 7 days and starts at [Task2]'s end and is 25% complete
13+
[Test 060] lasts 7 days and starts at [Task2]'s end and is 60% complete
14+
[Test 100] lasts 7 days and starts at [Task2]'s end and is 100% complete
15+
-- Separator title --
16+
[M1] happens on 5 days after [Task1]'s end
17+
-- end --
18+
@endgantt

0 commit comments

Comments
 (0)