Skip to content

Commit 64b14f1

Browse files
committed
add version of ERD with fields
and update to the latest lexicons.
1 parent d972bbd commit 64b14f1

7 files changed

Lines changed: 150 additions & 35 deletions

File tree

ERD-with-fields.png

104 KB
Loading

ERD-with-fields.puml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@startuml "HypercertERD-with-fields"
2+
3+
!define SHOW_FIELDS true
4+
5+
!include ERD.puml
6+
7+
@enduml

ERD-with-fields.svg

Lines changed: 1 addition & 0 deletions
Loading

ERD.png

-12.4 KB
Loading

ERD.puml

Lines changed: 128 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
@startuml "HypercertERD"
22
title "Hypercert ERD"
33

4+
' Configuration variables
5+
!ifndef SHOW_FIELDS
6+
!define SHOW_FIELDS false
7+
!endif
8+
9+
!if (SHOW_FIELDS == "false")
410
hide empty fields
11+
!endif
512
hide empty methods
613
hide stereotypes
714

@@ -22,44 +29,131 @@ classDiagram {
2229
FontSize 10
2330
}
2431
.largeBold {
25-
FontSize 20
26-
FontStyle bold
32+
header {
33+
FontSize 20
34+
FontStyle bold
35+
}
2736
}
2837
}
2938
</style>
3039

31-
entity contributors #FFD4A3
32-
dataclass "impact claim" as claim <<largeBold>> #B4E5D0
33-
dataclass evidence
34-
dataclass measurements
35-
dataclass evaluations
36-
dataclass contributions
37-
dataclass location
38-
dataclass rights
39-
dataclass collection
40-
dataclass "evidence review" as review_evidence #FFFACD
41-
dataclass "measurement review" as review_measurement #FFFACD
42-
dataclass "evaluation review" as review_evaluation #FFFACD
43-
dataclass "contribution review" as review_contribution #FFFACD
44-
protocol token <<largeBold>> #FFB6C1
45-
46-
evidence --> claim : supports
47-
measurements --> claim : quantifies
48-
measurements --> location : located by
49-
evidence --> location : located by
50-
evaluations --> evidence : evaluates
51-
evaluations --> measurements : evaluates
52-
rights --> claim : defines\nrights for
53-
claim <-- token : tokenizes
54-
contributors --> contributions : make
55-
contributors --> rights : have
56-
contributions --> claim : contributes to
57-
claim --> location : located at
58-
collection --> claim : groups
59-
review_evidence --> evidence : evaluates
60-
review_measurement --> measurements : evaluates
61-
review_evaluation --> evaluations : evaluates
62-
review_contribution --> contributions : evaluates
40+
entity contributor #FFD4A3 {
41+
!if (SHOW_FIELDS == "true")
42+
DID or name/pseudonym
43+
!endif
44+
}
45+
46+
dataclass activity <<largeBold>> #B4E5D0 {
47+
!if (SHOW_FIELDS == "true")
48+
title
49+
shortDescription
50+
description
51+
image
52+
workScope
53+
workTimeFrameFrom
54+
workTimeFrameTo
55+
evidence[]
56+
contributions[]
57+
rights
58+
location
59+
createdAt
60+
!endif
61+
}
62+
63+
dataclass evidence {
64+
!if (SHOW_FIELDS == "true")
65+
content
66+
title
67+
shortDescription
68+
description
69+
createdAt
70+
!endif
71+
}
72+
73+
dataclass measurements {
74+
!if (SHOW_FIELDS == "true")
75+
hypercert
76+
measurers[]
77+
metric
78+
value
79+
measurementMethodURI
80+
evidenceURI[]
81+
createdAt
82+
!endif
83+
}
84+
85+
dataclass evaluations {
86+
!if (SHOW_FIELDS == "true")
87+
subject
88+
evaluators[]
89+
evaluations[]
90+
summary
91+
createdAt
92+
!endif
93+
}
94+
95+
dataclass contributions {
96+
!if (SHOW_FIELDS == "true")
97+
hypercert
98+
role
99+
contributor[]
100+
description
101+
workTimeframeFrom
102+
workTimeframeTo
103+
createdAt
104+
!endif
105+
}
106+
107+
dataclass location {
108+
!if (SHOW_FIELDS == "true")
109+
lpVersion
110+
srs
111+
locationType
112+
location
113+
name
114+
description
115+
createdAt
116+
!endif
117+
}
118+
119+
dataclass rights {
120+
!if (SHOW_FIELDS == "true")
121+
rightsName
122+
rightsType
123+
rightsDescription
124+
createdAt
125+
!endif
126+
}
127+
128+
dataclass collection {
129+
!if (SHOW_FIELDS == "true")
130+
title
131+
shortDescription
132+
coverPhoto
133+
claims[]
134+
createdAt
135+
!endif
136+
}
137+
138+
protocol token <<largeBold>> #FFB6C1 {
139+
!if (SHOW_FIELDS == "true")
140+
(on-chain only)
141+
!endif
142+
}
143+
144+
activity::evidence --> evidence
145+
activity::contributions --> contributions
146+
activity::rights --> rights
147+
activity::location --> location
148+
measurements::hypercert --> activity
149+
evaluations::subject --> evidence
150+
evaluations::subject --> measurements
151+
evaluations::subject --> activity
152+
contributions::hypercert --> activity
153+
collection::claims --> activity
154+
activity <-- token : tokenizes
155+
contributor --> contributions : make
156+
contributor --> rights : have
63157

64158
@enduml
65159

ERD.svg

Lines changed: 1 addition & 1 deletion
Loading

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,28 @@ all: $(PNG_FILES) $(SVG_FILES)
1919
@echo "Generating $@ from $<"
2020
plantuml -tsvg -pipe < $< > $@
2121

22+
# ERD-with-fields depends on ERD.puml since it includes it
23+
ERD-with-fields.png: ERD.puml
24+
ERD-with-fields.svg: ERD.puml
25+
2226
.PHONY: clean
2327
clean:
2428
@echo "Cleaning generated PNG and SVG files..."
2529
@rm -f $(PNG_FILES) $(SVG_FILES)
2630

31+
# Watch for changes and regenerate (requires inotify-tools)
32+
.PHONY: watch
33+
watch:
34+
@echo "Watching for changes in *.puml files..."
35+
@while true; do \
36+
inotifywait -e modify *.puml 2>/dev/null && $(MAKE) all; \
37+
done
38+
2739
.PHONY: help
2840
help:
2941
@echo "Available targets:"
3042
@echo " all - Generate all PNG and SVG files from PUML files"
3143
@echo " clean - Remove generated PNG and SVG files"
44+
@echo " watch - Watch for changes and auto-regenerate"
3245
@echo " help - Show this help message"
3346

0 commit comments

Comments
 (0)