Skip to content

Commit e31bb4a

Browse files
Add ldes uml (#109)
1 parent 3a8fb66 commit e31bb4a

8 files changed

Lines changed: 130 additions & 12 deletions

File tree

.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

context.jsonld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"DurationAgoPolicy": "ldes:DurationAgoPolicy",
1212
"PointInTimePolicy": "ldes:PointInTimePolicy",
1313
"node": {"@type": "@id", "@id": "tree:node"},
14-
"members": {"@type": "@id", "@id": "tree:member", "@container":"@list"},
15-
"relations": {"@type": "@id", "@id": "tree:relation"},
14+
"member": {"@type": "@id", "@id": "tree:member", "@container":"@list"},
15+
"relation": {"@type": "@id", "@id": "tree:relation"},
1616
"view": {"@type": "@id", "@id": "tree:view"},
1717
"path": {"@container": "@list", "@id": "tree:path", "@type": "@id"},
1818
"value": {"@id":"tree:value"},

eventstreams.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ When using the current time in calculations, the consumer MUST take into account
435435
The `ldes:timestampPath` points to the timestamp in the member that can be compared with the current time minus the durations.
436436
When the `ldes:versionTimestampPath` has been set, the two version durations must be compared with this timestamp.
437437

438-
Historically, there are more specific types of retention policies that MUST remain supported, although their use is discouraged in favor of the retention policy design just introduced.
438+
Historically, there are more specific types of retention policies that MUST remain supported, although their use is discouraged in favour of the retention policy design just introduced.
439439
These retention policy types are:
440440
1. `ldes:DurationAgoPolicy`: a time-based retention policy in which data generated before a specified duration is not retained.
441441
2. `ldes:LatestVersionSubset`: a version subset based on the latest versions of an entity in the stream.

server-primer.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Note: When using content negotiation, set `Vary: Accept`.
2727

2828
It SHOULD provide an `ETag` header on responses. If the page is immutable, it SHOULD provide a `Cache-Control: immutable` header.
2929

30-
If [[!json-ld]] is used, there is an example context at https://w3id.org/ldes/context.
30+
If [[!json-ld]] is used, there is an example [context](https://w3id.org/ldes/context).
3131
Do not reference this URL directly in production; copy it into your project.
3232
If you host an external context yourself, ensure robust caching with the `ETag` and/or `Cache-Control` max-age headers.
3333

@@ -136,7 +136,7 @@ Computation and time base
136136
- If `ldes:versionTimestampPath` is set, evaluate `ldes:versionDuration` and `ldes:versionDeleteDuration` against that version timestamp.
137137
- Servers SHOULD account for small clock skew by using a safety buffer when computing which members fall outside the window.
138138

139-
Publishing changes and server behavior
139+
Publishing changes and server behaviour
140140
- When compaction removes members or whole nodes from a view, update the search tree so that no relations point to removed nodes.
141141
- For nodes that are no longer available, respond with `410 Gone`. Clients will treat such a page as having no members and no relations.
142142
- Do not modify the content of immutable pages; instead, stop linking to them, redirect, or make them `410 Gone`.
@@ -147,7 +147,7 @@ Sliding full history for one year, plus version constraints
147147
```turtle
148148
@prefix ldes: <https://w3id.org/ldes#> .
149149
@prefix tree: <https://w3id.org/tree#> .
150-
@prefix dcterms: <http://purl.org/dc/terms/> .
150+
@prefix dct: <http://purl.org/dc/terms/> .
151151
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
152152

153153
<> a ldes:EventSource ;
@@ -177,7 +177,7 @@ Point-in-time start and version window
177177

178178
Notes
179179
- Changing a retention policy affects client expectations; keep the policy in sync with the actual availability of members.
180-
- Historical, more specific policy classes (`ldes:DurationAgoPolicy`, `ldes:LatestVersionSubset`, `ldes:PointInTimePolicy`) SHOULD remain supported for backward compatibility but are discouraged in favor of `ldes:retentionPolicy` with the properties above.
180+
- Historical, more specific policy classes (`ldes:DurationAgoPolicy`, `ldes:LatestVersionSubset`, `ldes:PointInTimePolicy`) SHOULD remain supported for backward compatibility but are discouraged in favour of `ldes:retentionPolicy` with the properties above.
181181

182182
## Rebalancing the search tree ## {#rebalancing}
183183

uml.puml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
}
16+
17+
class "tree::Collection" {
18+
+ tree:member
19+
}
20+
21+
class "sh::NodeShape"
22+
23+
class "dcat::Distribution"
24+
25+
class "dcat::DataService"
26+
27+
class "tree::SearchTree"
28+
29+
class "ldes::RetentionPolicy" {
30+
+ ldes:fullLogDuration
31+
+ ldes:startingFrom : dateTime
32+
+ ldes:versionAmount
33+
+ ldes:versionDeleteDuration : duration
34+
+ ldes:versionDuration : duration
35+
}
36+
37+
class "ldes::EventStream" {
38+
+ ldes:pollingInterval : int
39+
+ ldes:sequencePath
40+
+ ldes:timestampPath
41+
+ ldes:versionOfPath
42+
+ ldes:versionSequencePath
43+
+ ldes:versionTimestampPath
44+
}
45+
46+
class "ldes::EventSource" {
47+
+ ldes:transactionFinalizedObject
48+
+ ldes:transactionFinalizedPath
49+
+ ldes:transactionPath
50+
+ ldes:versionCreateObject
51+
+ ldes:versionCreatePath
52+
+ ldes:versionDeleteObject
53+
+ ldes:versionDeletePath
54+
+ ldes:versionUpdateObject
55+
+ ldes:versionUpdatePath
56+
}
57+
58+
' ===================
59+
' Relationships
60+
' ===================
61+
62+
"tree::Node" --> "tree::SearchTree" : tree:viewDescription
63+
"tree::Node" --> "dcat::Distribution" : tree:viewDescription
64+
"tree::Node" --> "dcat::DataService" : tree:viewDescription
65+
"tree::Node" --> "ldes::RetentionPolicy" : ldes:retentionPolicy
66+
"tree::Node" --> "tree::Relation" : tree:relation
67+
"tree::Relation" --> "tree::Node" : tree:node
68+
"tree::Collection" --> "tree::Node" : tree:view
69+
"tree::Collection" --> "sh::NodeShape" : tree:shape
70+
"tree::Collection" <|-- "ldes::EventStream"
71+
"dcat::Distribution" <|-- "ldes::EventSource"
72+
"ldes::EventStream" --> "ldes::EventSource" : tree:viewDescription
73+
74+
@enduml

uml.svg

Lines changed: 1 addition & 0 deletions
Loading

vocabulary.bs

Lines changed: 8 additions & 3 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:`.
@@ -24,11 +29,11 @@ There is also a [Turtle version available](https://w3id.org/ldes.ttl).
2429
Used prefixes are:
2530

2631
```turtle
27-
@prefix ldes: <https://w3id.org/ldes#> .
28-
@prefix tree: <https://w3id.org/tree#> .
2932
@prefix dct: <http://purl.org/dc/terms/> .
33+
@prefix ldes: <https://w3id.org/ldes#> .
3034
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3135
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
36+
@prefix tree: <https://w3id.org/tree#> .
3237
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
3338
```
3439

@@ -100,7 +105,7 @@ If the node is not going to contain new relations leading to new members, or new
100105
The class `ldes:EventSource` is a subclass of `dcat:Distribution`,
101106
specialized to represent a feed that uses a chronological search tree to make a Linked Data Event Stream available in order.
102107

103-
An `ldes:EventSource` can only be published for LDESs that have `ldes:timestampPath` set, and thus publishes its entities in chronological order.
108+
An `ldes:EventSource` can only be published for `ldes:EventStream` that have `ldes:timestampPath` set, and thus publishes its entities in chronological order.
104109

105110
## ldes:retentionPolicy ## {#retentionPolicy}
106111

0 commit comments

Comments
 (0)