Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GN-5055: adjust data-model for connected snippet lists #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/funny-panthers-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"app-reglementaire-bijlage": minor
---

Extend/generalize connected snippet-list feature:
- Rename `snippet-lists` JSON:API relationship defined on `document-container` to `linked-snippet-lists`
- Add `linked-snippet-lists` JSON:API relationship to `snippet` data-model
- Remove unused `templates` JSON:API relationship of `snippet-list` data-model

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>

DELETE {
GRAPH ?g {
?documentContainer ext:hasSnippetLists ?list.
}
}
INSERT {
GRAPH ?g {
?documentContainer ext:linkedSnippetList ?list.
}
}
WHERE {
GRAPH ?g {
?documentContainer a ext:DocumentContainer.
?documentContainer ext:hasSnippetLists ?list.
}
}
11 changes: 5 additions & 6 deletions config/resources/domain.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,6 @@
"predicate": "say:hasSnippet",
"target": "snippet",
"cardinality": "many"
},
"templates": {
"predicate": "ext:hasSnippetLists",
"target": "document-container",
"cardinality": "many",
"inverse": true
}
},
"features": ["include-uri"],
Expand Down Expand Up @@ -276,6 +270,11 @@
"target": "snippet-list",
"cardinality": "one",
"inverse": true
},
"linked-snippet-lists": {
"predicate": "ext:linkedSnippetList",
"target": "snippet-list",
"cardinality": "many"
}
},
"features": ["include-uri"],
Expand Down
4 changes: 2 additions & 2 deletions config/resources/editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
"target": "editor-document",
"cardinality": "many"
},
"snippet-lists": {
"predicate": "ext:hasSnippetLists",
"linked-snippet-lists": {
"predicate": "ext:linkedSnippetList",
"target": "snippet-list",
"cardinality": "many"
}
Expand Down