Skip to content

Commit 0dd795e

Browse files
ValyVanDenBroeckunknown
authored andcommitted
Add uml file
Update ldes-vocabulary-build.yml to render plantuml svg Update vocabulary.bs add UML
1 parent 3a8fb66 commit 0dd795e

File tree

4 files changed

+114
-2
lines changed

4 files changed

+114
-2
lines changed

.github/workflows/ldes-specification-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ jobs:
6767
git push
6868
else
6969
echo "No changes to commit."
70-
fi
70+
fi

.github/workflows/ldes-vocabulary-build.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,47 @@ on:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
1618

1719
steps:
1820
- uses: actions/checkout@v3
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Set up Java
25+
uses: actions/setup-java@v4
26+
with:
27+
distribution: 'temurin'
28+
java-version: '17'
29+
30+
- name: Install GraphViz
31+
run: sudo apt-get update && sudo apt-get install -y graphviz
32+
33+
- name: Download PlantUML jar
34+
run: curl -L -o plantuml.jar https://github.com/plantuml/plantuml/releases/download/v1.2024.7/plantuml-1.2024.7.jar
35+
36+
# Optionally check the SHA256 checksum to avoid corrupt downloads
37+
# - name: Verify PlantUML jar checksum
38+
# run: echo "<expected_sha256_here> plantuml.jar" | sha256sum -c -
39+
40+
- name: Render .puml to .svg
41+
run: |
42+
find . -name '*.puml' -exec java -jar plantuml.jar -tsvg -o . {} +
43+
44+
- name: Commit rendered diagrams
45+
run: |
46+
git config --global user.name "github-actions[bot]"
47+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
48+
git add *.svg
49+
50+
if git diff --cached --quiet; then
51+
echo "No diagram changes to commit."
52+
else
53+
git commit -m "auto-rendered PlantUML diagrams"
54+
git push
55+
fi
56+
rm -f plantuml.jar || true
1957
2058
- name: Publish Bikeshed document
2159
uses: w3c/spec-prod@v2
@@ -61,4 +99,4 @@ jobs:
6199
git push
62100
else
63101
echo "No changes to commit."
64-
fi
102+
fi

uml.puml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
@startuml
2+
3+
' ===================
4+
' Classes and Attributes
5+
' ===================
6+
7+
class "tree::Relation" {
8+
+ tree:path
9+
+ tree:remainingItems : int
10+
+ tree:value
11+
}
12+
13+
class "tree::Node" {
14+
+ ldes:immutable : boolean
15+
+ ldes:viewDescription
16+
}
17+
18+
class "tree::Collection" {
19+
+ tree:member
20+
}
21+
22+
class "sh::NodeShape"
23+
24+
class "dcat::Distribution"
25+
26+
class "hydra::IriTemplate"
27+
28+
class "ldes::RetentionPolicy" {
29+
+ ldes:fullLogDuration
30+
+ ldes:startingFrom : dateTime
31+
+ ldes:versionAmount
32+
+ ldes:versionDeleteDuration : duration
33+
+ ldes:versionDuration : duration
34+
}
35+
36+
class "ldes::EventStream" {
37+
+ ldes:pollingInterval : int
38+
+ ldes:sequencePath
39+
+ ldes:timestampPath
40+
+ ldes:versionOfPath
41+
+ ldes:versionSequencePath
42+
+ ldes:versionTimestampPath
43+
}
44+
45+
class "ldes::EventSource" {
46+
+ ldes:transactionFinalizedObject
47+
+ ldes:transactionFinalizedPath
48+
+ ldes:transactionPath
49+
+ ldes:versionCreateObject
50+
+ ldes:versionCreatePath
51+
+ ldes:versionDeleteObject
52+
+ ldes:versionDeletePath
53+
+ ldes:versionUpdateObject
54+
+ ldes:versionUpdatePath
55+
}
56+
57+
' ===================
58+
' Relationships
59+
' ===================
60+
61+
"tree::Relation" --> "tree::Node" : tree:node
62+
"tree::Node" --> "tree::Collection" : tree:view
63+
"tree::Collection" --> "tree::Node" : tree:shape
64+
"dcat::Distribution" <|-- "ldes::EventSource"
65+
"ldes::EventSource" --> "ldes::EventStream" : tree:viewDescription
66+
"ldes::EventStream" --> "ldes::RetentionPolicy" : ldes:retentionPolicy
67+
"tree::Relation" --> "hydra::IriTemplate" : hydra:iriTemplate
68+
69+
@enduml

vocabulary.bs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ This specification introduces terms used to describe event streams.
1616
While these terms can be used independently of the LDES specification,
1717
the main LDES specification is available at [https://w3id.org/ldes/specification](https://w3id.org/ldes/specification).
1818

19+
<figure id="fig-ldes-model">
20+
<img src="uml.svg" alt="LDES model diagram">
21+
<figcaption>LDES model diagram (<a href="uml.puml">source</a>)</figcaption>
22+
</figure>
23+
1924
# Terms # {#terms}
2025

2126
This document introduces terms in the namespace `https://w3id.org/ldes#` with the preferred prefix `ldes:`.

0 commit comments

Comments
 (0)