diff --git a/bulk/repo-access-api.adoc b/bulk/repo-access-api.adoc index 6ea50e3..7621157 100644 --- a/bulk/repo-access-api.adoc +++ b/bulk/repo-access-api.adoc @@ -10,7 +10,7 @@ include::../shared/issue-footnotes.adoc[] :toc: preamble :toclevels: 2 -The bulk API *version 2024.1* is used to store and retrieve nodes in batches at the moment of invocation.{fn-org25} +The bulk API *version 2025.1* is used to store and retrieve nodes in batches at the moment of invocation.{fn-org25} It is intended for CRUD operations on (larger) sets of nodes. it is *not* intended as a delta-oriented API that takes "modification commands" as arguments. @@ -87,7 +87,7 @@ A repository also MAY disallow re-using previously deleted node ids. [[client-ids]] == Client ids Each <<{arch}.adoc#client, client>> MUST provide a unique _client id_ when connecting to the repository.{fn-org241} -The client id is an <<{serialization}.adoc#id, id>>-compatible string. +The client id is an <<{m3}.adoc#identifiers, identifier>>-compatible string. A client MAY connect more than once to the same repository at the same time with the same client id. It is out of scope of LionWeb to guarantee the uniqueness of the client id. The repository does not apply any uniqueness checks. @@ -181,12 +181,12 @@ We call this part of the reponse [[Response.success]]`success` flag. Besides the main response, the repository can reply each command with zero or more additional [[Response.messages]]`messages`.{fn-org236} Each message MUST have the following properties: -* [[message.kind]]`kind` is an <<{serialization}.adoc#id, id>>-compatible string identifying the message type. +* [[message.kind]]`kind` is an <<{m3}.adoc#identifiers, identifier>>-compatible string identifying the message type. Some message kinds are pre-defined in this specification. A repository MAY reply with other, additional message kinds. * [[message.message]]`message` is a human-readable string describing the message. * [[message.data]]`data` is a flat map with arbitrary keys and values. -All values MUST be strings, the keys MUST be <<{serialization}.adoc#id, id>>-compatible. +All values MUST be strings, the keys MUST be <<{m3}.adoc#identifiers, identifier>>-compatible. A _kind_ might imply presence of specific keys in `data`. [[message-kinds-global]] @@ -220,6 +220,11 @@ A _kind_ might imply presence of specific keys in `data`. [[apis]] == Commands +Each _modifying_ command MUST contain a _[[commandId, commmand id]]command id_.{fn-org313} +It has the same format as <<{m3}.adoc#identifiers, node ids>> and must be unique for all changes of this client. + +Modifying commands are <>, <>, and <>. + [[listPartitions, listPartitions]] [[partitions, listPartitions]] === listPartitions: List available partitions @@ -235,6 +240,7 @@ None. ==== Response Contains a {chunk} with all accessible <<{m3}.adoc#partition, Partitions>> in the Repository. The partitions are sent as complete nodes.{fn-org202} +Does NOT include any children or annotations of the root partition nodes. Does NOT include <<{m3}.adoc#Language, Languages>> or partition children/annotations. ==== Message kinds @@ -254,6 +260,8 @@ Nodes MUST use <>. ==== Parameters [[createPartitions.nodes]] `nodes`:: {chunk} containing all nodes we want to add as new partitions. +[[createPartitions.commandId]] +`commandId`:: <> of this command. ==== Response Does not contain a `chunk`. @@ -308,6 +316,8 @@ All (transitive) annotations and children become <>. ==== Parameters: [[deletePartitions.nodeIds]] `nodeIds`:: List of node ids to delete. +[[deletePartitions.commandId]] +`commandId`:: <> of this command. ==== Response Does not contain a chunk. @@ -417,6 +427,8 @@ We do not support different modes.{fn-org230} ==== Parameters [[store.nodes]] `nodes`:: {chunk} containing all nodes to store to the repository. +[[store.commandId]] +`commandId`:: <> of this command. ==== Semantics After completing this call, all sent nodes MUST have exactly the sent contents in the repository. diff --git a/delta/commandEventOverview/addAnnotation.adoc b/delta/commandEventOverview/addAnnotation.adoc new file mode 100644 index 0000000..a0fccbc --- /dev/null +++ b/delta/commandEventOverview/addAnnotation.adoc @@ -0,0 +1,37 @@ +| +[plantuml, addAnnotation-before, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class " " as dummy <> +class "next\nSibling" as nextSibling + +parent *--> previousSibling: <>\n[index - 1] +parent *-[hidden]-> dummy #Blue: <>\n[index] +parent *--> nextSibling: <>\n[index] +---- +| +[plantuml,addAnnotation-after,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class "newAnnotation:\nRemark" as newAnnotation #LightSkyBlue { + text:String="ok" +} +class "next\nSibling" as nextSibling + +class descendant #LightSkyBlue + +parent *--> previousSibling: <>\n[index - 1] +parent *--> newAnnotation #Blue: <>\n[index] +parent *--> nextSibling: <>\n[index + 1] + +newAnnotation *--> descendant #Blue +previousSibling <.. descendant #Blue +---- diff --git a/delta/commandEventOverview/addChild.adoc b/delta/commandEventOverview/addChild.adoc new file mode 100644 index 0000000..1768719 --- /dev/null +++ b/delta/commandEventOverview/addChild.adoc @@ -0,0 +1,37 @@ +| +[plantuml, addChild-before, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class " " as newChild<> +class "next\nSibling" as nextSibling + +parent *--> previousSibling: containment\n[index - 1] +parent *-[hidden]-> newChild #Blue: containment\n[index] +parent *--> nextSibling: containment\n[index] +---- +| +[plantuml, addChild-after, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class "newChild:Car" as newChild #LightSkyBlue { + length:Integer=19 +} +class "next\nSibling" as nextSibling + +class descendant #LightSkyBlue + +parent *--> previousSibling: containment\n[index - 1] +parent *--> newChild #Blue: containment\n[index] +parent *--> nextSibling: containment\n[index + 1] + +newChild *--> descendant #Blue +previousSibling <.. descendant #Blue +---- diff --git a/delta/commandEventOverview/addPartition.adoc b/delta/commandEventOverview/addPartition.adoc new file mode 100644 index 0000000..9113896 --- /dev/null +++ b/delta/commandEventOverview/addPartition.adoc @@ -0,0 +1,13 @@ +| +_nothing_ +| +[plantuml, addPartition, svg] +---- +!include commandEventOverviewStyle.puml + +class newPartition:Person <> #LightSkyBlue { + name: String = "John" + age: Integer = 23 + alive: Boolean = true +} +---- diff --git a/delta/commandEventOverview/addProperty.adoc b/delta/commandEventOverview/addProperty.adoc new file mode 100644 index 0000000..29aa720 --- /dev/null +++ b/delta/commandEventOverview/addProperty.adoc @@ -0,0 +1,17 @@ +| +[plantuml, addProperty-before, svg] +---- +!include commandEventOverviewStyle.puml + +class "node" +---- +| +[plantuml, addProperty-after, svg] +---- +!include commandEventOverviewStyle.puml + +class "node" { + property = newValue +} +---- + diff --git a/delta/commandEventOverview/addReference.adoc b/delta/commandEventOverview/addReference.adoc new file mode 100644 index 0000000..43191c7 --- /dev/null +++ b/delta/commandEventOverview/addReference.adoc @@ -0,0 +1,30 @@ +| +[plantuml,addReference-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nEntry" as previousEntry +class newTarget +class "next\nEntry" as nextEntry + +parent ..> previousEntry: reference\n[index - 1] +parent .[hidden].> newTarget #Blue: reference\n[index] +parent ..> nextEntry: reference\n[index] +---- +| +[plantuml,addReference-after,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nEntry" as previousEntry +class newTarget +class "next\nEntry" as nextEntry + +parent ..> previousEntry: reference\n[index - 1] +parent .[thickness=2].> newTarget #Blue: reference\n[index]\n{new\nResolveInfo} +parent ..> nextEntry: reference\n[index + 1] +---- diff --git a/delta/commandEventOverview/addReferenceResolveInfo.adoc b/delta/commandEventOverview/addReferenceResolveInfo.adoc new file mode 100644 index 0000000..2677975 --- /dev/null +++ b/delta/commandEventOverview/addReferenceResolveInfo.adoc @@ -0,0 +1,22 @@ +| +[plantuml,addReferenceResolveInfo-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class target + +parent ..> target: reference\n[index]\n{null} +---- +| +[plantuml,addReferenceResolveInfo-after,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class target + +parent ..> target: reference\n[index]\n{newResolveInfo} +---- diff --git a/delta/commandEventOverview/addReferenceTarget.adoc b/delta/commandEventOverview/addReferenceTarget.adoc new file mode 100644 index 0000000..da1e1b3 --- /dev/null +++ b/delta/commandEventOverview/addReferenceTarget.adoc @@ -0,0 +1,24 @@ +| +[plantuml,addReferenceTarget-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class " " as target<> +class newTarget + +parent ..> target: reference\n[index]\n{resolveInfo} +target -[hidden]-> newTarget +---- +| +[plantuml,addReferenceTarget-after,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class newTarget + +parent .[thickness=2].> newTarget #blue: reference\n[index]\n{resolveInfo} +---- diff --git a/delta/commandEventOverview/changeClassifier.adoc b/delta/commandEventOverview/changeClassifier.adoc new file mode 100644 index 0000000..b18a2b2 --- /dev/null +++ b/delta/commandEventOverview/changeClassifier.adoc @@ -0,0 +1,14 @@ +| +[plantuml, changeClassifier-before, svg] +---- +!include commandEventOverviewStyle.puml + +class "node:oldClassifier" +---- +| +[plantuml, changeClassifier-after, svg] +---- +!include commandEventOverviewStyle.puml + +class "node:newClassifier" +---- diff --git a/delta/commandEventOverview/changeProperty.adoc b/delta/commandEventOverview/changeProperty.adoc new file mode 100644 index 0000000..d0ecce8 --- /dev/null +++ b/delta/commandEventOverview/changeProperty.adoc @@ -0,0 +1,18 @@ +| +[plantuml, changeProperty-before, svg] +---- +!include commandEventOverviewStyle.puml + +class "node" { + property = oldValue +} +---- +| +[plantuml, changeProperty-after, svg] +---- +!include commandEventOverviewStyle.puml + +class "node" { + property = newValue +} +---- diff --git a/delta/commandEventOverview/changeReference.adoc b/delta/commandEventOverview/changeReference.adoc new file mode 100644 index 0000000..9cbc750 --- /dev/null +++ b/delta/commandEventOverview/changeReference.adoc @@ -0,0 +1,40 @@ +| +[plantuml,changeReference-before,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class "previous\nEntry" as previousEntry +class "replaced\nTarget" as replacedTarget +class "new\nTarget" as newTarget +class "next\nEntry" as nextEntry + +parent ..> previousEntry: reference\n[index - 1] +parent .[thickness=2].> replacedTarget #red: reference\n[index]\n{replaced\nResolveInfo} +parent .[hidden].> newTarget: reference\n[index]\n{new\nResolveInfo} +parent ..> nextEntry: reference\n[index + 1] + +previousEntry -[hidden]> replacedTarget +---- +| +[plantuml, changeReference-after, svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class "previous\nEntry" as previousEntry +class "replaced\nTarget" as replacedTarget +class "new\nTarget" as newTarget +class "next\nEntry" as nextEntry + +parent ..> previousEntry: reference\n[index - 1] +parent .[hidden].> replacedTarget #red: reference\n[index]\n{replaced\nResolveInfo} +parent .[thickness=2].> newTarget #blue: reference\n[index]\n{new\nResolveInfo} +parent ..> nextEntry: reference\n[index + 1] + +previousEntry -[hidden]> replacedTarget +---- diff --git a/delta/commandEventOverview/changeReferenceResolveInfo.adoc b/delta/commandEventOverview/changeReferenceResolveInfo.adoc new file mode 100644 index 0000000..4b9db76 --- /dev/null +++ b/delta/commandEventOverview/changeReferenceResolveInfo.adoc @@ -0,0 +1,22 @@ +| +[plantuml,changeReferenceResolveInfo-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class target + +parent ..> target: reference\n[index]\n{oldResolveInfo} +---- +| +[plantuml, changeReferenceResolveInfo-after, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class target + +parent ..> target: reference\n[index]\n{newResolveInfo} +---- diff --git a/delta/commandEventOverview/changeReferenceTarget.adoc b/delta/commandEventOverview/changeReferenceTarget.adoc new file mode 100644 index 0000000..de5d402 --- /dev/null +++ b/delta/commandEventOverview/changeReferenceTarget.adoc @@ -0,0 +1,26 @@ +| +[plantuml,changeReferenceTarget-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class oldTarget +class newTarget + +parent .[thickness=2].> oldTarget #red: reference\n[index]\n{resolveInfo} +parent .[hidden].> newTarget +---- +| +[plantuml,changeReferenceTarget-after,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class oldTarget +class newTarget + +parent .[hidden].> oldTarget +parent .[thickness=2].> newTarget #blue: reference\n[index]\n{resolveInfo} +---- diff --git a/delta/commandEventOverview/command-event-overview.adoc b/delta/commandEventOverview/command-event-overview.adoc new file mode 100644 index 0000000..e2cf565 --- /dev/null +++ b/delta/commandEventOverview/command-event-overview.adoc @@ -0,0 +1,356 @@ +[[command-event-overview]] +=== Command -- event pairs overview +include::legend.adoc[] + +==== Partitions +[cols="30a,35a,35a"] +|=== +|Command / Event / Description |Before |After + +| +<> + +<> + +Add `newPartition` node as new partition. +include::addPartition.adoc[] + +| +<> + +<> + +Delete partition `deletedPartition`. +include::deletePartition.adoc[] +|=== + +==== Nodes +[cols="30a,35a,35a"] +|=== +|Command / Event / Description |Before |After + +| +<> + +<> + +Change classifier of `node` from `oldClassifier` to `newClassifier`. +include::changeClassifier.adoc[] +|=== + +==== Properties +[cols="30a,35a,35a"] +|=== +|Command / Event / Description |Before |After + +| +<> + +<> + +Add `newValue` as value of property `property` to `node`. +include::addProperty.adoc[] + +| +<> + +<> + +Delete existing `property` with `oldValue` from `node`. +include::deleteProperty.adoc[] + +| +<> + +<> + +Change existing `property` of `node` from `oldValue` to `newValue`. +include::changeProperty.adoc[] +|=== + +==== Children +[cols="30a,35a,35a"] +|=== +|Command / Event / Description |Before |After + +| +<> + +<> + +Add new node `newChild` to `parent` in `containment` at `index`. +include::addChild.adoc[] + +| +<> + +<> + +Delete existing node `deletedChild` from ``parent``'s `containment` at `index`. +include::deleteChild.adoc[] + +| +<> + +<> + +Replace existing node `replacedChild` inside ``parent``'s `containment` at `index` with new node `newChild`. +Delete `replacedChild`. +include::replaceChild.adoc[] + +| +<> + +<> + +Move existing node `movedChild` (currently inside ``oldParent``'s `oldContainment` at `oldIndex`) +inside ``newParent``'s `newContainment` at `newIndex`. +include::moveChildFromOtherContainment.adoc[] +| + +<> + +<> + +Move existing node `movedChild` (currently inside ``parent``'s `oldContainment` at `oldIndex`) +inside ``parent``'s `newContainment` at `newIndex`. +include::moveChildFromOtherContainmentInSameParent.adoc[] + +| +<> + +<> + +Move existing node `movedChild` (currently inside ``parent``'s `containment` at `oldIndex`) +inside ``parent``'s `containment` at `newIndex`. +include::moveChildInSameContainment.adoc[] + +| +<> + +<> + +Move existing node `movedChild` (currently inside ``oldParent``'s `oldContainment` at `oldIndex`) +inside ``newParent``'s `newContainment` at `newIndex`, replacing `replacedChild` that was previously inside ``newParent``'s `newContainment` at `newIndex`. +include::moveAndReplaceChildFromOtherContainment.adoc[] +| + +<> + +<> + +Move existing node `movedChild` (currently inside ``parent``'s `oldContainment` at `oldIndex`) +inside ``parent``'s `newContainment` at `newIndex`, replacing `replacedChild` that was previously inside ``parent``'s `newContainment` at `newIndex`. +include::moveAndReplaceChildFromOtherContainmentInSameParent.adoc[] + +| +<> + +<> + +Move existing node `movedChild` (currently inside ``parent``'s `containment` at `oldIndex`) +inside ``parent``'s `containment` at `newIndex`, replacing `replacedChild` that was previously inside ``parent``'s `containment` at `newIndex`. +include::moveAndReplaceChildInSameContainment.adoc[] + +|=== + +==== Annotations +[cols="30a,35a,35a"] +|=== +|Command / Event / Description |Before |After + +| +<> + +<> + +Add new node `newAnnotation` to ``parent``'s annotations at `index`. +include::addAnnotation.adoc[] + +| +<> + +<> + +Delete existing node `deletedAnnotation` from ``parent``'s annotations at `index`. +include::deleteAnnotation.adoc[] + +| +<> + +<> + +Replace existing node `replacedAnnotation` inside ``parent``'s annotations at `index` with new node `newAnnotation`. +Delete `replacedAnnotation`. +include::replaceAnnotation.adoc[] + +| +<> + +<> + +Move existing node `movedAnnotation` (currently inside ``oldParent``'s annotations at `oldIndex`) +inside ``newParent``'s annotations at `newIndex`. +include::moveAnnotationFromOtherParent.adoc[] + +| +<> + +<> + +Move existing node `movedAnnotation` (currently inside ``parent``'s annotations at `oldIndex`) +inside ``parent``'s annotations at `newIndex`. +include::moveAnnotationInSameParent.adoc[] + +| +<> + +<> + +Move existing node `movedAnnotation` (currently inside ``oldParent``'s annotations at `oldIndex`) +inside ``newParent``'s annotations at `newIndex`, replacing `replacedAnnotation` that was previously inside ``newParent``'s annotations at `newIndex`. +include::moveAndReplaceAnnotationFromOtherParent.adoc[] + +| +<> + +<> + +Move existing node `movedAnnotation` (currently inside ``parent``'s annotations at `oldIndex`) +inside ``parent``'s annotations at `newIndex`, replacing `replacedAnnotation` that was previously inside ``parent``'s annotations at `newIndex`. +include::moveAndReplaceAnnotationInSameParent.adoc[] + +|=== + +==== References +[cols="30a,35a,35a"] +|=== +|Command / Event / Description |Before |After + +| +<> + +<> + +Add `newTarget` / `newResolveInfo` to ``parent``'s `reference` at `index`. +include::addReference.adoc[] + +| +<> + +<> + +Delete existing `deletedTarget`/`deletedResolveInfo` from ``parent``'s `reference` at `index`. +include::deleteReference.adoc[] + +| +<> + +<> + +Replace existing `replacedTarget`/`replacedResolveInfo` inside ``parent``'s `reference` at `index` with `newTarget`/`newResolveInfo`. +include::changeReference.adoc[] + +| +<> + +<> + +Move existing `target`/`resolveInfo` (currently inside ``oldParent``'s `oldReference` at `oldIndex`) +to ``newParent``'s `newReference` at `newIndex`. +include::moveEntryFromOtherReference.adoc[] + +| +<> + +<> + +Move existing `movedTarget`/`movedResolveInfo` (currently inside ``parent``'s `oldReference` at `oldIndex`) +to ``parent``'s `newReference` at `newIndex`. +include::moveEntryFromOtherReferenceInSameParent.adoc[] + +| +<> + +<> + +Move existing `movedTarget`/`movedResolveInfo` (currently inside ``parent``'s `reference` at `oldIndex`) +inside ``parent``'s `reference` at `newIndex`. +include::moveEntryInSameReference.adoc[] + +| +<> + +<> + +Move existing `movedTarget`/`movedResolveInfo` (currently inside ``oldParent``'s `oldReference` at `oldIndex`) +to ``newParent``'s `newReference` at `newIndex`, replacing `replacedTarget`/`replacedResolveInfo` that was previously inside ``newParent``'s `newReference` at `newIndex`. +include::moveAndReplaceEntryFromOtherReference.adoc[] + +| +<> + +<> + +Move existing `movedTarget`/`movedResolveInfo` (currently inside ``parent``'s `oldReference` at `oldIndex`) +to ``parent``'s `newReference` at `newIndex`, replacing `replacedTarget`/`replacedResolveInfo` that was previously inside ``parent``'s `newReference` at `newIndex`. +include::moveAndReplaceEntryFromOtherReferenceInSameParent.adoc[] + +| +<> + +<> + +Move existing `movedTarget`/`movedResolveInfo` (currently inside ``parent``'s `reference` at `oldIndex`) +inside ``parent``'s `reference` at `newIndex`, replacing `replacedTarget`/`replacedResolveInfo` that was previously inside ``parent``'s `reference` at `newIndex`. +include::moveAndReplaceEntryInSameReference.adoc[] + +| +<> + +<> + +Add `newResolveInfo` as ResolveInfo to existing entry inside ``parent``'s `reference` at `index` with `target`. +include::addReferenceResolveInfo.adoc[] + +| +<> + +<> + +Delete existing `deletedResolveInfo` as ResolveInfo from existing entry inside ``parent``'s `reference` at `index` with `target`. +include::deleteReferenceResolveInfo.adoc[] + +| +<> + +<> + +Change ResolveInfo of existing entry inside ``parent``'s `reference` at `index` from `oldResolveInfo` to `newResolveInfo`. +include::changeReferenceResolveInfo.adoc[] + +| +<> + +<> + +Add `newTarget` as target to existing entry inside ``parent``'s `reference` at `index` with `resolveInfo`. +include::addReferenceTarget.adoc[] + +| +<> + +<> + +Delete existing `deletedTarget` as target from existing entry inside ``parent``'s `reference` at `index` with `resolveInfo`. +include::deleteReferenceTarget.adoc[] + +| +<> + +<> + +Change target of existing entry inside ``parent``'s `reference` at `index` with `resolveInfo` from `oldTarget` to `newTarget`. +include::changeReferenceTarget.adoc[] + +|=== \ No newline at end of file diff --git a/delta/commandEventOverview/commandEventOverviewStyle.puml b/delta/commandEventOverview/commandEventOverviewStyle.puml new file mode 100644 index 0000000..f5980ca --- /dev/null +++ b/delta/commandEventOverview/commandEventOverviewStyle.puml @@ -0,0 +1,17 @@ +@startuml +hide empty members +hide circles + +skinparam class<> { + borderColor Transparent + backgroundColor Transparent + stereotypeFontColor Transparent +} + +skinparam package<> { + borderColor Transparent + backgroundColor Transparent + fontColor Transparent + stereotypeFontColor Transparent +} +@enduml \ No newline at end of file diff --git a/delta/commandEventOverview/deleteAnnotation.adoc b/delta/commandEventOverview/deleteAnnotation.adoc new file mode 100644 index 0000000..c8f7a5f --- /dev/null +++ b/delta/commandEventOverview/deleteAnnotation.adoc @@ -0,0 +1,34 @@ +| +[plantuml,deleteAnnotation-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class "deleted\nAnnotation" as deletedAnnotation #red +class "next\nSibling" as nextSibling + +class descendant #red + +parent *--> previousSibling: <>\n[index - 1] +parent *--> deletedAnnotation #red: <>\n[index] +parent *--> nextSibling: <>\n[index + 1] + +deletedAnnotation *--> descendant #red +---- +| +[plantuml, deleteAnnotation-after, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class " " as dummy <> +class "next\nSibling" as nextSibling + +parent *--> previousSibling: <>\n[index - 1] +parent *-[hidden]-> dummy #red: <>\n[index] +parent *--> nextSibling: <>\n[index] +---- diff --git a/delta/commandEventOverview/deleteChild.adoc b/delta/commandEventOverview/deleteChild.adoc new file mode 100644 index 0000000..358de3f --- /dev/null +++ b/delta/commandEventOverview/deleteChild.adoc @@ -0,0 +1,34 @@ +| +[plantuml, deleteChild-before, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class "deleted\nChild" as deletedChild #red +class "next\nSibling" as nextSibling + +class descendant #red + +parent *--> previousSibling: containment\n[index - 1] +parent *--> deletedChild #red: containment\n[index] +parent *--> nextSibling: containment\n[index + 1] + +deletedChild *--> descendant #red +---- +| +[plantuml, deleteChild-after, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class " " as deletedChild <> +class "next\nSibling" as nextSibling + +parent *--> previousSibling: containment\n[index - 1] +parent *-[hidden]-> deletedChild #red: containment\n[index] +parent *--> nextSibling: containment\n[index] +---- diff --git a/delta/commandEventOverview/deletePartition.adoc b/delta/commandEventOverview/deletePartition.adoc new file mode 100644 index 0000000..e0d2f34 --- /dev/null +++ b/delta/commandEventOverview/deletePartition.adoc @@ -0,0 +1,16 @@ +| +[plantuml, deletePartition, svg] +---- +!include commandEventOverviewStyle.puml + +class deletedPartition <> #red + +class firstLevelChild #red + +class secondLevelChild #red + +deletedPartition *--> firstLevelChild #red +firstLevelChild *--> secondLevelChild #red +---- +| +_nothing_ diff --git a/delta/commandEventOverview/deleteProperty.adoc b/delta/commandEventOverview/deleteProperty.adoc new file mode 100644 index 0000000..61e386e --- /dev/null +++ b/delta/commandEventOverview/deleteProperty.adoc @@ -0,0 +1,16 @@ +| +[plantuml, deleteProperty-before, svg] +---- +!include commandEventOverviewStyle.puml + +class "node" { + property = oldValue +} +---- +| +[plantuml, deleteProperty-after, svg] +---- +!include commandEventOverviewStyle.puml + +class "node" +---- diff --git a/delta/commandEventOverview/deleteReference.adoc b/delta/commandEventOverview/deleteReference.adoc new file mode 100644 index 0000000..d2045b3 --- /dev/null +++ b/delta/commandEventOverview/deleteReference.adoc @@ -0,0 +1,30 @@ +| +[plantuml,deleteReference-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nEntry" as previousEntry +class "deleted\nTarget" as deletedTarget +class "next\nEntry" as nextEntry + +parent ..> previousEntry: reference\n[index - 1] +parent .[thickness=2].> deletedTarget #red: reference\n[index]\n{deleted\nResolveInfo} +parent ..> nextEntry: reference\n[index + 1] +---- +| +[plantuml, deleteReference-after, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nEntry" as previousEntry +class "deleted\nTarget" as deletedTarget +class "next\nEntry" as nextEntry + +parent ..> previousEntry: reference\n[index - 1] +parent .[hidden].> deletedTarget #red: reference\n[index]\n{deleted\nResolveInfo} +parent ..> nextEntry: reference\n[index + 1] +---- diff --git a/delta/commandEventOverview/deleteReferenceResolveInfo.adoc b/delta/commandEventOverview/deleteReferenceResolveInfo.adoc new file mode 100644 index 0000000..f7ca3c3 --- /dev/null +++ b/delta/commandEventOverview/deleteReferenceResolveInfo.adoc @@ -0,0 +1,22 @@ +| +[plantuml,deleteReferenceResolveInfo-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class target + +parent ..> target: reference\n[index]\n{deletedResolveInfo} +---- +| +[plantuml, deleteReferenceResolveInfo-after, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class target + +parent ..> target: reference\n[index]\n{null} +---- diff --git a/delta/commandEventOverview/deleteReferenceTarget.adoc b/delta/commandEventOverview/deleteReferenceTarget.adoc new file mode 100644 index 0000000..f0fc739 --- /dev/null +++ b/delta/commandEventOverview/deleteReferenceTarget.adoc @@ -0,0 +1,24 @@ +| +[plantuml,deleteReferenceTarget-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class deletedTarget + +parent .[thickness=2].> deletedTarget #red: reference\n[index]\n{resolveInfo} +---- +| +[plantuml,deleteReferenceTarget-after,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class " " as target<> +class deletedTarget + +parent ..> target: reference\n[index]\n{resolveInfo} +target -[hidden]-> deletedTarget +---- diff --git a/delta/commandEventOverview/legend.adoc b/delta/commandEventOverview/legend.adoc new file mode 100644 index 0000000..1525cd5 --- /dev/null +++ b/delta/commandEventOverview/legend.adoc @@ -0,0 +1,102 @@ +.Diagram legend +[plantuml,legend,svg] +---- +hide empty members +hide circles + +skinparam legendBackgroundColor #transparent +skinparam legendBorderColor #transparent +skinparam legendEntrySeparator #transparent + +skinparam class<> { + borderColor Transparent + backgroundColor Transparent + stereotypeFontColor Transparent +} + +legend top + Colors + |<#LightSkyBlue> | added| + |<#red>| deleted | + |<#Orange>| moved| +endlegend + +class ExistingNodeId +note right of ExistingNodeId + Existing node with node id "ExistingNodeId". +end note + +class "NodeId:Concept" as NodeId +note right of NodeId + Existing node with node id "NodeId" and classifier "Concept". +end note + +class "NewNodeId:Concept" as NewNodeId { + Property : Type = Value +} +note right of NewNodeId + New node with node id "NewNodeId", classifier "Concept", + and one property "Property" of type "Type" with value "Value". +end note + +class "NodeId" as PropertyNode { + Property = Value +} +note right of PropertyNode + Existing node with node id "NewNodeId" has + one property "Property" with value "Value". +end note + +class ContainmentParent +class ContainmentChild +ContainmentParent *--> ContainmentChild: Containment [Index] +note right on link + Existing node with node id "ContainmentParent" has + existing node with node id "ContainmentChild" + as child in containment "Containment" at position "Index". +end note + +class AnnotatedNode +class AnnotationInstance +AnnotatedNode *--> AnnotationInstance: <> [Index] +note right on link + Existing node with node id "AnnotatedNode" has + existing node with node id "AnnotationInstance" + as annotation at position "Index". +end note + +class ReferenceSource +class ReferenceTarget +ReferenceSource ..> ReferenceTarget: Reference [Index] {ResolveInfo} +note right on link + Existing node with node id "ReferenceSource" has reference "Reference" + at position "Index" with target node id "ReferenceTarget" and resolve info "ResolveInfo". + Node with node id "ReferenceTarget" might or might not exist. +end note + +class UnsetTargetSource +class " " as HiddenTarget<> +UnsetTargetSource ..> HiddenTarget: Reference [Index] {ResolveInfo} +note right on link + Existing node with node id "UnsetTargetSource" has reference "Reference" + at position "Index" without target node id and resolve info "ResolveInfo". +end note + +class UnsetResolveInfoSource +class UnsetResolveInfoTarget +UnsetResolveInfoSource ..> UnsetResolveInfoTarget: Reference [Index] {null} +note right on link + Existing node with node id "UnsetResolveInfoSource" has reference "Reference" + at position "Index" with target node id "UnsetResolveInfoTarget" and no resolve info. + Node with node id "UnsetResolveInfoTarget" might or might not exist. +end note + +ExistingNodeId -[hidden]down-> NodeId +NodeId -[hidden]down-> NewNodeId +NewNodeId -[hidden]down-> PropertyNode +PropertyNode -[hidden]down-> ContainmentParent +ContainmentChild -[hidden]down-> AnnotatedNode +AnnotationInstance -[hidden]down-> ReferenceSource +ReferenceTarget -[hidden]down-> UnsetTargetSource +HiddenTarget -[hidden]down-> UnsetResolveInfoSource +---- diff --git a/delta/commandEventOverview/moveAndReplaceAnnotationFromOtherParent.adoc b/delta/commandEventOverview/moveAndReplaceAnnotationFromOtherParent.adoc new file mode 100644 index 0000000..ed771bb --- /dev/null +++ b/delta/commandEventOverview/moveAndReplaceAnnotationFromOtherParent.adoc @@ -0,0 +1,66 @@ +| +[plantuml,moveAndReplaceAnnotationFromOtherParent-before,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent + +class "old\nPrevious\nSibling" as oldPreviousSibling +class "moved\nAnnotation" as movedAnnotation #Orange +class "old\nNext\nSibling" as oldNextSibling + +class descendant #Orange + +oldParent *--> oldPreviousSibling: <>\n[oldIndex - 1] +oldParent *--> movedAnnotation #red: <>\n[oldIndex] +oldParent *--> oldNextSibling: <>\n[oldIndex + 1] + +movedAnnotation *--> descendant + +descendant -[hidden]- newParent + +class newParent + +class "new\nPrevious\nSibling" as newPreviousSibling +class "replaced\nAnnotation" as replacedAnnotation #red +class "new\nNext\nSibling" as newNextSibling + +class "replaced\nDescendant" as replacedDescendant #red +replacedAnnotation *--> replacedDescendant #Red + +newParent *--> newPreviousSibling: <>\n[newIndex - 1] +newParent *--> replacedAnnotation #red: <>\n[newIndex] +newParent *--> newNextSibling: <>\n[newIndex + 1] +---- +| +[plantuml,moveAndReplaceAnnotationFromOtherParent-after,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent + +class "old\nPrevious\nSibling" as oldPreviousSibling +class " " as dummy <> +class "old\nNext\nSibling" as oldNextSibling + +oldParent *--> oldPreviousSibling: <>\n[oldIndex - 1] +oldParent *-[hidden]-> dummy #red: <>\n[oldIndex] +oldParent *--> oldNextSibling: <>\n[oldIndex] + +oldPreviousSibling -[hidden]- newParent +oldNextSibling -[hidden]- newParent + +class newParent + +class "new\nPrevious\nSibling" as newPreviousSibling +class "moved\nAnnotation" as movedAnnotation #Orange +class "new\nNext\nSibling" as newNextSibling + +class descendant #Orange + +newParent *--> newPreviousSibling: <>\n[newIndex - 1] +newParent *--> movedAnnotation #Blue: <>\n[newIndex] +newParent *--> newNextSibling: <>\n[newIndex + 1] + +movedAnnotation *--> descendant +---- diff --git a/delta/commandEventOverview/moveAndReplaceAnnotationInSameParent.adoc b/delta/commandEventOverview/moveAndReplaceAnnotationInSameParent.adoc new file mode 100644 index 0000000..2c07fea --- /dev/null +++ b/delta/commandEventOverview/moveAndReplaceAnnotationInSameParent.adoc @@ -0,0 +1,57 @@ +| + +[plantuml,moveAndReplaceAnnotationInSameParent-before,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class siblingA +class "moved\nAnnotation" as movedAnnotation #Orange +class siblingB +class siblingC + +class descendant #Orange + +class replacedAnnotation #Red + +class "replaced\nDescendant" as replacedDescendant #red +replacedAnnotation *-> replacedDescendant #Red + +parent *--> siblingA: <>\n[oldIndex - 1] +parent *--> movedAnnotation: <>\n[oldIndex] +parent *--> siblingB: <>\n[oldIndex + 1] +parent *--> replacedAnnotation #Red: containment\n[newIndex] +parent *--> siblingC: <>\n[newIndex + 1] + +movedAnnotation *-> descendant + +siblingA -[hidden]> movedAnnotation +siblingB -[hidden]> replacedAnnotation +---- +| +[plantuml,moveAndReplaceAnnotationInSameParent-after,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class siblingA +class "moved\nAnnotation" as movedAnnotation #Orange +class siblingB +class siblingC + +class descendant #Orange + +parent *--> siblingA: <>\n[oldIndex - 1] +parent *--> siblingB: <>\n[oldIndex] +parent *--> movedAnnotation: <>\n[newIndex] +parent *--> siblingC: <>\n[newIndex + 1] + +movedAnnotation *-> descendant + +siblingA -[hidden]> siblingB +siblingB -[hidden]> movedAnnotation +---- diff --git a/delta/commandEventOverview/moveAndReplaceChildFromOtherContainment.adoc b/delta/commandEventOverview/moveAndReplaceChildFromOtherContainment.adoc new file mode 100644 index 0000000..555ef7b --- /dev/null +++ b/delta/commandEventOverview/moveAndReplaceChildFromOtherContainment.adoc @@ -0,0 +1,66 @@ +| +[plantuml,moveAndReplaceChildFromOtherContainment-before,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent + +class "old\nPrevious\nSibling" as oldPreviousSibling +class "moved\nChild" as movedChild #Orange +class "old\nNext\nSibling" as oldNextSibling + +class descendant #Orange + +oldParent *--> oldPreviousSibling: old\nContainment\n[oldIndex - 1] +oldParent *--> movedChild #red: old\nContainment\n[oldIndex] +oldParent *--> oldNextSibling: old\nContainment\n[oldIndex + 1] + +movedChild *--> descendant + +descendant -[hidden]- newParent + +class newParent + +class "new\nPrevious\nSibling" as newPreviousSibling +class "replaced\nChild" as replacedChild #Red +class "new\nNext\nSibling" as newNextSibling + +class "replaced\nDescendant" as replacedDescendant #red +replacedChild *--> replacedDescendant #Red + +newParent *--> newPreviousSibling: new\nContainment\n[newIndex - 1] +newParent *--> replacedChild #Red: new\nContainment\n[newIndex] +newParent *--> newNextSibling: new\nContainment\n[newIndex + 1] +---- +| +[plantuml, moveAndReplaceChildFromOtherContainment-after, svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent + +class "old\nPrevious\nSibling" as oldPreviousSibling +class " " as dummy <> +class "old\nNext\nSibling" as oldNextSibling + +oldParent *--> oldPreviousSibling: old\nContainment\n[oldIndex - 1] +oldParent *-[hidden]-> dummy #red: old\nContainment\n[oldIndex] +oldParent *--> oldNextSibling: old\nContainment\n[oldIndex] + +oldPreviousSibling -[hidden]- newParent +oldNextSibling -[hidden]- newParent + +class newParent + +class "new\nPrevious\nSibling" as newPreviousSibling +class "moved\nChild" as movedChild #Orange +class "new\nNext\nSibling" as newNextSibling + +class descendant #Orange + +newParent *--> newPreviousSibling: new\nContainment\n[newIndex - 1] +newParent *--> movedChild #Blue: new\nContainment\n[newIndex] +newParent *--> newNextSibling: new\nContainment\n[newIndex + 1] + +movedChild *--> descendant +---- diff --git a/delta/commandEventOverview/moveAndReplaceChildFromOtherContainmentInSameParent.adoc b/delta/commandEventOverview/moveAndReplaceChildFromOtherContainmentInSameParent.adoc new file mode 100644 index 0000000..9745601 --- /dev/null +++ b/delta/commandEventOverview/moveAndReplaceChildFromOtherContainmentInSameParent.adoc @@ -0,0 +1,56 @@ +| +[plantuml,moveAndReplaceChildFromOtherContainmentInSameParent-before,svg] +---- +!include commandEventOverviewStyle.puml + +class "old\nPrevious\nSibling" as oldPreviousSibling +class descendant #Orange +class "moved\nChild" as movedChild #Orange +class "old\nNext\nSibling" as oldNextSibling + +class parent + +descendant <--* movedChild + +oldPreviousSibling <--* parent: old\nContainment\n[oldIndex - 1] +movedChild <--* parent #red: old\nContainment\n[oldIndex] +oldNextSibling <--* parent: old\nContainment\n[oldIndex + 1] + +class "new\nPrevious\nSibling" as newPreviousSibling +class "replaced\nchild" as replacedChild #Red +class "new\nNext\nSibling" as newNextSibling + +class "replaced\nDescendant" as replacedDescendant #red +replacedChild *--> replacedDescendant #Red + +parent *--> newPreviousSibling: new\nContainment\n[newIndex - 1] +parent *--> replacedChild #Red: new\nContainment\n[newIndex] +parent *--> newNextSibling: new\nContainment\n[newIndex + 1] +---- +| +[plantuml, moveAndReplaceChildFromOtherContainmentInSameParent-after, svg] +---- +!include commandEventOverviewStyle.puml + +class "old\nPrevious\nSibling" as oldPreviousSibling +class " " as dummy <> +class "old\nNext\nSibling" as oldNextSibling + +class parent + +oldPreviousSibling <--* parent: old\nContainment\n[oldIndex - 1] +dummy <-[hidden]-* parent #red: old\nContainment\n[oldIndex] +oldNextSibling <--* parent: old\nContainment\n[oldIndex] + +class "new\nPrevious\nSibling" as newPreviousSibling +class "moved\nChild" as movedChild #Orange +class "new\nNext\nSibling" as newNextSibling + +class descendant #Orange + +parent *--> newPreviousSibling: new\nContainment\n[newIndex - 1] +parent *--> movedChild #Blue: new\nContainment\n[newIndex] +parent *--> newNextSibling: new\nContainment\n[newIndex + 1] + +movedChild *--> descendant +---- diff --git a/delta/commandEventOverview/moveAndReplaceChildInSameContainment.adoc b/delta/commandEventOverview/moveAndReplaceChildInSameContainment.adoc new file mode 100644 index 0000000..c46719d --- /dev/null +++ b/delta/commandEventOverview/moveAndReplaceChildInSameContainment.adoc @@ -0,0 +1,56 @@ +| +[plantuml,moveAndReplaceChildInSameContainment-before,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class siblingA +class movedChild #Orange +class siblingB +class siblingC + +class descendant #Orange + +class replacedChild #Red + +class "replaced\nDescendant" as replacedDescendant #red +replacedChild *-> replacedDescendant #Red + +parent *--> siblingA: containment\n[oldIndex - 1] +parent *--> movedChild: containment\n[oldIndex] +parent *--> siblingB: containment\n[oldIndex + 1] +parent *--> replacedChild #Red: containment\n[newIndex] +parent *--> siblingC: containment\n[newIndex + 1] + +movedChild *-> descendant + +siblingA -[hidden]> movedChild +siblingB -[hidden]> replacedChild +---- +| +[plantuml, moveAndReplaceChildInSameContainment-after, svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class siblingA +class movedChild #Orange +class siblingB +class siblingC + +class descendant #Orange + +parent *--> siblingA: containment\n[oldIndex - 1] +parent *--> siblingB: containment\n[oldIndex] +parent *--> movedChild: containment\n[newIndex] +parent *--> siblingC: containment\n[newIndex + 1] + +movedChild *-> descendant + +siblingA -[hidden]> siblingB +siblingB -[hidden]> movedChild +---- diff --git a/delta/commandEventOverview/moveAndReplaceEntryFromOtherReference.adoc b/delta/commandEventOverview/moveAndReplaceEntryFromOtherReference.adoc new file mode 100644 index 0000000..ac25b79 --- /dev/null +++ b/delta/commandEventOverview/moveAndReplaceEntryFromOtherReference.adoc @@ -0,0 +1,63 @@ +| +[plantuml,moveAndReplaceEntryFromOtherReference-before,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent +class "old\nPrevious\nEntry" as oldPreviousEntry +class "old\nNext\nEntry" as oldNextEntry + +class "moved\nTarget" as target #Orange +class "replaced\nTarget" as replaced + +oldParent ..> oldPreviousEntry: old\nReference\n[oldIndex - 1] +oldParent .[thickness=2].> target #red: old\nReference\n[oldIndex]\n{movedResolveInfo} +oldParent ..> oldNextEntry: old\nReference\n[oldIndex + 1] + +class newParent +class "new\nPrevious\nEntry" as newPreviousEntry +class "new\nNext\nEntry" as newNextEntry + +oldPreviousEntry -[hidden]-> newPreviousEntry +oldNextEntry -[hidden]-> newNextEntry + +newPreviousEntry <.. newParent: new\nReference\n[newIndex - 1] +replaced <.. newParent #red: new\nReference\n[newIndex]\n{replacedResolveInfo} +newNextEntry <.. newParent: new\nReference\n[newIndex + 1] + +target -[hidden]-> replaced +oldPreviousEntry -[hidden]> target +newPreviousEntry -[hidden]> replaced +---- +| + +[plantuml,moveAndReplaceEntryFromOtherReference-after,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent +class "old\nPrevious\nEntry" as oldPreviousEntry +class "old\nNext\nEntry" as oldNextEntry + +class "moved\nTarget" as target #Orange +class "replaced\nTarget" as replaced + +oldParent ..> oldPreviousEntry: old\nReference\n[oldIndex - 1] +oldParent .[hidden].> target #red: old\nReference\n[oldIndex]\n{resolveInfo} +oldParent ..> oldNextEntry: old\nReference\n[oldIndex] + +class newParent +class "new\nPrevious\nEntry" as newPreviousEntry +class "new\nNext\nEntry" as newNextEntry + +oldPreviousEntry -[hidden]-> newPreviousEntry +oldNextEntry -[hidden]-> newNextEntry + +newPreviousEntry <.. newParent: new\nReference\n[newIndex - 1] +target <.[thickness=2]. newParent #blue: new\nReference\n[newIndex]\n{movedResolveInfo} +newNextEntry <.. newParent: new\nReference\n[newIndex + 1] + +target -[hidden]-> replaced +oldPreviousEntry -[hidden]> target +newPreviousEntry -[hidden]> replaced +---- diff --git a/delta/commandEventOverview/moveAndReplaceEntryFromOtherReferenceInSameParent.adoc b/delta/commandEventOverview/moveAndReplaceEntryFromOtherReferenceInSameParent.adoc new file mode 100644 index 0000000..3af7cc9 --- /dev/null +++ b/delta/commandEventOverview/moveAndReplaceEntryFromOtherReferenceInSameParent.adoc @@ -0,0 +1,66 @@ +| +[plantuml,moveAndReplaceEntryFromOtherReferenceInSameParent-before,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent +class "old\nPrevious\nEntry" as oldPreviousEntry +class "old\nNext\nEntry" as oldNextEntry + +class "moved\nTarget" as target #Orange +class "replaced\nTarget" as replaced + +parent ..> oldPreviousEntry: old\nReference\n[oldIndex - 1] + +parent .[thickness=2].> target #red: old\nReference\n[oldIndex]\n{movedResolveInfo} +parent ..> oldNextEntry: old\nReference\n[oldIndex + 1] + +oldPreviousEntry -[hidden]right-> target +target -[hidden]right> oldNextEntry + +class "new\nPrevious\nEntry" as newPreviousEntry +class "new\nNext\nEntry" as newNextEntry + +oldNextEntry -[hidden]-> newPreviousEntry + +newPreviousEntry -[hidden]> replaced +replaced -[hidden]> newNextEntry + +parent ..> newPreviousEntry: new\nReference\n[newIndex - 1] +parent .[thickness=2].> replaced #red: new\nReference\n[newIndex]\n{replacedResolveInfo} +parent ..> newNextEntry: new\nReference\n[newIndex + 1] +---- +| +[plantuml, moveAndReplaceEntryFromOtherReferenceInSameParent-after, svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent +class "old\nPrevious\nEntry" as oldPreviousEntry +class "old\nNext\nEntry" as oldNextEntry + +class " " as dummy <> +class "moved\nTarget" as target #Orange +class "replaced\nTarget" as replaced + +parent ..> oldPreviousEntry: old\nReference\n[oldIndex - 1] +parent ..> oldNextEntry: old\nReference\n[oldIndex] + +oldPreviousEntry -[hidden]right-> dummy +dummy -[hidden]right> oldNextEntry + +class "new\nPrevious\nEntry" as newPreviousEntry +class "new\nNext\nEntry" as newNextEntry + +oldNextEntry -[hidden]-> newPreviousEntry + +newPreviousEntry -[hidden]> target +target -[hidden]> newNextEntry +target -[hidden]-> replaced + +parent ..> newPreviousEntry: new\nReference\n[newIndex - 1] +parent .[thickness=2].> target #blue: new\nReference\n[newIndex]\n{movedResolveInfo} +parent ..> newNextEntry: new\nReference\n[newIndex + 1] +---- diff --git a/delta/commandEventOverview/moveAndReplaceEntryInSameReference.adoc b/delta/commandEventOverview/moveAndReplaceEntryInSameReference.adoc new file mode 100644 index 0000000..4fc1d74 --- /dev/null +++ b/delta/commandEventOverview/moveAndReplaceEntryInSameReference.adoc @@ -0,0 +1,48 @@ +| +[plantuml,moveAndReplaceEntryInSameReference-before,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class "sibling\nEntryA" as siblingA +class "sibling\nEntryB" as siblingB +class "sibling\nEntryC" as siblingC + +class "moved\nTarget" as target #Orange +class "replaced\nTarget" as replaced + +parent ..> siblingA: reference\n[oldIndex - 1] +parent ..> target: reference\n[oldIndex]\n{movedResolveInfo} +parent ..> siblingB: reference\n[oldIndex + 1] +parent ..> replaced #red: reference\n[newIndex]\n{replacedResolveInfo} +parent ..> siblingC: reference\n[newIndex + 1] + +siblingA -[hidden]> target +siblingB -[hidden]> replaced +---- +| +[plantuml, moveAndReplaceEntryInSameReference-after, svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class "sibling\nEntryA" as siblingA +class "sibling\nEntryB" as siblingB +class "sibling\nEntryC" as siblingC + +class "moved\nTarget" as target #Orange +class "replaced\nTarget" as replaced + +parent *--> siblingA: reference\n[oldIndex - 1] +parent *--> siblingB: reference\n[oldIndex] +parent *--> target: reference\n[newIndex]\n{movedResolveInfo} +parent *--> siblingC: reference\n[newIndex + 1] + +siblingA -[hidden]> siblingB +siblingB -[hidden]> target +target -[hidden]-> replaced +---- diff --git a/delta/commandEventOverview/moveAnnotationFromOtherParent.adoc b/delta/commandEventOverview/moveAnnotationFromOtherParent.adoc new file mode 100644 index 0000000..59da62c --- /dev/null +++ b/delta/commandEventOverview/moveAnnotationFromOtherParent.adoc @@ -0,0 +1,63 @@ +| +[plantuml,moveAnnotationFromOtherParent-before,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent + +class "old\nPrevious\nSibling" as oldPreviousSibling +class "moved\nAnnotation" as movedAnnotation #Orange +class "old\nNext\nSibling" as oldNextSibling + +class descendant #Orange + +oldParent *--> oldPreviousSibling: <>\n[oldIndex - 1] +oldParent *--> movedAnnotation #red: <>\n[oldIndex] +oldParent *--> oldNextSibling: <>\n[oldIndex + 1] + +movedAnnotation *--> descendant + +descendant -[hidden]- newParent + +class newParent + +class "new\nPrevious\nSibling" as newPreviousSibling +class " " as dummy <> +class "new\nNext\nSibling" as newNextSibling + +newParent *--> newPreviousSibling: <>\n[newIndex - 1] +newParent *-[hidden]-> dummy #Blue: <>\n[newIndex] +newParent *--> newNextSibling: <>\n[newIndex] +---- +| +[plantuml,moveAnnotationFromOtherParent-after,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent + +class "old\nPrevious\nSibling" as oldPreviousSibling +class " " as dummy <> +class "old\nNext\nSibling" as oldNextSibling + +oldParent *--> oldPreviousSibling: <>\n[oldIndex - 1] +oldParent *-[hidden]-> dummy #red: <>\n[oldIndex] +oldParent *--> oldNextSibling: <>\n[oldIndex] + +oldPreviousSibling -[hidden]- newParent +oldNextSibling -[hidden]- newParent + +class newParent + +class "new\nPrevious\nSibling" as newPreviousSibling +class "moved\nAnnotation" as movedAnnotation #Orange +class "new\nNext\nSibling" as newNextSibling + +class descendant #Orange + +newParent *--> newPreviousSibling: <>\n[newIndex - 1] +newParent *--> movedAnnotation #Blue: <>\n[newIndex] +newParent *--> newNextSibling: <>\n[newIndex + 1] + +movedAnnotation *--> descendant +---- diff --git a/delta/commandEventOverview/moveAnnotationInSameParent.adoc b/delta/commandEventOverview/moveAnnotationInSameParent.adoc new file mode 100644 index 0000000..4619de9 --- /dev/null +++ b/delta/commandEventOverview/moveAnnotationInSameParent.adoc @@ -0,0 +1,49 @@ +| +[plantuml,moveAnnotationInSameParent-before,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class siblingA +class "moved\nAnnotation" as movedAnnotation #Orange +class siblingB +class siblingC + +class descendant #Orange + +parent *--> siblingA: <>\n[oldIndex - 1] +parent *--> movedAnnotation: <>\n[oldIndex] +parent *--> siblingB: <>\n[oldIndex + 1] +parent *--> siblingC: <>\n[oldIndex + 2] + +movedAnnotation *-> descendant + +siblingA -[hidden]> movedAnnotation +---- +| +[plantuml,moveAnnotationInSameParent-after,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class siblingA +class "moved\nAnnotation" as movedAnnotation #Orange +class siblingB +class siblingC + +class descendant #Orange + +parent *--> siblingA: <>\n[oldIndex - 1] +parent *--> siblingB: <>\n[oldIndex] +parent *--> movedAnnotation: <>\n[newIndex] +parent *--> siblingC: <>\n[newIndex + 1] + +movedAnnotation *-> descendant + +siblingA -[hidden]> siblingB +siblingB -[hidden]> movedAnnotation +---- diff --git a/delta/commandEventOverview/moveChildFromOtherContainment.adoc b/delta/commandEventOverview/moveChildFromOtherContainment.adoc new file mode 100644 index 0000000..9aae457 --- /dev/null +++ b/delta/commandEventOverview/moveChildFromOtherContainment.adoc @@ -0,0 +1,63 @@ +| +[plantuml,moveChildFromOtherContainment-before,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent + +class "old\nPrevious\nSibling" as oldPreviousSibling +class "moved\nChild" as movedChild #Orange +class "old\nNext\nSibling" as oldNextSibling + +class descendant #Orange + +oldParent *--> oldPreviousSibling: old\nContainment\n[oldIndex - 1] +oldParent *--> movedChild #red: old\nContainment\n[oldIndex] +oldParent *--> oldNextSibling: old\nContainment\n[oldIndex + 1] + +movedChild *--> descendant + +descendant -[hidden]- newParent + +class newParent + +class "new\nPrevious\nSibling" as newPreviousSibling +class " " as dummy <> +class "new\nNext\nSibling" as newNextSibling + +newParent *--> newPreviousSibling: new\nContainment\n[newIndex - 1] +newParent *-[hidden]-> dummy #Blue: new\nContainment\n[newIndex] +newParent *--> newNextSibling: new\nContainment\n[newIndex] +---- +| +[plantuml, moveChildFromOtherContainment-after, svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent + +class "old\nPrevious\nSibling" as oldPreviousSibling +class " " as dummy <> +class "old\nNext\nSibling" as oldNextSibling + +oldParent *--> oldPreviousSibling: old\nContainment\n[oldIndex - 1] +oldParent *-[hidden]-> dummy #red: old\nContainment\n[oldIndex] +oldParent *--> oldNextSibling: old\nContainment\n[oldIndex] + +oldPreviousSibling -[hidden]- newParent +oldNextSibling -[hidden]- newParent + +class newParent + +class "new\nPrevious\nSibling" as newPreviousSibling +class "moved\nChild" as movedChild #Orange +class "new\nNext\nSibling" as newNextSibling + +class descendant #Orange + +newParent *--> newPreviousSibling: new\nContainment\n[newIndex - 1] +newParent *--> movedChild #Blue: new\nContainment\n[newIndex] +newParent *--> newNextSibling: new\nContainment\n[newIndex + 1] + +movedChild *--> descendant +---- diff --git a/delta/commandEventOverview/moveChildFromOtherContainmentInSameParent.adoc b/delta/commandEventOverview/moveChildFromOtherContainmentInSameParent.adoc new file mode 100644 index 0000000..1af1ab7 --- /dev/null +++ b/delta/commandEventOverview/moveChildFromOtherContainmentInSameParent.adoc @@ -0,0 +1,53 @@ +| +[plantuml,moveChildFromOtherContainmentInSameParent-before,svg] +---- +!include commandEventOverviewStyle.puml + +class "old\nPrevious\nSibling" as oldPreviousSibling +class descendant #Orange +class "moved\nChild" as movedChild #Orange +class "old\nNext\nSibling" as oldNextSibling + +class parent + +descendant <--* movedChild + +oldPreviousSibling <--* parent: old\nContainment\n[oldIndex - 1] +movedChild <--* parent #red: old\nContainment\n[oldIndex] +oldNextSibling <--* parent: old\nContainment\n[oldIndex + 1] + +class "new\nPrevious\nSibling" as newPreviousSibling +class " " as dummy <> +class "new\nNext\nSibling" as newNextSibling + +parent *--> newPreviousSibling: new\nContainment\n[newIndex - 1] +parent *-[hidden]-> dummy #Blue: new\nContainment\n[newIndex] +parent *--> newNextSibling: new\nContainment\n[newIndex] +---- +| +[plantuml, moveChildFromOtherContainmentInSameParent-after, svg] +---- +!include commandEventOverviewStyle.puml + +class "old\nPrevious\nSibling" as oldPreviousSibling +class " " as dummy <> +class "old\nNext\nSibling" as oldNextSibling + +class parent + +oldPreviousSibling <--* parent: old\nContainment\n[oldIndex - 1] +dummy <-[hidden]-* parent #red: old\nContainment\n[oldIndex] +oldNextSibling <--* parent: old\nContainment\n[oldIndex] + +class "new\nPrevious\nSibling" as newPreviousSibling +class "moved\nChild" as movedChild #Orange +class "new\nNext\nSibling" as newNextSibling + +class descendant #Orange + +parent *--> newPreviousSibling: new\nContainment\n[newIndex - 1] +parent *--> movedChild #Blue: new\nContainment\n[newIndex] +parent *--> newNextSibling: new\nContainment\n[newIndex + 1] + +movedChild *--> descendant +---- diff --git a/delta/commandEventOverview/moveChildInSameContainment.adoc b/delta/commandEventOverview/moveChildInSameContainment.adoc new file mode 100644 index 0000000..1e78718 --- /dev/null +++ b/delta/commandEventOverview/moveChildInSameContainment.adoc @@ -0,0 +1,49 @@ +| +[plantuml,moveChildInSameContainment-before,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class siblingA +class movedChild #Orange +class siblingB +class siblingC + +class descendant #Orange + +parent *--> siblingA: containment\n[oldIndex - 1] +parent *--> movedChild: containment\n[oldIndex] +parent *--> siblingB: containment\n[oldIndex + 1] +parent *--> siblingC: containment\n[oldIndex + 2] + +movedChild *-> descendant + +siblingA -[hidden]> movedChild +---- +| +[plantuml, moveChildInSameContainment-after, svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class siblingA +class movedChild #Orange +class siblingB +class siblingC + +class descendant #Orange + +parent *--> siblingA: containment\n[oldIndex - 1] +parent *--> siblingB: containment\n[oldIndex] +parent *--> movedChild: containment\n[newIndex] +parent *--> siblingC: containment\n[newIndex + 1] + +movedChild *-> descendant + +siblingA -[hidden]> siblingB +siblingB -[hidden]> movedChild +---- diff --git a/delta/commandEventOverview/moveEntryFromOtherReference.adoc b/delta/commandEventOverview/moveEntryFromOtherReference.adoc new file mode 100644 index 0000000..2019194 --- /dev/null +++ b/delta/commandEventOverview/moveEntryFromOtherReference.adoc @@ -0,0 +1,59 @@ +| +[plantuml,moveEntryFromOtherReference-before,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent +class "old\nPrevious\nEntry" as oldPreviousEntry +class "old\nNext\nEntry" as oldNextEntry + +class "moved\nTarget" as target #Orange + +oldParent ..> oldPreviousEntry: old\nReference\n[oldIndex - 1] +oldParent .[thickness=2].> target #red: old\nReference\n[oldIndex]\n{movedResolveInfo} +oldParent ..> oldNextEntry: old\nReference\n[oldIndex + 1] + +class newParent +class "new\nPrevious\nEntry" as newPreviousEntry +class "new\nNext\nEntry" as newNextEntry + +oldPreviousEntry -[hidden]-> newPreviousEntry +oldNextEntry -[hidden]-> newNextEntry + +newPreviousEntry <.. newParent: new\nReference\n[newIndex - 1] +target <.[hidden]. newParent #blue: new\nReference\n[newIndex]\n{resolveInfo} +newNextEntry <.. newParent: new\nReference\n[newIndex] + +oldPreviousEntry -[hidden]> target +target -[hidden]> newNextEntry +---- +| + +[plantuml,moveEntryFromOtherReference-after,svg] +---- +!include commandEventOverviewStyle.puml + +class oldParent +class "old\nPrevious\nEntry" as oldPreviousEntry +class "old\nNext\nEntry" as oldNextEntry + +class "moved\nTarget" as target #Orange + +oldParent ..> oldPreviousEntry: old\nReference\n[oldIndex - 1] +oldParent .[hidden].> target #red: old\nReference\n[oldIndex]\n{movedResolveInfo} +oldParent ..> oldNextEntry: old\nReference\n[oldIndex] + +class newParent +class "new\nPrevious\nEntry" as newPreviousEntry +class "new\nNext\nEntry" as newNextEntry + +oldPreviousEntry -[hidden]-> newPreviousEntry +oldNextEntry -[hidden]-> newNextEntry + +newPreviousEntry <.. newParent: new\nReference\n[newIndex - 1] +target <.[thickness=2]. newParent #blue: new\nReference\n[newIndex]\n{movedResolveInfo} +newNextEntry <.. newParent: new\nReference\n[newIndex + 1] + +oldPreviousEntry -[hidden]> target +target -[hidden]> newNextEntry +---- diff --git a/delta/commandEventOverview/moveEntryFromOtherReferenceInSameParent.adoc b/delta/commandEventOverview/moveEntryFromOtherReferenceInSameParent.adoc new file mode 100644 index 0000000..2f9e292 --- /dev/null +++ b/delta/commandEventOverview/moveEntryFromOtherReferenceInSameParent.adoc @@ -0,0 +1,57 @@ +| +[plantuml,moveEntryFromOtherReferenceInSameParent-before,svg] +---- +!include commandEventOverviewStyle.puml + +class "old\nPrevious\nEntry" as oldPreviousEntry +class "moved\nTarget" as target #Orange +class "old\nNext\nEntry" as oldNextEntry + +class parent + +parent ..> oldPreviousEntry: old\nReference\n[oldIndex - 1] + +parent .[thickness=2].> target #red: old\nReference\n[oldIndex]\n{movedResolveInfo} +parent ..> oldNextEntry: old\nReference\n[oldIndex + 1] + +oldPreviousEntry -[hidden]> oldNextEntry +oldPreviousEntry -[hidden]right-> target + +class "new\nPrevious\nEntry" as newPreviousEntry +class "new\nNext\nEntry" as newNextEntry + +newPreviousEntry -[hidden]> newNextEntry +oldPreviousEntry -[hidden]-> newPreviousEntry +oldNextEntry -[hidden]> newNextEntry + +parent ..> newPreviousEntry: new\nReference\n[newIndex - 1] +parent ..> newNextEntry: new\nReference\n[newIndex] +---- +| +[plantuml, moveEntryFromOtherReferenceInSameParent-after, svg] +---- +!include commandEventOverviewStyle.puml + +class "old\nPrevious\nEntry" as oldPreviousEntry +class "moved\nTarget" as target #Orange +class "old\nNext\nEntry" as oldNextEntry + +class parent + +parent ..> oldPreviousEntry: old\nReference\n[oldIndex - 1] +parent .[thickness=2].> target #blue: new\nReference\n[newIndex]\n{movedResolveInfo} +parent ..> oldNextEntry: old\nReference\n[oldIndex + 1] + +oldPreviousEntry -[hidden]> oldNextEntry +oldPreviousEntry -[hidden]-> target + +class "new\nPrevious\nEntry" as newPreviousEntry +class "new\nNext\nEntry" as newNextEntry + +newPreviousEntry -[hidden]> newNextEntry +oldPreviousEntry -[hidden]-> newPreviousEntry +oldNextEntry -[hidden]> newNextEntry + +parent ..> newPreviousEntry: new\nReference\n[newIndex - 1] +parent ..> newNextEntry: new\nReference\n[newIndex] +---- diff --git a/delta/commandEventOverview/moveEntryInSameReference.adoc b/delta/commandEventOverview/moveEntryInSameReference.adoc new file mode 100644 index 0000000..8cc83a9 --- /dev/null +++ b/delta/commandEventOverview/moveEntryInSameReference.adoc @@ -0,0 +1,41 @@ +| +[plantuml,moveEntryInSameReference-before,svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class "sibling\nEntryA" as siblingA +class "moved\nTarget" as target #Orange +class "sibling\nEntryB" as siblingB +class "sibling\nEntryC" as siblingC + +parent ..> siblingA: reference\n[oldIndex - 1] +parent ..> target: reference\n[oldIndex]\n{movedResolveInfo} +parent ..> siblingB: reference\n[oldIndex + 1] +parent ..> siblingC: reference\n[oldIndex + 2] + +siblingA -[hidden]> target +---- +| +[plantuml, moveEntryInSameReference-after, svg] +---- +!include commandEventOverviewStyle.puml +left to right direction + +class parent + +class "sibling\nEntryA" as siblingA +class "moved\nTarget" as target #Orange +class "sibling\nEntryB" as siblingB +class "sibling\nEntryC" as siblingC + +parent *--> siblingA: reference\n[oldIndex - 1] +parent *--> siblingB: reference\n[oldIndex] +parent *--> target: reference\n[newIndex]\n{movedResolveInfo} +parent *--> siblingC: reference\n[newIndex + 1] + +siblingA -[hidden]> siblingB +siblingB -[hidden]> target +---- diff --git a/delta/commandEventOverview/replaceAnnotation.adoc b/delta/commandEventOverview/replaceAnnotation.adoc new file mode 100644 index 0000000..2de830e --- /dev/null +++ b/delta/commandEventOverview/replaceAnnotation.adoc @@ -0,0 +1,41 @@ +| +[plantuml,replaceAnnotation-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class "replaced\nAnnotation" as replacedAnnotation #red +class "next\nSibling" as nextSibling + +class descendant #red + +parent *--> previousSibling: <>\n[index - 1] +parent *--> replacedAnnotation #red: <>\n[index] +parent *--> nextSibling: <>\n[index + 1] + +replacedAnnotation *--> descendant #red +---- +| +[plantuml,replaceAnnotation-after,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class "newAnnotation:\nRemark" as newAnnotation #LightSkyBlue { + text:String="ok" +} +class "next\nSibling" as nextSibling + +class descendant #LightSkyBlue + +parent *--> previousSibling: <>\n[index - 1] +parent *--> newAnnotation #Blue: <>\n[index] +parent *--> nextSibling: <>\n[index + 1] + +newAnnotation *--> descendant #Blue +previousSibling <.. descendant #Blue +---- diff --git a/delta/commandEventOverview/replaceChild.adoc b/delta/commandEventOverview/replaceChild.adoc new file mode 100644 index 0000000..a52a2dc --- /dev/null +++ b/delta/commandEventOverview/replaceChild.adoc @@ -0,0 +1,41 @@ +| +[plantuml,replaceChild-before,svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class "replaced\nChild" as replacedChild #red +class "next\nSibling" as nextSibling + +class descendant #red + +parent *--> previousSibling: containment\n[index - 1] +parent *--> replacedChild #red: containment\n[index] +parent *--> nextSibling: containment\n[index + 1] + +replacedChild *--> descendant #red +---- +| +[plantuml, replaceChild-after, svg] +---- +!include commandEventOverviewStyle.puml + +class parent + +class "previous\nSibling" as previousSibling +class "newChild:Car" as newChild #LightSkyBlue { + length:Integer=19 +} +class "next\nSibling" as nextSibling + +class descendant #LightSkyBlue + +parent *--> previousSibling: containment\n[index - 1] +parent *--> newChild #Blue: containment\n[index] +parent *--> nextSibling: containment\n[index + 1] + +newChild *--> descendant #Blue +previousSibling <.. descendant #Blue +---- diff --git a/delta/commandEventOverviewStyle.puml b/delta/commandEventOverviewStyle.puml new file mode 100644 index 0000000..f5980ca --- /dev/null +++ b/delta/commandEventOverviewStyle.puml @@ -0,0 +1,17 @@ +@startuml +hide empty members +hide circles + +skinparam class<> { + borderColor Transparent + backgroundColor Transparent + stereotypeFontColor Transparent +} + +skinparam package<> { + borderColor Transparent + backgroundColor Transparent + fontColor Transparent + stereotypeFontColor Transparent +} +@enduml \ No newline at end of file diff --git a/delta/commands.adoc b/delta/commands.adoc new file mode 100644 index 0000000..e95b150 --- /dev/null +++ b/delta/commands.adoc @@ -0,0 +1,1297 @@ +[[commands]] +=== Commands + +==== Lifecycle +[plantuml, commandsLifecycle, svg] +---- +hide empty description + +[*] -> Created: client\ncreates +Created -> Sent: client\nsends + +Sent --> Failed: repository\ninvalid command +Failed -> [*]: client\ndiscards + +Sent -> Received: repository\nreceives +Received -> Processed: repository emits event,\nclient receives event +Processed --> [*]: client\ndiscards +---- + +[[cmd-partitions]] +==== Partitions + +[[cmd-AddPartition]] +===== Add partition +Add `newPartition` node as new partition. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/addPartition.adoc[] +|=== + +[horizontal] +.Parameters +newPartition:: <>{fn-org327} root node to form a new partition. +The root node MUST NOT contain a _parent_ (as this is a partition, thus cannot have a parent). +commandId:: <> Id of this command. +protocolMessage:: <> + +.Errors +* <> for `newPartition` +* <> + +.Technical name +`AddPartition` + +.Related event +<> + +[[cmd-DeletePartition]] +===== Delete partition +Delete partition `deletedPartition`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/deletePartition.adoc[] +|=== + +[horizontal] +.Parameters +deletedPartition:: <> +commandId:: <> Id of this command. +protocolMessage:: <> + +.Errors +* <> for `deletedPartition` +* <> + +.Technical name +`DeletePartition` + +.Related event +<> + +[[cmd-nodes]] +==== Nodes + +[[cmd-ChangeClassifier]] +===== Change classifier +Change classifier of `node` from `oldClassifier` to `newClassifier`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/changeClassifier.adoc[] +|=== + +[horizontal] +.Parameters +node:: <> +newClassifier:: <> +commandId:: <> Id of this command. +protocolMessage:: <> + +.Errors +* <> for `node` +* <> + +.Technical name +`ChangeClassifier` + +.Related event +<> + +[[cmd-properties]] +==== Properties + +[[cmd-AddProperty]] +===== Add property +Add `newValue` as value of property `property` to `node`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/addProperty.adoc[] +|=== + +[horizontal] +.Parameters +node:: <> +property:: <> +newValue:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `node` +* ##?## `property` already set in `node` +* <> + +.Technical name +`AddProperty` + +.Related event +<> + +[[cmd-DeleteProperty]] +===== Delete property +Delete existing `property` with `oldValue` from `node`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/deleteProperty.adoc[] +|=== + +[horizontal] +.Parameters +node:: <> +property:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `node` +* ##?## `property` is not set in `node` +* <> + +.Technical name +`DeleteProperty` + +.Related event +<> + +[[cmd-ChangeProperty]] +===== Change property +Change existing `property` of `node` to `newValue`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/changeProperty.adoc[] +|=== + +[horizontal] +.Parameters +node:: <> +property:: <> +newValue:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `node` +* ##?## `property` is not set in `node` +* ##?## `property` already has `newValue` in `node` +* <> + + +.Technical name +`ChangeProperty` + +.Related event +<> + +[[cmd-children]] +==== Children + +[[cmd-AddChild]] +===== Add child +Add new node `newChild` to `parent` in `containment` at `index`. +`newChild` might be a single node or an arbitrary complex subtree. +All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. +Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/addChild.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +newChild:: <> +containment:: <> +index:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `newChild` +* <> for `index` (is beyond the number of `containment` entries in `parent`) +* <> + +.Technical name +`AddChild` + +.Related event +<> + +[[cmd-DeleteChild]] +===== Delete child +Delete existing node from ``parent``'s `containment` at `index`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/deleteChild.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +containment:: <> +index:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* ##?## `index` is beyond (the number of `containment` entries in `parent`) - 1 +* <> + +.Technical name +`DeleteChild` + +.Related event +<> + +[[cmd-ReplaceChild]] +===== Replace child +Delete current child inside ``parent``'s `containment` at `index`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +Replace existing node inside ``parent``'s `containment` at `index` with new node `newChild`. +`newChild` might be a single node or an arbitrary complex subtree. +All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. +Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/replaceChild.adoc[] +|=== + +[horizontal] +.Parameters +newChild:: <> +parent:: <> +containment:: <> +index:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> `newChild` +* <> for `parent` +* ##?## `index` is beyond (the number of `containment` entries in `parent`) - 1 +* <> + +.Technical name +`ReplaceChild` + +.Related event +<> + +[[cmd-MoveChildFromOtherContainment]] +===== Move child from other containment +Move existing node `movedChild` inside ``newParent``'s `newContainment` at `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveChildFromOtherContainment.adoc[] +|=== + +[horizontal] +.Parameters +newParent:: <> +newContainment:: <> +newIndex:: <> +movedChild:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newParent` +* <> for `newIndex` (is beyond the number of `newContainment` entries in `newParent`) +* <> for `movedChild` +* ##?## `movedChild` is already a child of `newParent` +* <> + +.Technical name +`MoveChildFromOtherContainment` + +.Related event +<> + +[[cmd-MoveChildFromOtherContainmentInSameParent]] +===== Move child from other containment in same parent +Move existing node `movedChild` (currently inside one of ``movedChild``'s parent's containments other than `newContainment`) +inside ``movedChild``'s parent's `newContainment` at `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveChildFromOtherContainmentInSameParent.adoc[] +|=== + +[horizontal] +.Parameters +newContainment:: <> +newIndex:: <> +movedChild:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newIndex` (is beyond the number of `newContainment` entries in ``movedChild``'s parent) +* <> for `movedChild` +* <> for `movedChild` +* <> as `movedChild` is already a child inside `newContainment` +* <> + +.Technical name +`MoveChildFromOtherContainmentInSameParent` + +.Related event +<> + +[[cmd-MoveChildInSameContainment]] +===== Move child in same containment +Move existing node `movedChild` within its current containment to `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveChildInSameContainment.adoc[] +|=== + +[horizontal] +.Parameters +newIndex:: <> +movedChild:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newIndex` (is beyond (the number of ``movedChild``'s containment entries in ```movedChild``'s parent) - 1) +* <> for `movedChild` +* <> for `movedChild` +* <> as `movedChild` is already at `newIndex` +* <> + +.Technical name +`MoveChildInSameContainment` + +.Related event +<> + +[[cmd-MoveAndReplaceChildFromOtherContainment]] +===== Move child from other containment and replace existing child +Move existing node `movedChild` inside ``newParent``'s `newContainment` at `newIndex`. +Delete current child inside ``newParent``'s `newContainment` at `newIndex`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAndReplaceChildFromOtherContainment.adoc[] +|=== + +[horizontal] +.Parameters +newParent:: <> +newContainment:: <> +newIndex:: <> +movedChild:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newParent` +* <> for `newIndex` (is beyond the number of `newContainment` entries in `newParent`) +* <> for `movedChild` +* ##?## `movedChild` is already a child of `newParent` +* <> + +.Technical name +`MoveAndReplaceChildFromOtherContainment` + +.Related event +<> + +[[cmd-MoveAndReplaceChildFromOtherContainmentInSameParent]] +===== Move child from other containment in same parent and replace existing child +Move existing node `movedChild` (currently inside one of ``movedChild``'s parent's containments other than `newContainment`) +inside ``movedChild``'s parent's `newContainment` at `newIndex`. +Delete current child inside ``movedChild``'s parent's `newContainment` at `newIndex`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAndReplaceChildFromOtherContainmentInSameParent.adoc[] +|=== + +[horizontal] +.Parameters +newContainment:: <> +newIndex:: <> +movedChild:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newIndex` (is beyond the number of `newContainment` entries in `parent`) +* <> for `movedChild` +* <> for `movedChild` +* <> as `movedChild` is already a child inside `newContainment` +* <> + +.Technical name +`MoveAndReplaceChildFromOtherContainmentInSameParent` + +.Related event +<> + +[[cmd-MoveAndReplaceChildInSameContainment]] +===== Move child in same containment and replace existing child +Move existing node `movedChild` within its current containment to `newIndex`. +Delete current child inside the same containment at `newIndex`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAndReplaceChildInSameContainment.adoc[] +|=== + +[horizontal] +.Parameters +newIndex:: <> +movedChild:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newIndex` (is beyond (the number of ``movedChild``'s containment entries in ``movedChild``'s parent) - 2) +* <> for `movedChild` +* <> for `movedChild` +* <> as `movedChild` is already at `newIndex` +* <> + +.Technical name +`MoveAndReplaceChildInSameContainment` + +.Related event +<> + +[[cmd-annotations]] +==== Annotations + +[[cmd-AddAnnotation]] +===== Add annotation +Add new node `newAnnotation` to ``parent``'s annotations at `index`. +`newAnnotation` might be a single node or an arbitrary complex subtree. +All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. +Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/addAnnotation.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +newAnnotation:: <> +index:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `newAnnotation` +* <> for `index` (is beyond the number of annotations of `parent`) +* <> + +.Technical name +`AddAnnotation` + +.Related event +<> + +[[cmd-DeleteAnnotation]] +===== Delete annotation +Delete existing node from ``parent``'s annotations at `index`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/deleteAnnotation.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +index:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond (the number of annotations of `parent`) - 1) +* <> + +.Technical name +`DeleteAnnotation` + +.Related event +<> + +[[cmd-ReplaceAnnotation]] +===== Replace annotation +Delete current node at ``parent``'s annotations at `index`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +Replace existing node inside ``parent``'s annotations at `index` with new node `newAnnotation`. +`newAnnotation` might be a single node or an arbitrary complex subtree. +All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. +Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org327} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/replaceAnnotation.adoc[] +|=== + +[horizontal] +.Parameters +newAnnotation:: <> +parent:: <> +index:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newAnnotation` +* <> for `parent` +* <> for `index` (is beyond (the number of annotations of `parent`) - 1) +* <> + +.Technical name +`ReplaceAnnotation` + +.Related event +<> + +[[cmd-MoveAnnotationFromOtherParent]] +===== Move annotation from other parent +Move existing node `movedAnnotation` inside ``newParent``'s annotations at `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAnnotationFromOtherParent.adoc[] +|=== + +[horizontal] +.Parameters +newParent:: <> +newIndex:: <> +movedAnnotation:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newParent` +* <> for `index` (is beyond the number of annotations of `newParent`) +* <> for `movedAnnotation` +* ##?## `movedAnnotation` is already an annotation of `newParent` +* <> + +.Technical name +`MoveAnnotationFromOtherParent` + +.Related event +<> + + +[[cmd-MoveAnnotationInSameParent]] +===== Move annotation in same parent +Move existing node `movedAnnotation` within the same parent to `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAnnotationInSameParent.adoc[] +|=== + +[horizontal] +.Parameters +newIndex:: <> +movedAnnotation:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newIndex` (is beyond (the number of annotations of ``movedAnnotation``'s parent) - 1) +* <> for `movedAnnotation` +* <> for `movedAnnotation` +* <> + +.Technical name +`MoveAnnotationInSameParent` + +.Related event +<> + +[[cmd-MoveAndReplaceAnnotationFromOtherParent]] +===== Move annotation from other parent and replace existing annotation +Move existing node `movedAnnotation` inside ``newParent``'s annotations at `newIndex`. +Delete current node at ``newParent``'s annotations at `newIndex`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAndReplaceAnnotationFromOtherParent.adoc[] +|=== + +[horizontal] +.Parameters +newParent:: <> +newIndex:: <> +movedAnnotation:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newParent` +* <> for `index` (is beyond the number of annotations of `newParent`) +* <> for `movedAnnotation` +* ##?## `movedAnnotation` is already an annotation of `newParent` +* <> + +.Technical name +`MoveAndReplaceAnnotationFromOtherParent` + +.Related event +<> + + +[[cmd-MoveAndReplaceAnnotationInSameParent]] +===== Move annotation in same parent and replace existing annotation +Move existing node `movedAnnotation` within the same parent to `newIndex`. +Delete current node at ``movedAnnotation``'s parent's annotations at `newIndex`, and all its descendants (including annotation instances). +Does NOT change references to any of the deleted nodes.{fn-org285} + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAndReplaceAnnotationInSameParent.adoc[] +|=== + +[horizontal] +.Parameters +newIndex:: <> +movedAnnotation:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newIndex` (is beyond (the number of annotations of ``movedAnnotation``'s parent) - 1) +* <> for `movedAnnotation` +* <> for `movedAnnotation` +* <> + +.Technical name +`MoveAndReplaceAnnotationInSameParent` + +.Related event +<> + +[[cmd-references]] +==== References + +[[cmd-AddReference]] +===== Add reference +Add `newTarget` / `newResolveInfo` to ``parent``'s `reference` at `index`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/addReference.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newTarget:: <>? +newResolveInfo:: <>? +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond the number of `reference` entries of `parent`) +* <> for `newTarget` and `newResolveInfo` +* <> + +.Technical name +`AddReference` + +.Related event +<> + +[[cmd-DeleteReference]] +===== Delete reference +Delete existing entry from ``parent``'s `reference` at `index`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/deleteReference.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> + +.Technical name +`DeleteReference` + +.Related event +<> + +[[cmd-ChangeReference]] +===== Change reference +Replace existing entry inside ``parent``'s `reference` at `index` with `newTarget`/`newResolveInfo`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/changeReference.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newTarget:: <>? +newResolveInfo:: <>? +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> for `newTarget` and `newResolveInfo` +* <> + +.Technical name +`ChangeReference` + +.Related event +<> + +[[cmd-MoveEntryFromOtherReference]] +===== Move entry from other reference +Move existing entry inside ``oldParent``'s `oldReference` at `oldIndex` +to ``newParent``'s `newReference` at `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveEntryFromOtherReference.adoc[] +|=== + +[horizontal] +.Parameters +newParent:: <> +newReference:: <> +newIndex:: <> +oldParent:: <> +oldReference:: <> +oldIndex:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newParent` +* <> for `newIndex` (is beyond (the number of `newReference` entries of `newParent`)) +* <> for `oldIndex` (is beyond (the number of `oldReference` entries of `oldParent`) - 1) +* <> + +.Technical name +`MoveEntryFromOtherReference` + +.Related event +<> + +[[cmd-MoveEntryFromOtherReferenceInSameParent]] +===== Move entry from other reference in same parent +Move existing entry inside ``parent``'s `oldReference` at `oldIndex` +to ``parent``'s `newReference` at `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveEntryFromOtherReferenceInSameParent.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +newReference:: <> +newIndex:: <> +oldReference:: <> +oldIndex:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `newIndex` (is beyond (the number of `newReference` entries of `parent`)) +* <> for `oldIndex` (is beyond (the number of `oldReference` entries of `parent`) - 1) +* <> + +.Technical name +`MoveEntryFromOtherReferenceInSameParent` + +.Related event +<> + +[[cmd-MoveEntryInSameReference]] +===== Move entry in same reference +Move existing entry inside ``parent``'s `reference` at `oldIndex` +inside ``parent``'s `reference` at `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveEntryInSameReference.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +reference:: <> +oldIndex:: <> +newIndex:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `newIndex` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> for `oldIndex` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> + +.Technical name +`MoveEntryInSameReference` + +.Related event +<> + +[[cmd-MoveAndReplaceEntryFromOtherReference]] +===== Move entry from other reference and replace existing entry +Move existing entry inside ``oldParent``'s `oldReference` at `oldIndex` +to ``newParent``'s `newReference` at `newIndex`, +replacing existing entry in ``newParent``'s `newReference` at `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAndReplaceEntryFromOtherReference.adoc[] +|=== + +[horizontal] +.Parameters +newParent:: <> +newReference:: <> +newIndex:: <> +oldParent:: <> +oldReference:: <> +oldIndex:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `newParent` +* <> for `newIndex` (is beyond (the number of `newReference` entries of `newParent`) - 1) +* <> for `oldIndex` (is beyond (the number of `oldReference` entries of `oldParent`) - 1) +* <> + +.Technical name +`MoveAndReplaceEntryFromOtherReference` + +.Related event +<> + +[[cmd-MoveAndReplaceEntryFromOtherReferenceInSameParent]] +===== Move entry from other reference in same parent and replace existing entry +Move existing entry inside ``parent``'s `oldReference` at `oldIndex` +to ``parent``'s `newReference` at `newIndex`, +replacing existing entry in ``parent``'s `newReference` at `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAndReplaceEntryFromOtherReferenceInSameParent.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +newReference:: <> +newIndex:: <> +oldReference:: <> +oldIndex:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `newIndex` (is beyond (the number of `newReference` entries of `parent`) - 1) +* <> for `oldIndex` (is beyond (the number of `oldReference` entries of `parent`) - 1) +* <> + +.Technical name +`MoveAndReplaceEntryFromOtherReferenceInSameParent` + +.Related event +<> + +[[cmd-MoveAndReplaceEntryInSameReference]] +===== Move entry in same reference and replace existing entry +Move existing entry inside ``parent``'s `reference` at `oldIndex` +inside ``parent``'s `reference` at `newIndex`, +replacing existing entry in ``parent``'s `reference` at `newIndex`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/moveAndReplaceEntryInSameReference.adoc[] +|=== + +[horizontal] +.Parameters +parent:: <> +reference:: <> +oldIndex:: <> +newIndex:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `newIndex` (is beyond (the number of `reference` entries of `parent`) - 2) +* <> for `oldIndex` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> + +.Technical name +`MoveAndReplaceEntryInSameReference` + +.Related event +<> + +[[cmd-AddReferenceResolveInfo]] +===== Add reference ResolveInfo +Add `newResolveInfo` as ResolveInfo to existing entry inside ``parent``'s `reference` at `index`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/addReferenceResolveInfo.adoc[] +|=== + +**** +Current target MUST NOT be `null` as we can only add ResolveInfo if ResolveInfo is `null`, and at least one of target and ResolveInfo MUST always be non-`null`. +**** + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newResolveInfo:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> for `newResolveInfo` +* ##?## resolveInfo already set in ``parent``'s `reference` at `index`. +* <> + +.Technical name +`AddReferenceResolveInfo` + +.Related event +<> + +[[cmd-DeleteReferenceResolveInfo]] +===== Delete reference ResolveInfo +Delete existing ResolveInfo from existing entry inside ``parent``'s `reference` at `index`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/deleteReferenceResolveInfo.adoc[] +|=== + +**** +Current target MUST NOT be `null` as we're about to remove ResolveInfo, and at least one of target and ResolveInfo MUST always be non-`null`. +**** + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> as target is `null` +* ##?## resolveInfo is not set in ``parent``'s `reference` at `index`. +* <> + +.Technical name +`DeleteReferenceResolveInfo` + +.Related event +<> + +[[cmd-ChangeReferenceResolveInfo]] +===== Change reference ResolveInfo +Change ResolveInfo of existing entry inside ``parent``'s `reference` at `index` to `newResolveInfo`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/changeReferenceResolveInfo.adoc[] +|=== + +**** +Current target MAY be `null` as we can only change ResolveInfo if both current ResolveInfo and `newResolveInfo` is non-`null`. +**** + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newResolveInfo:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> for `newResolveInfo` +* ##?## resolveInfo is not set in ``parent``'s `reference` at `index` +* <> + +.Technical name +`ChangeReferenceResolveInfo` + +.Related event +<> + +[[cmd-AddReferenceTarget]] +===== Add reference target +Add `newTarget` as target to existing entry inside ``parent``'s `reference` at `index`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/addReferenceTarget.adoc[] +|=== + +**** +Current ResolveInfo MUST NOT be `null` as we can only add target if target is `null`, and at least one of target and ResolveInfo MUST always be non-`null`. +**** + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newTarget:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> for `newTarget` +* ##?## target already set in ``parent``'s `reference` at `index`. +* <> + +.Technical name +`AddReferenceTarget` + +.Related event +<> + +[[cmd-DeleteReferenceTarget]] +===== Delete reference target +Delete existing target from existing entry inside ``parent``'s `reference` at `index`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/deleteReferenceTarget.adoc[] +|=== + +**** +Current ResolveInfo MUST NOT be `null` as we're about to remove target, and at least one of target and ResolveInfo MUST always be non-`null`. +**** + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond (the number of `reference` entries of `parent`) - 1) +* ##?## target is not set in ``parent``'s `reference` at `index`. +* <> + +.Technical name +`DeleteReferenceTarget` + +.Related event +<> + +[[cmd-ChangeReferenceTarget]] +===== Change reference target +Change target of existing entry inside ``parent``'s `reference` at `index` to `newTarget`. + +[cols="a,a"] +|=== +|Before |After + +include::commandEventOverview/changeReferenceTarget.adoc[] +|=== + +**** +Current ResolveInfo MAY be `null` as we can only change target if both current Target and `newTarget` is non-`null`. +**** + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newTarget:: <> +commandId:: <> +protocolMessage:: <> + +.Errors +* <> for `parent` +* <> for `index` (is beyond (the number of `reference` entries of `parent`) - 1) +* <> for `newTarget` +* ##?## target is not set in ``parent``'s `reference` at `index` +* <> + +.Technical name +`ChangeReferenceTarget` + +.Related event +<> + +[[cmd-composite-section]] +==== Composite + +[[cmd-Composite]] +[[cmd-CompositeCommand]] +===== Composite +Groups several commands into a logical group.{fn-org281} +The parts are ordered. + +Command groups don't guarantee anything; the repository MAY take the group as a hint to resolve conflicts in a different manner. + +Composite commands have a command id on their own.{fn-org353} +We can nest composite commands arbitrarily.{fn-org360} + +[horizontal] +.Parameters +parts:: <>[] +protocolMessage:: <> + +.Errors +* accumulation of all errors of `parts` +* <> + +.Technical name +`CompositeCommand` + +.Related event +<> \ No newline at end of file diff --git a/delta/delta-api.adoc b/delta/delta-api.adoc new file mode 100644 index 0000000..3a107c9 --- /dev/null +++ b/delta/delta-api.adoc @@ -0,0 +1,32 @@ +include::../shared/issue-footnotes.adoc[] +:serialization: ../serialization/serialization +:m3: ../metametamodel/metametamodel +:bulk: ../bulk/repo-access-api +:arch: ../reference-architecture/reference-architecture +:chunk: <<{serialization}.adoc#SerializationChunk, SerializationChunk>> + +[[delta]] += Delta Repository Access API +:toc: preamble +:toclevels: 4 +:sectnumlevels: 4 +:sectnums: +:!figure-caption: + +The delta API *version 2025.1* is used to store and retrieve changes to nodes. +It is intended for fine-grained changes to single values. +it is *not* intended as a bulk API that updates large chunks of the model at once. + +== Conventions used in this document +* ALL-CAPS key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in https://datatracker.ietf.org/doc/html/bcp14[BCP14] (https://datatracker.ietf.org/doc/html/rfc2119[RFC2119], https://datatracker.ietf.org/doc/html/rfc8174[RFC8174]) when, and only when, they appear in all capitals, as shown here. +* Footnotes refer to more discussions and rationale, but are non-normative. + +include::introduction.adoc[] + +include::description.adoc[] + +include::open-questions.adoc[] + +include::scenarios/scenarios.adoc[] + +include::messages.adoc[] diff --git a/delta/delta.schema.json b/delta/delta.schema.json new file mode 100644 index 0000000..9425feb --- /dev/null +++ b/delta/delta.schema.json @@ -0,0 +1,4030 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://lionweb.io/delta.schema.json", + "title": "LionWeb Delta Protocol", + "description": "Version: 0", + "type": "object", + "anyOf": [ + { + "$ref": "#/$defs/QueryRequests" + }, + { + "$ref": "#/$defs/QueryResponses" + }, + { + "$ref": "#/$defs/Commands" + }, + { + "$ref": "#/$defs/Events" + } + ], + "$defs": { + "id": { + "type": "string", + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$" + }, + "deltaProtocolVersion": { + "enum": [ + "2025.1" + ] + }, + "key": { + "$ref": "#/$defs/id" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "metaPointer": { + "type": "object", + "properties": { + "language": { + "$ref": "#/$defs/key" + }, + "version": { + "$ref": "#/$defs/version" + }, + "key": { + "$ref": "#/$defs/key" + } + }, + "required": [ + "language", + "version", + "key" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 3 + }, + "DeltaSerializationChunk": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "$ref": "#/$defs/SerializedNode" + }, + "uniqueItems": true + } + }, + "required": [ + "nodes" + ], + "additionalProperties": false, + "minProperties": 1, + "maxProperties": 1 + }, + "SerializedNode": { + "type": "object", + "properties": { + "id": { + "$ref": "#/$defs/targetNode" + }, + "classifier": { + "$ref": "#/$defs/metaPointer" + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/$defs/SerializedProperty" + } + }, + "containments": { + "type": "array", + "items": { + "$ref": "#/$defs/SerializedContainment" + } + }, + "references": { + "type": "array", + "items": { + "$ref": "#/$defs/SerializedReference" + } + }, + "annotations": { + "type": "array", + "items": { + "$ref": "#/$defs/id" + }, + "uniqueItems": true + }, + "parent": { + "oneOf": [ + { + "$ref": "#/$defs/id" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id", + "classifier", + "properties", + "containments", + "references", + "annotations", + "parent" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 7 + }, + "SerializedProperty": { + "type": "object", + "properties": { + "property": { + "$ref": "#/$defs/metaPointer" + }, + "value": { + "oneOf": [ + { + "$ref": "#/$defs/propertyValue" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "property", + "value" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 2 + }, + "SerializedContainment": { + "type": "object", + "properties": { + "containment": { + "$ref": "#/$defs/metaPointer" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/$defs/id" + }, + "uniqueItems": true + } + }, + "required": [ + "containment", + "children" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 2 + }, + "SerializedReference": { + "type": "object", + "properties": { + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/$defs/SerializedReferenceTarget" + } + } + }, + "required": [ + "reference", + "targets" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 2 + }, + "SerializedReferenceTarget": { + "type": "object", + "properties": { + "resolveInfo": { + "$ref": "#/$defs/optionalResolveInfo" + }, + "reference": { + "$ref": "#/$defs/optionalTargetNode" + } + }, + "required": [ + "resolveInfo", + "reference" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 2 + }, + "queryId": { + "$ref": "#/$defs/id" + }, + "commandId": { + "$ref": "#/$defs/id" + }, + "commandSource": { + "type": "object", + "properties": { + "participationId": { + "$ref": "#/$defs/participationId" + }, + "commandId": { + "$ref": "#/$defs/commandId" + } + }, + "required": [ + "participationId", + "commandId" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 2 + }, + "commandSources": { + "type": "array", + "items": { + "$ref": "#/$defs/commandSource" + }, + "uniqueItems": true + }, + "participationId": { + "$ref": "#/$defs/id" + }, + "targetNode": { + "$ref": "#/$defs/id" + }, + "optionalTargetNode": { + "oneOf": [ + { + "$ref": "#/$defs/targetNode" + }, + { + "type": "null" + } + ] + }, + "resolveInfo": { + "type": "string" + }, + "optionalResolveInfo": { + "oneOf": [ + { + "$ref": "#/$defs/resolveInfo" + }, + { + "type": "null" + } + ] + }, + "eventSequenceNumber": { + "type": "string", + "minLength": 1, + "pattern": "^[0-9]+$" + }, + "propertyValue": { + "type": "string" + }, + "index": { + "type": "string", + "minLength": 1, + "pattern": "^[0-9]+$" + }, + "protocolMessageKind": { + "$ref": "#/$defs/id" + }, + "errorCode": { + "$ref": "#/$defs/id" + }, + "protocolMessageDataKey": { + "$ref": "#/$defs/id" + }, + "ProtocolMessage": { + "properties": { + "kind": { + "$ref": "#/$defs/protocolMessageKind" + }, + "message": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/$defs/ProtocolMessageData" + } + } + }, + "required": [ + "kind", + "message", + "data" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 3 + }, + "ProtocolMessageData": { + "properties": { + "key": { + "$ref": "#/$defs/protocolMessageDataKey" + }, + "value": { + "type": "string" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 2 + }, + "QueryRequests": { + "anyOf": [ + { + "$ref": "#/$defs/SubscribeToChangingPartitionsRequest" + }, + { + "$ref": "#/$defs/SubscribeToPartitionContentsRequest" + }, + { + "$ref": "#/$defs/UnsubscribeFromPartitionContentsRequest" + }, + { + "$ref": "#/$defs/SignOnRequest" + }, + { + "$ref": "#/$defs/SignOffRequest" + }, + { + "$ref": "#/$defs/ReconnectRequest" + }, + { + "$ref": "#/$defs/GetAvailableIdsRequest" + }, + { + "$ref": "#/$defs/ListPartitionsRequest" + } + ] + }, + "QueryResponses": { + "anyOf": [ + { + "$ref": "#/$defs/SubscribeToChangingPartitionsResponse" + }, + { + "$ref": "#/$defs/SubscribeToPartitionContentsResponse" + }, + { + "$ref": "#/$defs/UnsubscribeFromPartitionContentsResponse" + }, + { + "$ref": "#/$defs/SignOnResponse" + }, + { + "$ref": "#/$defs/SignOffResponse" + }, + { + "$ref": "#/$defs/ReconnectResponse" + }, + { + "$ref": "#/$defs/GetAvailableIdsResponse" + }, + { + "$ref": "#/$defs/ListPartitionsResponse" + } + ] + }, + "SubscribeToChangingPartitionsRequest": { + "properties": { + "messageKind": { + "const": "SubscribeToChangingPartitionsRequest" + }, + "creation": { + "type": "boolean" + }, + "deletion": { + "type": "boolean" + }, + "partitions": { + "type": "boolean" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "creation", + "deletion", + "partitions", + "queryId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "SubscribeToChangingPartitionsResponse": { + "properties": { + "messageKind": { + "const": "SubscribeToChangingPartitionsResponse" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "queryId" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 3 + }, + "SubscribeToPartitionContentsRequest": { + "properties": { + "messageKind": { + "const": "SubscribeToPartitionContentsRequest" + }, + "partition": { + "$ref": "#/$defs/targetNode" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "partition", + "queryId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "SubscribeToPartitionContentsResponse": { + "properties": { + "messageKind": { + "const": "SubscribeToPartitionContentsResponse" + }, + "contents": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "contents", + "queryId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "UnsubscribeFromPartitionContentsRequest": { + "properties": { + "messageKind": { + "const": "UnsubscribeFromPartitionContentsRequest" + }, + "partition": { + "$ref": "#/$defs/targetNode" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "partition", + "queryId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "UnsubscribeFromPartitionContentsResponse": { + "properties": { + "messageKind": { + "const": "UnsubscribeFromPartitionContentsResponse" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "queryId" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 3 + }, + "SignOnRequest": { + "properties": { + "messageKind": { + "const": "SignOnRequest" + }, + "deltaProtocolVersion": { + "$ref": "#/$defs/deltaProtocolVersion" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "deltaProtocolVersion", + "queryId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "SignOnResponse": { + "properties": { + "messageKind": { + "const": "SignOnResponse" + }, + "participationId": { + "$ref": "#/$defs/participationId" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "participationId", + "queryId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "SignOffRequest": { + "properties": { + "messageKind": { + "const": "SignOffRequest" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "queryId" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 3 + }, + "SignOffResponse": { + "properties": { + "messageKind": { + "const": "SignOffResponse" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "queryId" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 3 + }, + "ReconnectRequest": { + "properties": { + "messageKind": { + "const": "ReconnectRequest" + }, + "participationId": { + "$ref": "#/$defs/participationId" + }, + "lastReceivedSequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "participationId", + "lastReceivedSequenceNumber", + "queryId" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "ReconnectResponse": { + "properties": { + "messageKind": { + "const": "ReconnectResponse" + }, + "lastSentSequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "lastSentSequenceNumber", + "queryId" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "GetAvailableIdsRequest": { + "properties": { + "messageKind": { + "const": "GetAvailableIdsRequest" + }, + "count": { + "type": "integer" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "count", + "queryId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "GetAvailableIdsResponse": { + "properties": { + "messageKind": { + "const": "GetAvailableIdsResponse" + }, + "ids": { + "type": "array", + "items": { + "$ref": "#/$defs/id" + } + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "ids", + "queryId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "ListPartitionsRequest": { + "properties": { + "messageKind": { + "const": "ListPartitionsRequest" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "queryId" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 3 + }, + "ListPartitionsResponse": { + "properties": { + "messageKind": { + "const": "ListPartitionsResponse" + }, + "partitions": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "queryId": { + "$ref": "#/$defs/queryId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "partitions", + "queryId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "Commands": { + "anyOf": [ + { + "$ref": "#/$defs/AddPartition" + }, + { + "$ref": "#/$defs/DeletePartition" + }, + { + "$ref": "#/$defs/ChangeClassifier" + }, + { + "$ref": "#/$defs/AddProperty" + }, + { + "$ref": "#/$defs/DeleteProperty" + }, + { + "$ref": "#/$defs/ChangeProperty" + }, + { + "$ref": "#/$defs/AddChild" + }, + { + "$ref": "#/$defs/DeleteChild" + }, + { + "$ref": "#/$defs/ReplaceChild" + }, + { + "$ref": "#/$defs/MoveChildFromOtherContainment" + }, + { + "$ref": "#/$defs/MoveChildFromOtherContainmentInSameParent" + }, + { + "$ref": "#/$defs/MoveChildInSameContainment" + }, + { + "$ref": "#/$defs/MoveAndReplaceChildFromOtherContainment" + }, + { + "$ref": "#/$defs/MoveAndReplaceChildFromOtherContainmentInSameParent" + }, + { + "$ref": "#/$defs/MoveAndReplaceChildInSameContainment" + }, + { + "$ref": "#/$defs/AddAnnotation" + }, + { + "$ref": "#/$defs/DeleteAnnotation" + }, + { + "$ref": "#/$defs/ReplaceAnnotation" + }, + { + "$ref": "#/$defs/MoveAnnotationFromOtherParent" + }, + { + "$ref": "#/$defs/MoveAnnotationInSameParent" + }, + { + "$ref": "#/$defs/MoveAndReplaceAnnotationFromOtherParent" + }, + { + "$ref": "#/$defs/MoveAndReplaceAnnotationInSameParent" + }, + { + "$ref": "#/$defs/AddReference" + }, + { + "$ref": "#/$defs/DeleteReference" + }, + { + "$ref": "#/$defs/ChangeReference" + }, + { + "$ref": "#/$defs/MoveEntryFromOtherReference" + }, + { + "$ref": "#/$defs/MoveEntryFromOtherReferenceInSameParent" + }, + { + "$ref": "#/$defs/MoveEntryInSameReference" + }, + { + "$ref": "#/$defs/MoveAndReplaceEntryFromOtherReference" + }, + { + "$ref": "#/$defs/MoveAndReplaceEntryFromOtherReferenceInSameParent" + }, + { + "$ref": "#/$defs/MoveAndReplaceEntryInSameReference" + }, + { + "$ref": "#/$defs/AddReferenceResolveInfo" + }, + { + "$ref": "#/$defs/DeleteReferenceResolveInfo" + }, + { + "$ref": "#/$defs/ChangeReferenceResolveInfo" + }, + { + "$ref": "#/$defs/AddReferenceTarget" + }, + { + "$ref": "#/$defs/DeleteReferenceTarget" + }, + { + "$ref": "#/$defs/ChangeReferenceTarget" + }, + { + "$ref": "#/$defs/CompositeCommand" + } + ] + }, + "AddPartition": { + "properties": { + "messageKind": { + "const": "AddPartition" + }, + "newPartition": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newPartition", + "commandId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "DeletePartition": { + "properties": { + "messageKind": { + "const": "DeletePartition" + }, + "deletedPartition": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "deletedPartition", + "commandId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "ChangeClassifier": { + "properties": { + "messageKind": { + "const": "ChangeClassifier" + }, + "node": { + "$ref": "#/$defs/targetNode" + }, + "newClassifier": { + "$ref": "#/$defs/metaPointer" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "node", + "newClassifier", + "commandId" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "AddProperty": { + "properties": { + "messageKind": { + "const": "AddProperty" + }, + "node": { + "$ref": "#/$defs/targetNode" + }, + "property": { + "$ref": "#/$defs/metaPointer" + }, + "newValue": { + "$ref": "#/$defs/propertyValue" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "node", + "property", + "newValue", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "DeleteProperty": { + "properties": { + "messageKind": { + "const": "DeleteProperty" + }, + "node": { + "$ref": "#/$defs/targetNode" + }, + "property": { + "$ref": "#/$defs/metaPointer" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "node", + "property", + "commandId" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "ChangeProperty": { + "properties": { + "messageKind": { + "const": "ChangeProperty" + }, + "node": { + "$ref": "#/$defs/targetNode" + }, + "property": { + "$ref": "#/$defs/metaPointer" + }, + "newValue": { + "$ref": "#/$defs/propertyValue" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "node", + "property", + "newValue", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "AddChild": { + "properties": { + "messageKind": { + "const": "AddChild" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newChild": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "containment": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newChild", + "containment", + "index", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "DeleteChild": { + "properties": { + "messageKind": { + "const": "DeleteChild" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "containment": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "containment", + "index", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "ReplaceChild": { + "properties": { + "messageKind": { + "const": "ReplaceChild" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newChild": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "containment": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newChild", + "containment", + "index", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "MoveChildFromOtherContainment": { + "properties": { + "messageKind": { + "const": "MoveChildFromOtherContainment" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newContainment": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newContainment", + "newIndex", + "movedChild", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "MoveChildFromOtherContainmentInSameParent": { + "properties": { + "messageKind": { + "const": "MoveChildFromOtherContainmentInSameParent" + }, + "newContainment": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newContainment", + "newIndex", + "movedChild", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "MoveChildInSameContainment": { + "properties": { + "messageKind": { + "const": "MoveChildInSameContainment" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newIndex", + "movedChild", + "commandId" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "MoveAndReplaceChildFromOtherContainment": { + "properties": { + "messageKind": { + "const": "MoveAndReplaceChildFromOtherContainment" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newContainment": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newContainment", + "newIndex", + "movedChild", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "MoveAndReplaceChildFromOtherContainmentInSameParent": { + "properties": { + "messageKind": { + "const": "MoveAndReplaceChildFromOtherContainmentInSameParent" + }, + "newContainment": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newContainment", + "newIndex", + "movedChild", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "MoveAndReplaceChildInSameContainment": { + "properties": { + "messageKind": { + "const": "MoveAndReplaceChildInSameContainment" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newIndex", + "movedChild", + "commandId" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "AddAnnotation": { + "properties": { + "messageKind": { + "const": "AddAnnotation" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newAnnotation": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "index": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newAnnotation", + "index", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "DeleteAnnotation": { + "properties": { + "messageKind": { + "const": "DeleteAnnotation" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "index": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "index", + "commandId" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "ReplaceAnnotation": { + "properties": { + "messageKind": { + "const": "ReplaceAnnotation" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newAnnotation": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "index": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newAnnotation", + "index", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "MoveAnnotationFromOtherParent": { + "properties": { + "messageKind": { + "const": "MoveAnnotationFromOtherParent" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedAnnotation": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newIndex", + "movedAnnotation", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "MoveAnnotationInSameParent": { + "properties": { + "messageKind": { + "const": "MoveAnnotationInSameParent" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedAnnotation": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newIndex", + "movedAnnotation", + "commandId" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "MoveAndReplaceAnnotationFromOtherParent": { + "properties": { + "messageKind": { + "const": "MoveAndReplaceAnnotationFromOtherParent" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedAnnotation": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newIndex", + "movedAnnotation", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "MoveAndReplaceAnnotationInSameParent": { + "properties": { + "messageKind": { + "const": "MoveAndReplaceAnnotationInSameParent" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedAnnotation": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newIndex", + "movedAnnotation", + "commandId" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "AddReference": { + "properties": { + "messageKind": { + "const": "AddReference" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newTarget": { + "$ref": "#/$defs/optionalTargetNode" + }, + "newResolveInfo": { + "$ref": "#/$defs/optionalResolveInfo" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newTarget", + "newResolveInfo", + "commandId" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 8 + }, + "DeleteReference": { + "properties": { + "messageKind": { + "const": "DeleteReference" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "ChangeReference": { + "properties": { + "messageKind": { + "const": "ChangeReference" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newTarget": { + "$ref": "#/$defs/optionalTargetNode" + }, + "newResolveInfo": { + "$ref": "#/$defs/optionalResolveInfo" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newTarget", + "newResolveInfo", + "commandId" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 8 + }, + "MoveEntryFromOtherReference": { + "properties": { + "messageKind": { + "const": "MoveEntryFromOtherReference" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newReference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "oldParent": { + "$ref": "#/$defs/targetNode" + }, + "oldReference": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newReference", + "newIndex", + "oldParent", + "oldReference", + "oldIndex", + "commandId" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "MoveEntryFromOtherReferenceInSameParent": { + "properties": { + "messageKind": { + "const": "MoveEntryFromOtherReferenceInSameParent" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newReference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "oldReference": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newReference", + "newIndex", + "oldReference", + "oldIndex", + "commandId" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 8 + }, + "MoveEntryInSameReference": { + "properties": { + "messageKind": { + "const": "MoveEntryInSameReference" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "newIndex", + "oldIndex", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "MoveAndReplaceEntryFromOtherReference": { + "properties": { + "messageKind": { + "const": "MoveAndReplaceEntryFromOtherReference" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newReference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "oldParent": { + "$ref": "#/$defs/targetNode" + }, + "oldReference": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newReference", + "newIndex", + "oldParent", + "oldReference", + "oldIndex", + "commandId" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "MoveAndReplaceEntryFromOtherReferenceInSameParent": { + "properties": { + "messageKind": { + "const": "MoveAndReplaceEntryFromOtherReferenceInSameParent" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newReference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "oldReference": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newReference", + "newIndex", + "oldReference", + "oldIndex", + "commandId" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 8 + }, + "MoveAndReplaceEntryInSameReference": { + "properties": { + "messageKind": { + "const": "MoveAndReplaceEntryInSameReference" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "newIndex", + "oldIndex", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "AddReferenceResolveInfo": { + "properties": { + "messageKind": { + "const": "AddReferenceResolveInfo" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newResolveInfo", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "DeleteReferenceResolveInfo": { + "properties": { + "messageKind": { + "const": "DeleteReferenceResolveInfo" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "ChangeReferenceResolveInfo": { + "properties": { + "messageKind": { + "const": "ChangeReferenceResolveInfo" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newResolveInfo", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "AddReferenceTarget": { + "properties": { + "messageKind": { + "const": "AddReferenceTarget" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newTarget": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newTarget", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "DeleteReferenceTarget": { + "properties": { + "messageKind": { + "const": "DeleteReferenceTarget" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "commandId" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + }, + "ChangeReferenceTarget": { + "properties": { + "messageKind": { + "const": "ChangeReferenceTarget" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newTarget": { + "$ref": "#/$defs/targetNode" + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newTarget", + "commandId" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "CompositeCommand": { + "properties": { + "messageKind": { + "const": "CompositeCommand" + }, + "parts": { + "type": "array", + "items": { + "$ref": "#/$defs/Commands" + } + }, + "commandId": { + "$ref": "#/$defs/commandId" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parts", + "commandId" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "Events": { + "anyOf": [ + { + "$ref": "#/$defs/PartitionAdded" + }, + { + "$ref": "#/$defs/PartitionDeleted" + }, + { + "$ref": "#/$defs/ClassifierChanged" + }, + { + "$ref": "#/$defs/PropertyAdded" + }, + { + "$ref": "#/$defs/PropertyDeleted" + }, + { + "$ref": "#/$defs/PropertyChanged" + }, + { + "$ref": "#/$defs/ChildAdded" + }, + { + "$ref": "#/$defs/ChildDeleted" + }, + { + "$ref": "#/$defs/ChildReplaced" + }, + { + "$ref": "#/$defs/ChildMovedFromOtherContainment" + }, + { + "$ref": "#/$defs/ChildMovedFromOtherContainmentInSameParent" + }, + { + "$ref": "#/$defs/ChildMovedInSameContainment" + }, + { + "$ref": "#/$defs/ChildMovedAndReplacedFromOtherContainment" + }, + { + "$ref": "#/$defs/ChildMovedAndReplacedFromOtherContainmentInSameParent" + }, + { + "$ref": "#/$defs/ChildMovedAndReplacedInSameContainment" + }, + { + "$ref": "#/$defs/AnnotationAdded" + }, + { + "$ref": "#/$defs/AnnotationDeleted" + }, + { + "$ref": "#/$defs/AnnotationReplaced" + }, + { + "$ref": "#/$defs/AnnotationMovedFromOtherParent" + }, + { + "$ref": "#/$defs/AnnotationMovedInSameParent" + }, + { + "$ref": "#/$defs/AnnotationMovedAndReplacedFromOtherParent" + }, + { + "$ref": "#/$defs/AnnotationMovedAndReplacedInSameParent" + }, + { + "$ref": "#/$defs/ReferenceAdded" + }, + { + "$ref": "#/$defs/ReferenceDeleted" + }, + { + "$ref": "#/$defs/ReferenceChanged" + }, + { + "$ref": "#/$defs/EntryMovedFromOtherReference" + }, + { + "$ref": "#/$defs/EntryMovedFromOtherReferenceInSameParent" + }, + { + "$ref": "#/$defs/EntryMovedInSameReference" + }, + { + "$ref": "#/$defs/EntryMovedAndReplacedFromOtherReference" + }, + { + "$ref": "#/$defs/EntryMovedAndReplacedFromOtherReferenceInSameParent" + }, + { + "$ref": "#/$defs/EntryMovedAndReplacedInSameReference" + }, + { + "$ref": "#/$defs/ReferenceResolveInfoAdded" + }, + { + "$ref": "#/$defs/ReferenceResolveInfoDeleted" + }, + { + "$ref": "#/$defs/ReferenceResolveInfoChanged" + }, + { + "$ref": "#/$defs/ReferenceTargetAdded" + }, + { + "$ref": "#/$defs/ReferenceTargetDeleted" + }, + { + "$ref": "#/$defs/ReferenceTargetChanged" + }, + { + "$ref": "#/$defs/NoOpEvent" + }, + { + "$ref": "#/$defs/CompositeEvent" + }, + { + "$ref": "#/$defs/Error" + } + ] + }, + "PartitionAdded": { + "properties": { + "messageKind": { + "const": "PartitionAdded" + }, + "newPartition": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newPartition", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "PartitionDeleted": { + "properties": { + "messageKind": { + "const": "PartitionDeleted" + }, + "deletedPartition": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "deletedPartition", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 4, + "maxProperties": 5 + }, + "ClassifierChanged": { + "properties": { + "messageKind": { + "const": "ClassifierChanged" + }, + "node": { + "$ref": "#/$defs/targetNode" + }, + "newClassifier": { + "$ref": "#/$defs/metaPointer" + }, + "oldClassifier": { + "$ref": "#/$defs/metaPointer" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "node", + "newClassifier", + "oldClassifier", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "PropertyAdded": { + "properties": { + "messageKind": { + "const": "PropertyAdded" + }, + "node": { + "$ref": "#/$defs/targetNode" + }, + "property": { + "$ref": "#/$defs/metaPointer" + }, + "newValue": { + "$ref": "#/$defs/propertyValue" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "node", + "property", + "newValue", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "PropertyDeleted": { + "properties": { + "messageKind": { + "const": "PropertyDeleted" + }, + "node": { + "$ref": "#/$defs/targetNode" + }, + "property": { + "$ref": "#/$defs/metaPointer" + }, + "oldValue": { + "$ref": "#/$defs/propertyValue" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "node", + "property", + "oldValue", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "PropertyChanged": { + "properties": { + "messageKind": { + "const": "PropertyChanged" + }, + "node": { + "$ref": "#/$defs/targetNode" + }, + "property": { + "$ref": "#/$defs/metaPointer" + }, + "oldValue": { + "$ref": "#/$defs/propertyValue" + }, + "newValue": { + "$ref": "#/$defs/propertyValue" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "node", + "property", + "oldValue", + "newValue", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 8 + }, + "ChildAdded": { + "properties": { + "messageKind": { + "const": "ChildAdded" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newChild": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "containment": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newChild", + "containment", + "index", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 8 + }, + "ChildDeleted": { + "properties": { + "messageKind": { + "const": "ChildDeleted" + }, + "deletedChild": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "containment": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "deletedChild", + "parent", + "containment", + "index", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 8 + }, + "ChildReplaced": { + "properties": { + "messageKind": { + "const": "ChildReplaced" + }, + "newChild": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "replacedChild": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "containment": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newChild", + "replacedChild", + "parent", + "containment", + "index", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "ChildMovedFromOtherContainment": { + "properties": { + "messageKind": { + "const": "ChildMovedFromOtherContainment" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newContainment": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "oldParent": { + "$ref": "#/$defs/targetNode" + }, + "oldContainment": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newContainment", + "newIndex", + "movedChild", + "oldParent", + "oldContainment", + "oldIndex", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 10, + "maxProperties": 11 + }, + "ChildMovedFromOtherContainmentInSameParent": { + "properties": { + "messageKind": { + "const": "ChildMovedFromOtherContainmentInSameParent" + }, + "newContainment": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "oldContainment": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newContainment", + "newIndex", + "movedChild", + "parent", + "oldContainment", + "oldIndex", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 9, + "maxProperties": 10 + }, + "ChildMovedInSameContainment": { + "properties": { + "messageKind": { + "const": "ChildMovedInSameContainment" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "containment": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newIndex", + "movedChild", + "parent", + "containment", + "oldIndex", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "ChildMovedAndReplacedFromOtherContainment": { + "properties": { + "messageKind": { + "const": "ChildMovedAndReplacedFromOtherContainment" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newContainment": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "oldParent": { + "$ref": "#/$defs/targetNode" + }, + "oldContainment": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "replacedChild": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newContainment", + "newIndex", + "movedChild", + "oldParent", + "oldContainment", + "oldIndex", + "replacedChild", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 11, + "maxProperties": 12 + }, + "ChildMovedAndReplacedFromOtherContainmentInSameParent": { + "properties": { + "messageKind": { + "const": "ChildMovedAndReplacedFromOtherContainmentInSameParent" + }, + "newContainment": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "oldContainment": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "replacedChild": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newContainment", + "newIndex", + "movedChild", + "parent", + "oldContainment", + "oldIndex", + "replacedChild", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 10, + "maxProperties": 11 + }, + "ChildMovedAndReplacedInSameContainment": { + "properties": { + "messageKind": { + "const": "ChildMovedAndReplacedInSameContainment" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedChild": { + "$ref": "#/$defs/targetNode" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "containment": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "replacedChild": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newIndex", + "movedChild", + "parent", + "containment", + "oldIndex", + "replacedChild", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 9, + "maxProperties": 10 + }, + "AnnotationAdded": { + "properties": { + "messageKind": { + "const": "AnnotationAdded" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newAnnotation": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "index": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newAnnotation", + "index", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "AnnotationDeleted": { + "properties": { + "messageKind": { + "const": "AnnotationDeleted" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "deletedAnnotation": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "index": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "deletedAnnotation", + "index", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 6, + "maxProperties": 7 + }, + "AnnotationReplaced": { + "properties": { + "messageKind": { + "const": "AnnotationReplaced" + }, + "newAnnotation": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "replacedAnnotation": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "index": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newAnnotation", + "replacedAnnotation", + "parent", + "index", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 8 + }, + "AnnotationMovedFromOtherParent": { + "properties": { + "messageKind": { + "const": "AnnotationMovedFromOtherParent" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedAnnotation": { + "$ref": "#/$defs/targetNode" + }, + "oldParent": { + "$ref": "#/$defs/targetNode" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newIndex", + "movedAnnotation", + "oldParent", + "oldIndex", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "AnnotationMovedInSameParent": { + "properties": { + "messageKind": { + "const": "AnnotationMovedInSameParent" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedAnnotation": { + "$ref": "#/$defs/targetNode" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newIndex", + "movedAnnotation", + "parent", + "oldIndex", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 7, + "maxProperties": 8 + }, + "AnnotationMovedAndReplacedFromOtherParent": { + "properties": { + "messageKind": { + "const": "AnnotationMovedAndReplacedFromOtherParent" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedAnnotation": { + "$ref": "#/$defs/targetNode" + }, + "oldParent": { + "$ref": "#/$defs/targetNode" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "replacedAnnotation": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newIndex", + "movedAnnotation", + "oldParent", + "oldIndex", + "replacedAnnotation", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 9, + "maxProperties": 10 + }, + "AnnotationMovedAndReplacedInSameParent": { + "properties": { + "messageKind": { + "const": "AnnotationMovedAndReplacedInSameParent" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedAnnotation": { + "$ref": "#/$defs/targetNode" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "replacedAnnotation": { + "$ref": "#/$defs/DeltaSerializationChunk" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newIndex", + "movedAnnotation", + "parent", + "oldIndex", + "replacedAnnotation", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "ReferenceAdded": { + "properties": { + "messageKind": { + "const": "ReferenceAdded" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newTarget": { + "$ref": "#/$defs/optionalTargetNode" + }, + "newResolveInfo": { + "$ref": "#/$defs/optionalResolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newTarget", + "newResolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "ReferenceDeleted": { + "properties": { + "messageKind": { + "const": "ReferenceDeleted" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "deletedTarget": { + "$ref": "#/$defs/optionalTargetNode" + }, + "deletedResolveInfo": { + "$ref": "#/$defs/optionalResolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "deletedTarget", + "deletedResolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "ReferenceChanged": { + "properties": { + "messageKind": { + "const": "ReferenceChanged" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newTarget": { + "$ref": "#/$defs/optionalTargetNode" + }, + "newResolveInfo": { + "$ref": "#/$defs/optionalResolveInfo" + }, + "replacedTarget": { + "$ref": "#/$defs/optionalTargetNode" + }, + "replacedResolveInfo": { + "$ref": "#/$defs/optionalResolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newTarget", + "newResolveInfo", + "replacedTarget", + "replacedResolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 10, + "maxProperties": 11 + }, + "EntryMovedFromOtherReference": { + "properties": { + "messageKind": { + "const": "EntryMovedFromOtherReference" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newReference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "oldParent": { + "$ref": "#/$defs/targetNode" + }, + "oldReference": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "target": { + "$ref": "#/$defs/targetNode" + }, + "resolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newReference", + "newIndex", + "oldParent", + "oldReference", + "oldIndex", + "target", + "resolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 11, + "maxProperties": 12 + }, + "EntryMovedFromOtherReferenceInSameParent": { + "properties": { + "messageKind": { + "const": "EntryMovedFromOtherReferenceInSameParent" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newReference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "oldReference": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "target": { + "$ref": "#/$defs/targetNode" + }, + "resolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newReference", + "newIndex", + "oldReference", + "oldIndex", + "target", + "resolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 10, + "maxProperties": 11 + }, + "EntryMovedInSameReference": { + "properties": { + "messageKind": { + "const": "EntryMovedInSameReference" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "target": { + "$ref": "#/$defs/targetNode" + }, + "resolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "newIndex", + "oldIndex", + "target", + "resolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 9, + "maxProperties": 10 + }, + "EntryMovedAndReplacedFromOtherReference": { + "properties": { + "messageKind": { + "const": "EntryMovedAndReplacedFromOtherReference" + }, + "newParent": { + "$ref": "#/$defs/targetNode" + }, + "newReference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedTarget": { + "$ref": "#/$defs/targetNode" + }, + "movedResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "oldParent": { + "$ref": "#/$defs/targetNode" + }, + "oldReference": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "replacedTarget": { + "$ref": "#/$defs/targetNode" + }, + "replacedResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "newParent", + "newReference", + "newIndex", + "movedTarget", + "movedResolveInfo", + "oldParent", + "oldReference", + "oldIndex", + "replacedTarget", + "replacedResolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 13, + "maxProperties": 14 + }, + "EntryMovedAndReplacedFromOtherReferenceInSameParent": { + "properties": { + "messageKind": { + "const": "EntryMovedAndReplacedFromOtherReferenceInSameParent" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "newReference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedTarget": { + "$ref": "#/$defs/targetNode" + }, + "movedResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "oldReference": { + "$ref": "#/$defs/metaPointer" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "replacedTarget": { + "$ref": "#/$defs/targetNode" + }, + "replacedResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "newReference", + "newIndex", + "movedTarget", + "movedResolveInfo", + "oldReference", + "oldIndex", + "replacedTarget", + "replacedResolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 12, + "maxProperties": 13 + }, + "EntryMovedAndReplacedInSameReference": { + "properties": { + "messageKind": { + "const": "EntryMovedAndReplacedInSameReference" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "newIndex": { + "$ref": "#/$defs/index" + }, + "movedTarget": { + "$ref": "#/$defs/targetNode" + }, + "movedResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "oldIndex": { + "$ref": "#/$defs/index" + }, + "replacedTarget": { + "$ref": "#/$defs/targetNode" + }, + "replacedResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "newIndex", + "movedTarget", + "movedResolveInfo", + "oldIndex", + "replacedTarget", + "replacedResolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 11, + "maxProperties": 12 + }, + "ReferenceResolveInfoAdded": { + "properties": { + "messageKind": { + "const": "ReferenceResolveInfoAdded" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "target": { + "$ref": "#/$defs/targetNode" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newResolveInfo", + "target", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "ReferenceResolveInfoDeleted": { + "properties": { + "messageKind": { + "const": "ReferenceResolveInfoDeleted" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "target": { + "$ref": "#/$defs/targetNode" + }, + "deletedResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "target", + "deletedResolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "ReferenceResolveInfoChanged": { + "properties": { + "messageKind": { + "const": "ReferenceResolveInfoChanged" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "target": { + "$ref": "#/$defs/optionalTargetNode" + }, + "replacedResolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newResolveInfo", + "target", + "replacedResolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 9, + "maxProperties": 10 + }, + "ReferenceTargetAdded": { + "properties": { + "messageKind": { + "const": "ReferenceTargetAdded" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newTarget": { + "$ref": "#/$defs/targetNode" + }, + "resolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newTarget", + "resolveInfo", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "ReferenceTargetDeleted": { + "properties": { + "messageKind": { + "const": "ReferenceTargetDeleted" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "resolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "deletedTarget": { + "$ref": "#/$defs/targetNode" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "resolveInfo", + "deletedTarget", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 8, + "maxProperties": 9 + }, + "ReferenceTargetChanged": { + "properties": { + "messageKind": { + "const": "ReferenceTargetChanged" + }, + "parent": { + "$ref": "#/$defs/targetNode" + }, + "reference": { + "$ref": "#/$defs/metaPointer" + }, + "index": { + "$ref": "#/$defs/index" + }, + "newTarget": { + "$ref": "#/$defs/targetNode" + }, + "resolveInfo": { + "$ref": "#/$defs/resolveInfo" + }, + "replacedTarget": { + "$ref": "#/$defs/targetNode" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parent", + "reference", + "index", + "newTarget", + "resolveInfo", + "replacedTarget", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 9, + "maxProperties": 10 + }, + "CompositeEvent": { + "properties": { + "messageKind": { + "const": "CompositeEvent" + }, + "parts": { + "type": "array", + "items": { + "$ref": "#/$defs/Events" + } + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "parts" + ], + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 3 + }, + "NoOpEvent": { + "properties": { + "messageKind": { + "const": "NoOpEvent" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 3, + "maxProperties": 4 + }, + "Error": { + "properties": { + "messageKind": { + "const": "Error" + }, + "errorCode": { + "$ref": "#/$defs/errorCode" + }, + "message": { + "type": "string" + }, + "originCommands": { + "$ref": "#/$defs/commandSources" + }, + "sequenceNumber": { + "$ref": "#/$defs/eventSequenceNumber" + }, + "protocolMessage": { + "$ref": "#/$defs/ProtocolMessage" + } + }, + "required": [ + "messageKind", + "errorCode", + "message", + "originCommands", + "sequenceNumber" + ], + "additionalProperties": false, + "minProperties": 5, + "maxProperties": 6 + } + } +} \ No newline at end of file diff --git a/delta/description.adoc b/delta/description.adoc new file mode 100644 index 0000000..b30761d --- /dev/null +++ b/delta/description.adoc @@ -0,0 +1,82 @@ +[[description]] +== Description +[[client, client]] +=== Client characteristics +A client is a program connecting to a repository. +Each client has exactly one <> with one repository at one point in time. +The same client can have several consecutive participations with the same repository, but never at the same time. +A client might interact with several repositories, but they are completely independent (i.e. same as two clients connecting to two repositories).{fn-org337} + +The client has the responsibility to guarantee uniqueness of <> and <> within the same participation. + +Authentication and authorization are out of scope of this API. + +[[channel, channel]] +=== Channel characteristics +Logically, the channel has independent parts for each <> of message; +in practice, we might transmit some or all of them through a shared channel. + +This protocol is agnostic of its underlying technical implementation. +We can use any (e.g. stateless, stateful) protocol, as long as it fulfills request/response characteristics for client-initiated query, command, and participation messages, and repository-initiated broadcast characteristics for event messages. + +We assume the underlying protocol handles quality of service concerns (i.e. guaranteed one-time complete delivery of messages), they are out of scope of this API. + +[[participation, participation]] +=== Participation characteristics +Each participation has a _[[participation-id, participation id]]participation id_, unique for all concurrent participations. +The repository assigns the participation id upon starting a new participation. +The participation id MUST follow the same format as <<{m3}.adoc#identifiers, identifier>>. +It serves as a technical identifier. + +A participation is transparent for reconnecting network connections,i.e. one participation can survive potential technical reconnects. +A participation spans over time: if we would e.g. used REST, a participation spans over several REST requests/responses. + +A participation <> by the client connecting to the repository via delta protocol. +A participation ends either by the <> it, or if the client disconnects involuntarily (e.g. by crashing or a connection failure). + +A client can try to <> a participation if the client still knows a previously valid participation id, and the last <> the client received.{fn-org349} + +[[event-sequence-number, event sequence number]] +=== Event sequence numbers +Each event contains a sequence number.{fn-org341} +This number is a positive integer that increments by one for each consecutive event. +It is unique per participation.{fn-org343} + +A <> SHOULD use this number to order incoming events, and check whether the client missed any event. + +[[subscription, subscription]] +=== Subscription characteristics +The subscription, or subscription scope, is the set of partitions a <> gets events for. +A subscription does not have an identity on its own; it is bound to one participation. + +Scope is defined by the node id of a <<{m3}.adoc#partition, partition>>; it includes all changes to the partition and all its descendants (including annotation instances).{fn-org269} + +At the start of a participation, the subscription scope is empty. +A client can change its subscription scope by <>, or <> / <> a specific partition. +A client can change the subscription scope at any time during a participation. + +A client can send commands for any node id, independent of the client's subscription. +Assume a client sends a command for a node that's part of a partition that client is not subscribed to. +The repository treats that command the same as from a client that was subscribed to the containing partition, i.e. applies it in accordance with the repository's policy. +The repository also sends out the same events to subscribed clients, thus _not_ to the sending client.{fn-org352} + +=== Message characteristics +Each message is atomic; it cannot be split. + +Each message has some id unique to the <>: + +* Queries have a _query id_. +* Commands have a _command id_.{fn-org305} +* Events have _command sources_.{fn-org306} + +Each message optionally can have one _[[protocolMessage, protocol message]]protocol message_ consisting of:{fn-org331}{fn-org332} + +* [[protocolMessage.kind]]`kind` is an <<{m3}.adoc#identifiers, identifier>>-compatible string identifying the message type. +Some message kinds are pre-defined in this specification. +A repository MAY reply with other, additional message kinds. +* [[protocolMessage.message]]`message` is a human-readable string describing the message. +* [[protocolMessage.data]]`data` is a flat map with arbitrary keys and values. +All values MUST be strings, the keys MUST be <<{m3}.adoc#identifiers, identifier>>-compatible. +A _kind_ might imply presence of specific keys in `data`. + +This protocol message is symmetric to <<{bulk}.adoc#Response.messages, messages in bulk API>>. diff --git a/delta/errors.adoc b/delta/errors.adoc new file mode 100644 index 0000000..44e3d12 --- /dev/null +++ b/delta/errors.adoc @@ -0,0 +1,63 @@ +[[errors]] +=== Errors + +[[err-invalidParticipation]] +==== Invalid participation +The <> the <> uses to communicate with the repository is not valid. + +Possible reasons: + +* The participation never has been valid. +* The client <>. +* The client <>. + +.Technical name +`invalidParticipation` + + +[[err-nodeAlreadyExists]] +==== Node already exists +Client tries to create a node with an id that already exists. + +.Technical name +`nodeAlreadyExists` + + +[[err-unknownNode]] +==== Unknown node +Client tries to operate on a node unknown to the repository. + +.Technical name +`unknownNode` + + +[[err-unknownIndex]] +==== Unknown index +Client tries to operate on an index beyond the number of existing elements. + +.Technical name +`unknownIndex` + + +[[err-moveWithoutParent]] +==== Move without parent +Client tries to move a node that doesn't have a parent. + +.Technical name +`moveWithoutParent` + + +[[err-invalidMove]] +==== Invalid move +Client tries to move a node incompatible with the emitted command. + +.Technical name +`invalidMove` + + +[[err-undefinedReferenceTarget]] +==== Undefined reference target +Client tries to set a reference with neither `target` nor `resolveInfo` + +.Technical name +`undefinedReferenceTarget` \ No newline at end of file diff --git a/delta/events.adoc b/delta/events.adoc new file mode 100644 index 0000000..12d82b2 --- /dev/null +++ b/delta/events.adoc @@ -0,0 +1,1019 @@ +[[events]] +=== Events + +[[evnt-partitions]] +==== Partitions + +[[evnt-PartitionAdded]] +===== Partition added +Partition `newPartition` has been added to the repository. + +This client is now subscribed to any changes to `newPartition` or any of its descendants. + +[horizontal] +.Parameters +newPartition:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`PartitionAdded` + +.Related command +<> + +[[evnt-PartitionDeleted]] +===== Partition deleted +Partition `deletedPartition`, and all its descendants, have been deleted from the repository. + +This client is now unsubscribed from any changes to `deletedPartition` or any of its descendants. + +[horizontal] +.Parameters +deletedPartition:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`PartitionDeleted` + +.Related command +<> + +[[evnt-nodes]] +==== Nodes + +[[evnt-ClassifierChanged]] +===== Classifier changed +Classifier of `node` has been changed from `oldClassifier` to `newClassifier`. + +[horizontal] +.Parameters +node:: <> +newClassifier:: <> +oldClassifier:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ClassifierChanged` + +.Related command +<> + +[[evnt-properties]] +==== Properties + +[[evnt-PropertyAdded]] +===== Property added +`property` of `node` has been set to `newValue`. + +[horizontal] +.Parameters +node:: <> +property:: <> +newValue:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`PropertyAdded` + +.Related command +<> + +[[evnt-PropertyDeleted]] +===== Property deleted +Existing `property` of `node` with `oldValue` has been deleted. + +[horizontal] +.Parameters +node:: <> +property:: <> +oldValue:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`PropertyDeleted` + +.Related command +<> + +[[evnt-PropertyChanged]] +===== Property changed +Existing `property` of `node` has been changed from `oldValue` to `newValue`. + +[horizontal] +.Parameters +node:: <> +property:: <> +newValue:: <> +oldValue:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`PropertyChanged` + +.Related command +<> + +[[evnt-children]] +==== Children + +[[evnt-ChildAdded]] +===== Child added +New node `newChild` has been added to ``parent``'s `containment` at `index`. +`newChild` might be a single node or an arbitrary complex subtree. +All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. +Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org326} + +All other children inside ``parent``'s `containment` with index >= `index` have been moved to next higher index. + +[horizontal] +.Parameters +parent:: <> +newChild:: <> +containment:: <> +index:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ChildAdded` + +.Related command +<> + +[[evnt-ChildDeleted]] +===== Child deleted +Existing node `deletedChild`, and all its descendants, have been deleted from ``parent``'s `containment` at `index`.{fn-org286} +All other children inside ``parent``'s `containment` with index > `index` have been moved to next lower index. + +[horizontal] +.Parameters +deletedChild:: <> +parent:: <> +containment:: <> +index:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ChildDeleted` + +.Related command +<> + +[[evnt-ChildReplaced]] +===== Child replaced +Existing node `replacedChild` inside ``parent``'s `containment` at `index` has been replaced with new node `newChild`. +`newChild` might be a single node or an arbitrary complex subtree. +All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. +Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org326} + + +`replacedChild`, and all its descendants, have been deleted. + +[horizontal] +.Parameters +newChild:: <> +replacedChild:: <> +parent:: <> +containment:: <> +index:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ChildReplaced` + +.Related command +<> + +[[evnt-ChildMovedFromOtherContainment]] +===== Child moved from other containment +Existing node `movedChild` (previously inside ``oldParent``'s `oldContainment` at `oldIndex`) has been moved +inside ``newParent``'s `newContainment` at `newIndex`. + +All other children inside ``oldParent``'s `oldContainment` with index > `oldIndex` have been moved to next lower index. + +All other children inside ``newParent``'s `newContainment` with index >= `newIndex` have been moved to next higher index. + +[horizontal] +.Parameters +newParent:: <> +newContainment:: <> +newIndex:: <> +movedChild:: <> +oldParent:: <> +oldContainment:: <> +oldIndex:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ChildMovedFromOtherContainment` + +.Related command +<> + +[[evnt-ChildMovedFromOtherContainmentInSameParent]] +===== Child moved from other containment in same parent +Existing node `movedChild` (previously inside ``parent``'s `oldContainment` at `oldIndex`) has been moved +inside ``parent``'s `newContainment` at `newIndex`. + +All other children inside ``parent``'s `oldContainment` with index > `oldIndex` have been moved to next lower index. + +All other children inside ``parent``'s `newContainment` with index >= `newIndex` have been moved to next higher index. + +[horizontal] +.Parameters +newContainment:: <> +newIndex:: <> +movedChild:: <> +parent:: <> +oldContainment:: <> +oldIndex:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ChildMovedFromOtherContainmentInSameParent` + +.Related command +<> + +[[evnt-ChildMovedInSameContainment]] +===== Child moved in same containment +Existing node `movedChild` (previously inside ``parent``'s `containment` at `oldIndex`) has been moved +inside ``parent``'s `containment` at `newIndex`. + +If `oldIndex` < `newIndex`: All other children inside ``parent``'s `containment` with previous index > `oldIndex` and previous index <= `newIndex` have been moved to next lower index. +Example: + +`oldIndex=3`: `A[0] B[1] C[2] *X[3]* D[4] E[5] F[6]` -> + +`newIndex=5`: `A[0] B[1] C[2] _D[3] E[4]_ *X[5]* F[6]` + +If `oldIndex` > `newIndex`: All other children inside ``parent``'s `containment` with previous index >= `newIndex` and previous index < `oldIndex` have been moved to next lower index. +Example: + +`oldIndex=3`: `A[0] B[1] C[2] *X[3]* D[4] E[5] F[6]` -> + +`newIndex=1`: `A[0] *X[1]* _B[2] C[3]_ D[4] E[5] F[6]` + +`oldIndex` MUST NOT be equal to `newIndex`. + +[horizontal] +.Parameters +newIndex:: <> +movedChild:: <> +parent:: <> +containment:: <> +oldIndex:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ChildMovedInSameContainment` + +.Related command +<> + +[[evnt-ChildMovedAndReplacedFromOtherContainment]] +===== Child moved from other containment and replaced existing child +Existing node `movedChild` (previously inside ``oldParent``'s `oldContainment` at `oldIndex`) has replaced the existing `replacedChild` inside ``newParent``'s `newContainment` at `newIndex`. +`replacedChild`, and all its descendants, have been deleted. + +All other children inside ``oldParent``'s `oldContainment` with index > `oldIndex` have been moved to next lower index. + +No other children inside ``newParent``'s `newContainment` have been moved. + +[horizontal] +.Parameters +newParent:: <> +newContainment:: <> +newIndex:: <> +movedChild:: <> +oldParent:: <> +oldContainment:: <> +oldIndex:: <> +replacedChild:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ChildMovedAndReplacedFromOtherContainment` + +.Related command +<> + +[[evnt-ChildMovedAndReplacedFromOtherContainmentInSameParent]] +===== Child moved from other containment in same parent and replaced existing child +Existing node `movedChild` (previously inside ``parent``'s `oldContainment` at `oldIndex`) has replaced the existing `replacedChild` inside ``parent``'s `newContainment` at `newIndex`. +`replacedChild`, and all its descendants, have been deleted. + +All other children inside ``parent``'s `oldContainment` with index > `oldIndex` have been moved to next lower index. + +No other children inside ``parent``'s `newContainment` have been moved. + +[horizontal] +.Parameters +newContainment:: <> +newIndex:: <> +movedChild:: <> +parent:: <> +oldContainment:: <> +oldIndex:: <> +replacedChild:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ChildMovedAndReplacedFromOtherContainmentInSameParent` + +.Related command +<> + +[[evnt-ChildMovedAndReplacedInSameContainment]] +===== Child moved in same containment and replaced existing child +Existing node `movedChild` (previously inside ``parent``'s `containment` at `oldIndex`) has replaced the existing `replacedChild` inside ``parent``'s `containment` at `newIndex`. +`replacedChild`, and all its descendants, have been deleted. + +If `oldIndex` < `newIndex`: All other children inside ``parent``'s `containment` with previous index > `oldIndex` have been moved to next lower index. +Example: + +`oldIndex=3`: `A[0] B[1] C[2] *X[3]* D[4] E[5] F[6] G[7]` -> + +`newIndex=5`: `A[0] B[1] C[2] _D[3] E[4]_ *X[5]* _G[6]_` + +If `oldIndex` > `newIndex`: All other children inside ``parent``'s `containment` with previous index >= `oldIndex` have been moved to next lower index. +Example: + +`oldIndex=4`: `A[0] B[1] C[2] D[3] *X[4]* E[5] F[6]` -> + +`newIndex=1`: `A[0] *X[1]* C[2] D[3] _E[4] F[5]_` + +`oldIndex` MUST NOT be equal to `newIndex`. + +[horizontal] +.Parameters +newIndex:: <> +movedChild:: <> +parent:: <> +containment:: <> +oldIndex:: <> +replacedChild:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ChildMovedAndReplacedInSameContainment` + +.Related command +<> + +[[evnt-annotations]] +==== Annotations + +[[evnt-AnnotationAdded]] +===== Annotation added +New node `newAnnotation` has been added to ``parent``'s annotations at `index`. +`newAnnotation` might be a single node or an arbitrary complex subtree. +All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. +Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org326} + +All other annotations inside ``parent``'s annotations with index >= `index` have been moved to next higher index. + +[horizontal] +.Parameters +parent:: <> +newAnnotation:: <> +index:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`AnnotationAdded` + +.Related command +<> + +[[evnt-AnnotationDeleted]] +===== Annotation deleted +Existing node `deletedAnnotation`, and all its descendants, have been deleted from ``parent``'s annotations at `index`.{fn-org286} +All other annotations inside ``parent``'s annotations with index > `index` have been moved to next lower index. + +[horizontal] +.Parameters +deletedAnnotation:: <> +parent:: <> +index:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`AnnotationDeleted` + +.Related command +<> + +[[evnt-AnnotationReplaced]] +===== Annotation replaced +Existing node `replacedAnnotation` inside ``parent``'s annotations at `index` has been replaced with new node `newAnnotation`. +`newAnnotation` might be a single node or an arbitrary complex subtree. +All nodes in that subtree MUST be new, i.e. their id MUST NOT exist in the repository. +Nodes in that subtree MAY have references to already existing nodes, and already existing nodes MAY have references to nodes in that subtree.{fn-org326} + +`replacedAnnotation`, and all its descendants, have been deleted. + +[horizontal] +.Parameters +newAnnotation:: <> +replacedAnnotation:: <> +parent:: <> +index:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`AnnotationReplaced` + +.Related command +<> + +[[evnt-AnnotationMovedFromOtherParent]] +===== Annotation moved from other parent +Existing node `movedAnnotation` (previously inside ``oldParent``'s annotations at `oldIndex`) has been moved +inside ``newParent``'s annotations at `newIndex`. + +All other annotations inside ``oldParent``'s annotations with index > `oldIndex` have been moved to next lower index. + +All other annotations inside ``newParent``'s annotations with index >= `newIndex` have been moved to next higher index. + +[horizontal] +.Parameters +newParent:: <> +newIndex:: <> +movedAnnotation:: <> +oldParent:: <> +oldIndex:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`AnnotationMovedFromOtherParent` + +.Related command +<> + +[[evnt-AnnotationMovedInSameParent]] +===== Annotation moved in same parent +Existing node `movedAnnotation` (previously inside ``parent``'s annotations at `oldIndex`) has been moved +inside ``parent``'s annotations at `newIndex`. + +If `oldIndex` < `newIndex`: All other annotations inside ``parent``'s annotations with previous index > `oldIndex` and previous index <= `newIndex` have been moved to next lower index. +Example: + +`oldIndex=3`: `A[0] B[1] C[2] *X[3]* D[4] E[5] F[6]` -> + +`newIndex=5`: `A[0] B[1] C[2] _D[3] E[4]_ *X[5]* F[6]` + +If `oldIndex` > `newIndex`: All other annotations inside ``parent``'s annotations with previous index >= `newIndex` and previous index < `oldIndex` have been moved to next lower index. +Example: + +`oldIndex=3`: `A[0] B[1] C[2] *X[3]* D[4] E[5] F[6]` -> + +`newIndex=1`: `A[0] *X[1]* _B[2] C[3]_ D[4] E[5] F[6]` + +`oldIndex` MUST NOT be equal to `newIndex`. + +[horizontal] +.Parameters +newIndex:: <> +movedAnnotation:: <> +parent:: <> +oldIndex:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`AnnotationMovedInSameParent` + +.Related command +<> + +[[evnt-AnnotationMovedAndReplacedFromOtherParent]] +===== Annotation moved from other parent and replaced existing annotation +Existing node `movedAnnotation` (previously inside ``oldParent``'s annotations at `oldIndex`) has replaced the existing `replacedAnnotation` inside ``newParent``'s annotations at `newIndex`. +`replacedAnnotation`, and all its descendants, have been deleted. + +All other annotations inside ``oldParent``'s annotations with index > `oldIndex` have been moved to next lower index. + +No other annotations inside ``newParent``'s annotations have been moved. + +[horizontal] +.Parameters +newParent:: <> +newIndex:: <> +movedAnnotation:: <> +oldParent:: <> +oldIndex:: <> +replacedAnnotation:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`AnnotationMovedAndReplacedFromOtherParent` + +.Related command +<> + +[[evnt-AnnotationMovedAndReplacedInSameParent]] +===== Annotation moved in same parent and replaced existing annotation +Existing node `movedAnnotation` (previously inside ``parent``'s annotations at `oldIndex`) has replaced the existing `replacedAnnotation` inside ``parent``'s annotations at `newIndex`. +`replacedAnnotation`, and all its descendants, have been deleted. + +If `oldIndex` < `newIndex`: All other annotations inside ``parent``'s `containment` with previous index > `oldIndex` have been moved to next lower index. +Example: + +`oldIndex=3`: `A[0] B[1] C[2] *X[3]* D[4] E[5] F[6] G[7]` -> + +`newIndex=5`: `A[0] B[1] C[2] _D[3] E[4]_ *X[5]* _G[6]_` + +If `oldIndex` > `newIndex`: All other annotations inside ``parent``'s `containment` with previous index >= `oldIndex` have been moved to next lower index. +Example: + +`oldIndex=4`: `A[0] B[1] C[2] D[3] *X[4]* E[5] F[6]` -> + +`newIndex=1`: `A[0] *X[1]* C[2] D[3] _E[4] F[5]_` + +`oldIndex` MUST NOT be equal to `newIndex`. + +[horizontal] +.Parameters +newIndex:: <> +movedAnnotation:: <> +parent:: <> +oldIndex:: <> +replacedAnnotation:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`AnnotationMovedAndReplacedInSameParent` + +.Related command +<> + +[[evnt-references]] +==== References + +[[evnt-ReferenceAdded]] +===== Reference added +Reference with `newTarget`/`newResolveInfo` has been added to ``parent``'s `reference` at `index`. +All other entries inside ``parent``'s `reference` with index >= `index` have been moved to next higher index. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newTarget:: <>? +newResolveInfo:: <>? +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ReferenceAdded` + +.Related command +<> + +[[evnt-ReferenceDeleted]] +===== Reference deleted +Existing reference with `deletedTarget`/`deletedResolveInfo` has been deleted from ``parent``'s `reference` at `index`. +All other entries inside ``parent``'s `reference` with index > `index` have been moved to next lower index. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +deletedTarget:: <> +deletedResolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ReferenceDeleted` + +.Related command +<> + +[[evnt-ReferenceChanged]] +===== Reference changed +Existing reference with `replacedTarget`/`replacedResolveInfo` inside ``parent``'s annotations at `index` has been replaced with `newTarget`/`newResolveInfo`. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newTarget:: <>? +newResolveInfo:: <>? +replacedTarget:: <> +replacedResolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ReferenceChanged` + +.Related command +<> + +[[evnt-EntryMovedFromOtherReference]] +===== Entry moved from other reference +Existing reference `target`/`resolveInfo` (previously inside ``oldParent``'s `oldReference` at `oldIndex`) has been moved +to ``newParent``'s `newReference` at `newIndex`. + +All other entries inside ``oldParent``'s `oldReference` with index > `oldIndex` have been moved to next lower index. + +All other entries inside ``newParent``'s `newReference` with index >= `newIndex` have been moved to next higher index. + +[horizontal] +.Parameters +newParent:: <> +newReference:: <> +newIndex:: <> +oldParent:: <> +oldReference:: <> +oldIndex:: <> +target:: <> +resolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`EntryMovedFromOtherReference` + +.Related command +<> + +[[evnt-EntryMovedFromOtherReferenceInSameParent]] +===== Entry moved from other reference in same parent +Existing reference `target`/`resolveInfo` (previously inside ``parent``'s `oldReference` at `oldIndex`) has been moved +to ``parent``'s `newReference` at `newIndex`. + +All other entries inside ``parent``'s `oldReference` with index > `oldIndex` have been moved to next lower index. + +All other entries inside ``parent``'s `newReference` with index >= `newIndex` have been moved to next higher index. + +[horizontal] +.Parameters +parent:: <> +newReference:: <> +newIndex:: <> +oldReference:: <> +oldIndex:: <> +target:: <> +resolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`EntryMovedFromOtherReferenceInSameParent` + +.Related command +<> + +[[evnt-EntryMovedInSameReference]] +===== Entry moved in same reference +Existing reference `target`/`resolveInfo` (previously inside ``parent``'s `reference` at `oldIndex`) has been moved +to ``parent``'s `reference` at `newIndex`. + +If `oldIndex` < `newIndex`: All other entries inside ``parent``'s `reference` with previous index > `oldIndex` and previous index <= `newIndex` have been moved to next lower index. +Example: + +`oldIndex=3`: `A[0] B[1] C[2] *X[3]* D[4] E[5] F[6]` -> + +`newIndex=5`: `A[0] B[1] C[2] _D[3] E[4]_ *X[5]* F[6]` + +If `oldIndex` > `newIndex`: All other entries inside ``parent``'s `reference` with previous index >= `newIndex` and previous index < `oldIndex` have been moved to next lower index. +Example: + +`oldIndex=3`: `A[0] B[1] C[2] *X[3]* D[4] E[5] F[6]` -> + +`newIndex=1`: `A[0] *X[1]* _B[2] C[3]_ D[4] E[5] F[6]` + +`oldIndex` MUST NOT be equal to `newIndex`. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +oldIndex:: <> +newIndex:: <> +target:: <> +resolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`EntryMovedInSameReference` + +.Related command +<> + +[[evnt-EntryMovedAndReplacedFromOtherReference]] +===== Entry moved from other reference and replaced existing entry +Existing reference `movedTarget`/`movedResolveInfo` (previously inside ``oldParent``'s `oldReference` at `oldIndex`) has replaced existing `replacedTarget`/`replacedResolveInfo` at ``newParent``'s `newReference` at `newIndex`. + +All other entries inside ``oldParent``'s `oldReference` with index > `oldIndex` have been moved to next lower index. + +No other entries inside ``newParent``'s `newReference` have been moved. + +[horizontal] +.Parameters +newParent:: <> +newReference:: <> +newIndex:: <> +movedTarget:: <> +movedResolveInfo:: <> +oldParent:: <> +oldReference:: <> +oldIndex:: <> +replacedTarget:: <> +replacedResolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`EntryMovedAndReplacedFromOtherReference` + +.Related command +<> + +[[evnt-EntryMovedAndReplacedFromOtherReferenceInSameParent]] +===== Entry moved from other reference in same parent and replaced existing entry +Existing reference `movedTarget`/`movedResolveInfo` (previously inside ``parent``'s `oldReference` at `oldIndex`) has replaced existing `replacedTarget`/`replacedResolveInfo` at ``parent``'s `newReference` at `newIndex`. + +All other entries inside ``parent``'s `oldReference` with index > `oldIndex` have been moved to next lower index. + +No other entries inside ``parent``'s `newReference` have been moved. + +[horizontal] +.Parameters +parent:: <> +newReference:: <> +newIndex:: <> +movedTarget:: <> +movedResolveInfo:: <> +oldReference:: <> +oldIndex:: <> +replacedTarget:: <> +replacedResolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`EntryMovedAndReplacedFromOtherReferenceInSameParent` + +.Related command +<> + +[[evnt-EntryMovedAndReplacedInSameReference]] +===== Entry moved in same reference and replaced existing entry +Existing reference `movedTarget`/`movedResolveInfo` (previously inside ``parent``'s `reference` at `oldIndex`) has replaced existing `replacedTarget`/`replacedResolveInfo` at ``parent``'s `reference` at `newIndex`. + +If `oldIndex` < `newIndex`: All other entries inside ``parent``'s `containment` with previous index > `oldIndex` have been moved to next lower index. +Example: + +`oldIndex=3`: `A[0] B[1] C[2] *X[3]* D[4] E[5] F[6] G[7]` -> + +`newIndex=5`: `A[0] B[1] C[2] _D[3] E[4]_ *X[5]* _G[6]_` + +If `oldIndex` > `newIndex`: All other entries inside ``parent``'s `containment` with previous index >= `oldIndex` have been moved to next lower index. +Example: + +`oldIndex=4`: `A[0] B[1] C[2] D[3] *X[4]* E[5] F[6]` -> + +`newIndex=1`: `A[0] *X[1]* C[2] D[3] _E[4] F[5]_` + +`oldIndex` MUST NOT be equal to `newIndex`. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +newIndex:: <> +movedTarget:: <> +movedResolveInfo:: <> +oldIndex:: <> +replacedTarget:: <> +replacedResolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`EntryMovedAndReplacedInSameReference` + +.Related command +<> + +[[evnt-ReferenceResolveInfoAdded]] +===== Reference ResolveInfo added +`newResolveInfo` has been added as ResolveInfo to existing entry inside ``parent``'s `reference` at `index` with `target`. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newResolveInfo:: <> +target:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ReferenceResolveInfoAdded` + +.Related command +<> + +[[evnt-ReferenceResolveInfoDeleted]] +===== Reference ResolveInfo deleted +ResolveInfo `deletedResolveInfo` has been deleted from existing entry inside ``parent``'s `reference` at `index` with `target`. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +target:: <> +deletedResolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ReferenceResolveInfoDeleted` + +.Related command +<> + +[[evnt-ReferenceResolveInfoChanged]] +===== Reference ResolveInfo changed +ResolveInfo of existing entry inside ``parent``'s `reference` at `index` with `target` has been changed from `oldResolveInfo` to `newResolveInfo`. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newResolveInfo:: <> +target:: <>? +replacedResolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ReferenceResolveInfoChanged` + +.Related command +<> + +[[evnt-ReferenceTargetAdded]] +===== Reference target added +`newTarget` has been added as target to existing entry inside ``parent``'s `reference` at `index` with `resolveInfo`. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newTarget:: <> +resolveInfo:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ReferenceTargetAdded` + +.Related command +<> + +[[evnt-ReferenceTargetDeleted]] +===== Reference target deleted +Target `deletedTarget` has been deleted from existing entry inside ``parent``'s `reference` at `index` with `resolveInfo`. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +resolveInfo:: <> +deletedTarget:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ReferenceTargetDeleted` + +.Related command +<> + +[[evnt-ReferenceTargetChanged]] +===== Reference target changed +Target of existing entry inside ``parent``'s `reference` at `index` with `resolveInfo` has been changed from `oldTarget` to `newTarget`. + +[horizontal] +.Parameters +parent:: <> +reference:: <> +index:: <> +newTarget:: <> +resolveInfo:: <>? +replacedTarget:: <> +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`ReferenceTargetChanged` + +.Related command +<> + +[[evnt-miscellaneous]] +==== Miscellaneous + +[[evnt-Composite]] +[[evnt-CompositeEvent]] +===== Composite +The events in `parts` have happened in the given order.{fn-org281} + +All `originCommands` have been handled (maybe by discarding them). + +Composite events don't mention origin commands on their own; they are only mentioned in each part.{fn-org306} +We can nest composite events arbitrarily.{fn-org360} + +[horizontal] +.Parameters +parts:: <>[] +protocolMessage:: <> + +.Technical name +`Composite` + +.Related command +<> + +[[evnt-NoOp]] +[[evnt-NoOpEvent]] +===== No-op +Nothing happened as result of one or more command(s).{fn-org314} + +[horizontal] +.Parameters +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`NoOpEvent` + +.Related command +_none_ + +[[evnt-Error]] +===== Error +Repository couldn't handle one or more command(s).{fn-org316} + +[horizontal] +.Parameters +errorCode:: `String` +message:: `String` +originCommands:: <>[] +sequenceNumber:: <> +protocolMessage:: <> + +.Technical name +`Error` + +.Related command +_none_ \ No newline at end of file diff --git a/delta/introduction.adoc b/delta/introduction.adoc new file mode 100644 index 0000000..df00d13 --- /dev/null +++ b/delta/introduction.adoc @@ -0,0 +1,150 @@ +[[introduction]] +== Introduction +Delta API assumes a bidirectional communication channel. +The _client_ initiates the channel with the _repository_ to open a _participation_{fn-org337}. +Both parties communicate through the established channel via _messages_. + +Delta API supports these message kinds, loosely following CQRS patternfootnote:[https://en.wikipedia.org/wiki/Command_Query_Responsibility_Segregation]{fn-org291}: + +* <> initiated/requested by the client, with synchronous response by the repository. +A query requests some information from the repository without changing the repository's contents. +The repository gathers all information needed to answer the query, and sends the information back. +The repository might reply invalid queries with a failure message. +We also use queries for managing <>.{fn-org350} + +* <> initiated/requested by the client, with synchronous response by the repository. +A command requests some change to the repository. +The repository quickly confirms having _received_ the command, or rejects a _failed_ command.{fn-org298} +However, the repository processes the command asynchronously, and eventually broadcasts the effect(s) as _event_. + +* <> initiated/broadcast by the repository, without response by the client. +An event describes some change that has been applied to the repository's contents. +Events correlate to their originating command(s){fn-org306}; this command might have been sent by this client or another client.{fn-org299} +All clients receive the same events (given the same subscription scope and disregarding <>). + +A client describes the interesting part of the repository's contents by specifying its <>. +The client receives only events on nodes within that scope. + +A typical workflow for a client would be: + +1. Client connects to repository and starts a participation. +2. Client subscribes to some partitions with subscription queries. +The response contains a <<{serialization}.adoc#SerializationChunk, serialization chunk>> with the current contents of these partitions. +3. Client initiates its editor or processing with the chunk. +4. Client sends commands to request changes to some nodes in the subscribed partitions. +5. Client receives events with the actual changes that have been applied to the subscribed nodes. +6. Client updates its editor or processing with the event's contents. +7. Client receives events originating from other clients' commands. +8. Client updates its editor or processing with the event's contents. +9. Client ends the participation. + +The repository is always the ultimate arbiter of its contents.{fn-org339} +It can decide to apply each command verbatim, with some tweaks (e.g. because of concurrent changes), or not at all (e.g. because the command would introduce containment loops). + +Each repository might introduce its own strategy how to handle commands.{fn-org291} +For example, assume client 1 sends a `deleteChild` command to delete node `X`, and then client 2 sends a `setProperty` command on node `X`. + +* Repository A applies all commands in order, thus deletes node `X` and ignores the second command. +It emits one `childDeleted` event, correlated to both commands. +* Repository B keeps an internal "trash can" of all deleted nodes. +It deletes node `X` on the first command, but resurrects node `X` on the second command and changes the property as requested. +It first emits a `childDeleted` event (correlated to the first command), but later `childAdded` and `propertyChanged` events (both correlated to the second command). +* Repository C batches command processing. +It looks at both messages together, and decides it's more important to keep the new property value around. +It emits one `propertyChanged` event, correlated with both commands. + +A client stays up-to-date with the repository's contents if it applies all events in order.{fn-org297} +The order is defined by the event's sequence number.{fn-org341} +A client can either decide to apply its own change immediately and filter out events based on that command, or wait for the correlated event to arrive and apply the change only then. + +=== Command overview + +We specified the semantics of each command and event precisely, leading to lots of similar, but different commands/events.{fn-org317} + +This table provides an overview of actions (rows) and element they apply to (columns). + +[cols="2,3,3,3,1,1"] +|=== +|Action |Child |Annotation |Reference |Property |Partition / Classifier + +|Add +|<> +|<> +| +<> + +<> + +<>{fn-org329} +|<> +|<> + +|Delete +|<> +|<> +| +<> + +<> + +<> +|<> +|<> + +|Change +|<> +|<> +| +<> + +<> + +<> +|<> +|<> + +|Move from other node +|<> +|<> +|<> +| +| + +|Move from other feature in same node +|<> +| +|<> +| +| + +|Move in same feature in same node +|<> +|<> +|<> +| +| + +|Move from other node and replace existing{fn-org321} +|<> +|<> +|<> +| +| + +|Move from other feature in same node and replace existing{fn-org321} +|<> +| +|<> +| +| + +|Move in same feature in same node and replace existing{fn-org321} +|<> +|<> +|<> +| +| + +|Composite +5+|<> +|=== \ No newline at end of file diff --git a/delta/messages.adoc b/delta/messages.adoc new file mode 100644 index 0000000..e2d56be --- /dev/null +++ b/delta/messages.adoc @@ -0,0 +1,58 @@ +[[messages]] +== Messages +=== Parameter types +[horizontal] +[[protocolMessageType]]protocolMessage:: Optional <>. + +[[targetNodeType]]TargetNode:: Target's node as <<{m3}.adoc#node-id, id>>. + +[[metaPointerType]]MetaPointer:: MetaPointer-tuple to describe an M2 element (classifier, feature, etc.). +Encoded as <<{serialization}.adoc#meta-pointer, meta-pointer>>. + +[[propertyValueType]]PropertyValue:: Property value encoded as <<{serialization}.adoc#property-values, property value>>. + +[[resolveInfoType]]ResolveInfo:: ResolveInfo of a reference as string. +Can be `null`. + +[[indexType]]Index:: Position inside a multiple link or annotations as integer >= 0. +Cannot be `null`. +Use value `0` for <<{m3}.adoc#multiplicity, single links>>. + +[[commandType]]Command:: Any <>. + +[[commandIdType]]CommandId:: Id of a command.{fn-org305} +Same format as <<{m3}.adoc#identifiers, identifiers>>; must be unique per <>. + +[[queryIdType]]QueryId:: Id of a query. +Same format as <<{m3}.adoc#identifiers, identifiers>>; must be unique per <>. + +[[chunkType]]SerializationChunk:: <<{serialization}.adoc, Chunk of nodes>>. + +[[eventType]]Event:: Any <>. + +[[participationIdType]]ParticipationId:: Id of a <>. +Same format as <<{m3}.adoc#identifiers, identifiers>>; must be unique for all concurrent participations. + +[[commandSourceType]]CommandSource:: _(<>, <>)_ tuple{fn-org306} this event is based on. +This allows a client to know when its command has been processed (either successful or not). + +[[eventSequenceType]]EventSequenceNumber:: <> of this event. + +[[freeIdType]]FreeId:: Free <<{m3}.adoc#node-id, node id>>. + +[[deltaProtocolVersionType]]DeltaProtocolVersion:: Version of the delta protocol, e.g. `2025.1`. + +==== How to address references +We refer to references by the tuple of _(parent, reference, index)_. +Rationale: Both reference `target` and `resolveInfo` can be `null`, so they aren't suitable for identifying the reference. +However, `target` and `resolveInfo` MUST NOT both be `null`. + +include::errors.adoc[] + +include::queries.adoc[] + +include::commandEventOverview/command-event-overview.adoc[] + +include::commands.adoc[] + +include::events.adoc[] \ No newline at end of file diff --git a/delta/open-questions.adoc b/delta/open-questions.adoc new file mode 100644 index 0000000..3f8dc66 --- /dev/null +++ b/delta/open-questions.adoc @@ -0,0 +1,35 @@ +[[open-questions]] +== Open questions +#TODO# + +* Which of the commands can potentially create invalid (recursively contained) trees? + + * Hypothesis: Only moveChild / moveAnnotation commands + + A + contains A + + + A + contains B + contains A + + A + contains B + contains C + contains A + + +* Which kind of errors do we accept? +How does this interact with concurrent edits? +Example: Does <> fail if the `removedChild` does not exist? --> Postpone + +* Do we need "swapNodes" event? + --> definitely not for now + How different from two composed moved commands? + +* Wording for commands/events: Shall we use "deleteXxx" everywhere? Or "removeXxx"? Or "deleteXxx" for deleting nodes, and "removeXxx" for removing properties / references? --> "delete" + +* Decide on errors marked with #?# (invalid optional parameter values){fn-org312} --> postponed + +* How to report a command has completely been discarded, without any resulting event?{fn-org314} --> NoOpEvent \ No newline at end of file diff --git a/delta/queries.adoc b/delta/queries.adoc new file mode 100644 index 0000000..7469130 --- /dev/null +++ b/delta/queries.adoc @@ -0,0 +1,211 @@ +[[queries]] +=== Queries + +[[cmd-subscription]] +==== Subscription + +[[qry-subscribePartitions]] +[[qry-SubscribeToChangingPartitions]] +===== Subscribe to partition changes +This client wants to receive events on newly created (`creation` is true) or deleted (`deletion` is true) partitions, and automatically subscribe (`partitions` is true) to newly created partitions.{fn-org267} + +[horizontal] +.Request parameters +creation:: `boolean` Whether this client wants to receive events on newly created partitions (`true`), or not (`false`). + +deletion:: `boolean` Whether this client wants to receive events on deleted partitions (`true`), or not (`false`). + +partitions:: `boolean` Whether this client wants to automatically subscribe to newly created partitions (`true`), or not (`false`). + +queryId:: <> Id of this query. +protocolMessage:: <> + +[horizontal] +.Response parameters +queryId:: <> Id of this query. +protocolMessage:: <> + +.Errors +* <> + +.Technical name +`SubscribeToChangingPartitions` + +[[qry-subscribePartition]] +[[qry-SubscribeToPartitionContents]] +===== Subscribe to partition +This client wants to receive events on any changes to `partition` or any of its descendants.{fn-org270}{fn-org269} + +[horizontal] +.Request parameters +partition:: <> Node id of the partition this client wants to receive events of. +queryId:: <> Id of this query. +protocolMessage:: <> + +[horizontal] +.Response parameters +contents:: <> Complete contents of `partition`, i.e. the node with id `partition` and all of its descendants (including annotation instances). +queryId:: <> Id of this query. +protocolMessage:: <> + +.Errors +* already subscribed to `partition` +* <> + +.Technical name +`SubscribeToPartitionContents` + +[[qry-unsubscribePartition]] +[[qry-UnsubscribeFromPartitionContents]] +===== Unsubscribe from partition +This client does not want to receive events on any changes to `partition` or any of its descendants anymore.{fn-org270} + +[horizontal] +.Request parameters +partition:: <> Node id of the partition this client wants to stop receiving events of. +queryId:: <> Id of this query. +protocolMessage:: <> + +[horizontal] +.Response parameters +queryId:: <> Id of this query. +protocolMessage:: <> + +.Errors +* not subscribed to `partition` +* <> + +.Technical name +`UnsubscribeFromPartitionContents` + +[[qry-participation]] +==== Participation +Even though participation handling does not relate to repository contents, we consider them queries.{fn-org350}. + +[[qry-SignOn]] +===== Sign On (start a participation) +The <> starts a <>. + +NOTE: signing on is not the same as logging in: The latter includes some authentication/authorization check, which is out of scope of this specification. + +[horizontal] +.Request parameters +deltaProtocolVersion:: <> +queryId:: <> Id of this query. +protocolMessage:: <> + +[horizontal] +.Response parameters +participationId:: <> the repository assigns to this participation. +queryId:: <> Id of this query. +protocolMessage:: <> + +.Errors +* Unsupported delta protocol version + +.Technical name +`SignOn` + +[[qry-SignOff]] +===== Sign Off (end a participation) +The <> ends a <>.{fn-org344} + +NOTE: signing off is not the same as logging off: The latter includes some authentication/authorization invalidation, which is out of scope of this specification. + +[horizontal] +.Request parameters +queryId:: <> Id of this query. +protocolMessage:: <> + +[horizontal] +.Response parameters +queryId:: <> Id of this query. +protocolMessage:: <> + +.Errors +* <> + +.Technical name +`SignOff` + +[[qry-Reconnect]] +===== Reconnect (resume an existing participation) +The <> has been technically disconnected, but still knows its <>. +Then the client can ask to reconnect to the repository.{fn-org349} + +[horizontal] +.Request parameters +queryId:: <> Id of this query. +lastReceivedSequenceNumber:: <> Last <> received by the client. +protocolMessage:: <> + +[horizontal] +.Response parameters +queryId:: <> Id of this query. +lastSentSequenceNumber:: <> Last <> sent by the repository. +Can be `null` if repository doesn't know the last sent sequence number; `null` MUST coincide with `false` for `participationValid`. +protocolMessage:: <> + +.Errors +* <> If the participation is not valid.{fn-org354} + +.Technical name +`Reconnect` + + +[[qry-misc]] +==== Miscellaneous + +[[qry-GetAvailableIds]] +===== Get available ids +Request `count` number of unused <<{m3}.adoc#node-id, valid ids>>. + +Same functionality as <<{bulk}.adoc#ids, bulk API ids command>>. + +We don't assume leases, i.e. ids handed out to one client are "owned" by that client forever. + +[horizontal] +.Request parameters +count:: `integer` Number of ids requested. +queryId:: <> Id of this query. +protocolMessage:: <> + +[horizontal] +.Response parameters +ids:: <>[] List of ids guaranteed to be free. +The repository MUST return between one (inclusive) and `count` (inclusive) ids. +It MAY return less than `count` ids. +queryId:: <> Id of this query. +protocolMessage:: <> + +.Errors +* <> + +.Technical name +`GetAvailableIds` + +[[qry-ListPartitions]] +===== List partitions +Lists all non-language partitions accessible in the repository.{fn-org361} + +Same functionality as <<{bulk}.adoc#listPartitions, bulk API listPartitions command>>. + +[horizontal] +.Request parameters +queryId:: <> Id of this query. +protocolMessage:: <> + +[horizontal] +.Response parameters +partitions:: <> All accessible <<{m3}.adoc#partition, Partitions>> in the Repository. +The partitions are sent as complete nodes. +Does NOT include any children or annotations of the root partition nodes. +Does NOT include <<{m3}.adoc#Language, Languages>> or partition children/annotations. +queryId:: <> Id of this query. +protocolMessage:: <> + +.Errors +* <> + +.Technical name +`ListPartitions` \ No newline at end of file diff --git a/delta/scenarios/changeKnownNodeLocalUpdate.adoc b/delta/scenarios/changeKnownNodeLocalUpdate.adoc new file mode 100644 index 0000000..8e52ae1 --- /dev/null +++ b/delta/scenarios/changeKnownNodeLocalUpdate.adoc @@ -0,0 +1,91 @@ +=== Client changes known node with local update +[plantuml,changeKnownNodeLocalUpdate,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Events as clientEvent + participant Commands as clientCmd +end box + +box "Repository" + participant Commands as repoCmd + participant Events as repoEvent + participant Core as core +end box + +== Client A connected with participation id "client-a"\nsubscribed to "partition-id"\nknows about nodeA (part of "partition-id") == + +[->> editor ++ +editor -> editor: update(nodeA.age = 23) +editor ->> clientCmd +deactivate editor +activate clientCmd +clientCmd -> repoCmd ++: addProperty("nodeA", age, "23", "cmd-1") + +repoCmd ->> core +activate core +clientCmd <-- repoCmd: received("cmd-1") +deactivate repoCmd + +clientCmd -> clientEvent: registerProcessedCmd("cmd-1") +activate clientEvent +deactivate clientCmd +deactivate clientEvent + +core -> core: update() + +core -> repoEvent +deactivate core + +activate repoEvent +clientEvent <<- repoEvent: propertyAdded("nodeA", age, "23", [("client-a", "cmd-1")], 1) +deactivate repoEvent + +activate clientEvent +clientEvent -> clientEvent: checkForProcessedCmd() +clientEvent -> clientEvent: removeProcessedCmd("cmd-1") +deactivate clientEvent + +core <<-]: addProperty(..., "cmd-x") +activate core +core -> core: update() + +core -> repoEvent +deactivate core + +activate repoEvent +clientEvent <<- repoEvent: propertyAdded(... [("other-client", "cmd-x")], 2) +deactivate repoEvent + +activate clientEvent +clientEvent -> clientEvent: checkForProcessedCmd() +clientEvent -> editor +deactivate clientEvent + +activate editor +editor -> editor: update() +---- +1. User enters new property value. +2. Client updates `nodeA` with new property value. +3. Client editor forwards user action into command. +4. Client sends <> command with `nodeA` node id, `age` property (details omitted), `23` value and command id `cmd-1`. +5. Repository registers command for processing. +6. Repository acknowledges reception of command with id `cmd-1`. +7. Client registers processed command id `cmd-1`. +8. Repository updates internal representation. +9. Repository creates event for update. +10. Repository emits event <> with `nodeA` node id, `age` property (details omitted), `23` value and sequence number `1`. +It includes one <> with value `(client-a, cmd-1)` +11. Client found a matching registered processed command id. +12. Client unregisters processed command id `cmd-1`, and does NOT forward information to editor -- the event originates from this client, thus has already been processed. +13. Another client sends <> command with command id `cmd-x` (other parameters omitted). +14. Repository updates internal representation. +15. Repository creates event for update. +16. Repository emits event <> with sequence number `2` (other parameters omitted). +It includes one <> with value `(other-client, cmd-x)` +17. Client did not find any matching registered processed command id. +18. Client forwards information to editor. +19. Client updates with new property value. diff --git a/delta/scenarios/changeKnownNodeRemoteUpdate.adoc b/delta/scenarios/changeKnownNodeRemoteUpdate.adoc new file mode 100644 index 0000000..39a4831 --- /dev/null +++ b/delta/scenarios/changeKnownNodeRemoteUpdate.adoc @@ -0,0 +1,59 @@ +=== Client changes known node with remote update +[plantuml,changeKnownNodeRemoteUpdate,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Events as clientEvent + participant Commands as clientCmd +end box + +box "Repository" + participant Commands as repoCmd + participant Events as repoEvent + participant Core as core +end box + +== Client A connected with participation id "client-a"\nsubscribed to "partition-id"\nknows about nodeA (part of "partition-id") == + +[->> editor ++ +editor -> clientCmd ++ +clientCmd -> repoCmd ++: addProperty("nodeA", age, "23", "cmd-1") +repoCmd ->> core +activate core +clientCmd <-- repoCmd: received("cmd-1") +deactivate repoCmd +editor <-- clientCmd +deactivate clientCmd +deactivate editor + +core -> core: update() + +core -> repoEvent +deactivate core + +activate repoEvent +clientEvent <<- repoEvent: propertyAdded("nodeA", age, "23", [("client-a", "cmd-1")], 1) +deactivate repoEvent + +activate clientEvent +clientEvent -> editor +deactivate clientEvent + +activate editor +editor -> editor: update(nodeA.age = 23) +---- +1. User enters new property value. +2. Client editor forwards user action into command. +3. Client sends <> command with `nodeA` node id, `age` property (details omitted), `23` value and command id `cmd-1`. +4. Repository registers command for processing. +5. Repository acknowledges reception of command with id `cmd-1`. +6. Client informs editor of command submission. +7. Repository updates internal representation. +8. Repository creates event for update. +9. Repository emits event <> with `nodeA` node id, `age` property (details omitted), `23` value and sequence number `1`. +It includes one <> with value `(client-a, cmd-1)` +10. Client receives event and forwards information to editor. +11. Client updates `nodeA` with new property value. diff --git a/delta/scenarios/changeSameValueRemoteUpdate.adoc b/delta/scenarios/changeSameValueRemoteUpdate.adoc new file mode 100644 index 0000000..738a628 --- /dev/null +++ b/delta/scenarios/changeSameValueRemoteUpdate.adoc @@ -0,0 +1,58 @@ +=== Client with remote update changes property to same value as it already has +[plantuml,changeSameValueRemoteUpdate,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Events as clientEvent + participant Commands as clientCmd +end box + +box "Repository" + participant Commands as repoCmd + participant Events as repoEvent + participant Core as core +end box + +== Client A connected with participation id "client-a"\nsubscribed to "partition-id"\nknows about nodeA (part of "partition-id") == + +[->> editor ++ +editor -> clientCmd ++ +clientCmd -> repoCmd ++: changeProperty("nodeA", age, "23", "23", "cmd-1") +repoCmd ->> core +activate core +clientCmd <-- repoCmd: received("cmd-1") +deactivate repoCmd +clientCmd -> clientEvent: registerProcessedCmd("cmd-1") +activate clientEvent +deactivate clientEvent +editor <-- clientCmd +deactivate clientCmd +deactivate editor + +core -> core: noChange() + +core -> repoEvent +deactivate core + +activate repoEvent +clientEvent <<- repoEvent: noOp([("client-a", "cmd-1")], 1) +deactivate repoEvent + +activate clientEvent +clientEvent -> clientEvent: removeProcessedCmd("cmd-1") +deactivate clientEvent +---- +1. User enters changed property value that's the same value as the old value. +2. Client editor forwards user action into command. +3. Client sends <> command with `nodeA` node id, `age` property (details omitted), `23` old value, `23` new value and command id `cmd-1`. +4. Repository registers command for processing. +5. Repository acknowledges reception of command with id `cmd-1`. +6. Client registers processed command id `cmd-1`. +7. Client informs editor of command submission. +8. Repository determines no change to internal representation. +9. Repository creates event for notification. +10. Repository emits <> event with <> with value `(client-a, cmd-1)` and sequence number `1`. +11. Client removes `cmd-1` from open commands list. diff --git a/delta/scenarios/changeUnknownNodeFailedCommand.adoc b/delta/scenarios/changeUnknownNodeFailedCommand.adoc new file mode 100644 index 0000000..9f8b4ce --- /dev/null +++ b/delta/scenarios/changeUnknownNodeFailedCommand.adoc @@ -0,0 +1,35 @@ +=== Client tries to change unknown node with failed command +[plantuml,changeUnknownNodeFailedCommand,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Commands as clientCmd +end box + +box "Repository" + participant Commands as repoCmd + participant Core as core +end box + +== Client A connected with participation id "client-a"\nsubscribed to "partition-id"\nassumes invalid nodeA (part of "partition-id") == + +[->> editor ++ +editor -> clientCmd ++ +clientCmd -> repoCmd ++: addProperty("nodeA", age, "23", "cmd-1") +repoCmd -> core ++: checkNodeId("nodeA") +return false +return failed("cmd-1", "unknown node id nodeA") +return +editor -> editor: DisplayError() +---- +1. User enters new property value on node `nodeA` that's known to the editor. +2. Client editor forwards user action into command. +3. Client sends <> command with `nodeA` node id, `age` property (details omitted), `23` value and command id `cmd-1`. +4. Repository checks whether it knows a node with id `nodeA`. +5. Repository doesn't know that node. +6. Repository refuses command. +7. Client informs editor of failed command. +8. Client informs user. diff --git a/delta/scenarios/changeUnknownNodeFailedEvent.adoc b/delta/scenarios/changeUnknownNodeFailedEvent.adoc new file mode 100644 index 0000000..f5fa3f2 --- /dev/null +++ b/delta/scenarios/changeUnknownNodeFailedEvent.adoc @@ -0,0 +1,60 @@ +=== Client tries to change unknown node with failed event +[plantuml,changeUnknownNodeFailedEvent,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Events as clientEvent + participant Commands as clientCmd +end box + +box "Repository" + participant Commands as repoCmd + participant Events as repoEvent + participant Core as core +end box + +== Client A connected with participation id "client-a"\nsubscribed to "partition-id"\nassumes invalid nodeA (part of "partition-id") == + +[->> editor ++ +editor -> clientCmd ++ +clientCmd -> repoCmd ++: addProperty("nodeA", age, "23", "cmd-1") +repoCmd ->> core +activate core +clientCmd <-- repoCmd: received("cmd-1") +deactivate repoCmd +clientCmd -> clientEvent: registerProcessedCmd("cmd-1") +activate clientEvent +deactivate clientEvent +deactivate repoCmd +editor <-- clientCmd +deactivate clientCmd +deactivate editor + +core -> core: unknownNodeId("nodeA") + +core -> repoEvent +deactivate core + +activate repoEvent +clientEvent <<- repoEvent: error("unknownNode", "cannot add property to unknown node" [("client-a", "cmd-1")], 1) +deactivate repoEvent + +activate clientEvent +clientEvent -> clientEvent: removeProcessedCmd("cmd-1") +deactivate clientEvent +---- +1. User enters new property value on node `nodeA` that's known to the editor. +2. Client editor forwards user action into command. +3. Client sends <> command with `nodeA` node id, `age` property (details omitted), `23` value and command id `cmd-1`. +4. Repository registers command for processing. +5. Repository acknowledges reception of command with id `cmd-1`. +6. Client registers processed command id `cmd-1`. +7. Client informs editor of command submission. +8. Repository realizes it does not know a node with id `nodeA` +9. Repository creates event for notification. +10. Repository emits <> event with `unknownNode` error code, `cannot add property to unknown node` message and sequence number `1`. +It includes one <> with value `(client-a, cmd-1)`. +11. Client removes `cmd-1` from open commands list. diff --git a/delta/scenarios/concurrentChangeLocalUpdate.adoc b/delta/scenarios/concurrentChangeLocalUpdate.adoc new file mode 100644 index 0000000..6eb93f1 --- /dev/null +++ b/delta/scenarios/concurrentChangeLocalUpdate.adoc @@ -0,0 +1,73 @@ +=== Concurrent changes to known node with local update +[plantuml,concurrentChangeLocalUpdate,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Events as clientEvent + participant Commands as clientCmd +end box + +box "Repository" + participant Commands as repoCmd + participant Events as repoEvent + participant Core as core +end box + +== Client A connected with participation id "client-a"\nsubscribed to "partition-id"\nknows about nodeA (part of "partition-id") == + +[->> editor ++ +editor -> editor: update(nodeA.age = 23) +editor ->> clientCmd +deactivate editor +activate clientCmd +clientCmd -> repoCmd ++: addProperty("nodeA",\n age, "23", "cmd-1") +repoCmd ->> core +activate core +clientCmd <-- repoCmd: received("cmd-1") +deactivate repoCmd +clientCmd -> clientEvent: registerProcessedCmd("cmd-1") +activate clientEvent +deactivate clientEvent +deactivate clientCmd + +core <<-]: addProperty("nodeA",\n age, "42", "cmd-x") + +core -> core: resolveConcurrentUpdates() + +core -> repoEvent +deactivate core + +activate repoEvent +clientEvent <<- repoEvent: propertyAdded("nodeA", age, "42", [("client-a", "cmd-1"), ("other-client", "cmd-x")], 1) +deactivate repoEvent + +activate clientEvent +clientEvent -> clientEvent: checkForProcessedCmd() +clientEvent -> clientEvent: removeProcessedCmd("cmd-1") +clientEvent -> editor +deactivate clientEvent + +activate editor +editor -> editor: update(nodeA.age = 42) +---- +1. User enters new property value. +2. Client updates `nodeA` with new property value. +3. Client editor forwards user action into command. +4. Client sends <> command with `nodeA` node id, `age` property (details omitted), `23` value and command id `cmd-1`. +5. Repository registers command for processing. +6. Repository acknowledges reception of command with id `cmd-1`. +7. Client registers processed command id `cmd-1`. +8. Another client sends <> command `nodeA` node id, `age` property (details omitted), `42` value and command id `cmd-x`. +9. Repository resolves concurrent updates t `nodeA`, `age` property with "last write wins" strategy. +Repository updates internal representation with value `42`. +10. Repository creates event for update. +11. Repository emits event <> with `nodeA` node id, `age` property (details omitted), `23` value and sequence number `1`. +It includes one <> with values `(client-a, cmd-1)` and `(other-client, cmd-x)`. +12. Client found a matching registered processed command id. +13. Client unregisters processed command id `cmd-1`. +14. Not all command sources could be matched against registered processed command ids. +Client forwards information to editor. +15. Client updates with new property value. diff --git a/delta/scenarios/concurrentChangeRemoteUpdate.adoc b/delta/scenarios/concurrentChangeRemoteUpdate.adoc new file mode 100644 index 0000000..2cdb64d --- /dev/null +++ b/delta/scenarios/concurrentChangeRemoteUpdate.adoc @@ -0,0 +1,63 @@ +=== Concurrent changes to known node with remote update +[plantuml,concurrentChangeRemoteUpdate,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Events as clientEvent + participant Commands as clientCmd +end box + +box "Repository" + participant Commands as repoCmd + participant Events as repoEvent + participant Core as core +end box + +== Client A connected with participation id "client-a"\nsubscribed to "partition-id"\nknows about nodeA (part of "partition-id") == + +[->> editor ++ +editor -> clientCmd ++ +clientCmd -> repoCmd ++: addProperty("nodeA", age, "23", "cmd-1") +repoCmd ->> core +activate core +clientCmd <-- repoCmd: received("cmd-1") +deactivate repoCmd +editor <-- clientCmd +deactivate clientCmd +deactivate editor + +core <<-]: addProperty("nodeA",\n age, "42", "cmd-x") + +core -> core: resolveConcurrentUpdates() + +core -> repoEvent +deactivate core + +activate repoEvent +clientEvent <<- repoEvent: propertyAdded("nodeA", age, "42", [("client-a", "cmd-1"), ("other-client", "cmd-x")], 1) +deactivate repoEvent + +activate clientEvent +clientEvent -> editor +deactivate clientEvent + +activate editor +editor -> editor: update(nodeA) +---- +1. User enters new property value. +2. Client editor forwards user action into command. +3. Client sends <> command with `nodeA` node id, `age` property (details omitted), `23` value and command id `cmd-1`. +4. Repository registers command for processing. +5. Repository acknowledges reception of command with id `cmd-1`. +6. Client informs editor of command submission. +7. Another client sends <> command `nodeA` node id, `age` property (details omitted), `42` value and command id `cmd-x`. +8. Repository resolves concurrent updates t `nodeA`, `age` property with "last write wins" strategy. +Repository updates internal representation with value `42`. +9. Repository creates event for update. +10. Repository emits event <> with `nodeA` node id, `age` property (details omitted), `23` value and sequence number `1`. +It includes one <> with values `(client-a, cmd-1)` and `(other-client, cmd-x)`. +11. Client receives event and forwards information to editor. +12. Client updates `nodeA` with new property value. diff --git a/delta/scenarios/reconnectKnownPartition.adoc b/delta/scenarios/reconnectKnownPartition.adoc new file mode 100644 index 0000000..10d031a --- /dev/null +++ b/delta/scenarios/reconnectKnownPartition.adoc @@ -0,0 +1,37 @@ +=== Client reconnects to known partition +[plantuml,reconnectKnownPartition,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Queries as clientQuery +end box + +box "Repository" + participant Queries as repoQuery + participant Core as core +end box + +== Client A connected with partition id "client-a" == + +[->> clientQuery +activate clientQuery +clientQuery -> repoQuery ++: subscribePartition("partition-id", "qry-1") + repoQuery -> core ++: retrieveDescendants("partition-id") + return +return content: [partitionNode, childNodeA, childNodeB]\nqueryId: "qry-1" +clientQuery -> editor +deactivate clientQuery +activate editor +editor -> editor: draw(childNodeA, childNodeB) +---- +1. Client knows the relevant partition, wants to subscribe. +2. Client sends <> query with partition node id `partition-id`. +3. Repository retrieves all contents of partition with node id `partition-id`. +4. Repository found contents. +5. Repository responds to query with id `qry-1` with contents of 3 nodes: `partitionNode`, `childNodeA`, `childNodeB` (details omitted). +6. Client receives query result and forwards information to editor. +7. Client draws `childNodeA` and `childNodeB`. +`partitionNode` is not drawn, it represents the canvas. diff --git a/delta/scenarios/repositoryBug.adoc b/delta/scenarios/repositoryBug.adoc new file mode 100644 index 0000000..dd4bf46 --- /dev/null +++ b/delta/scenarios/repositoryBug.adoc @@ -0,0 +1,63 @@ +=== Repository has bug, needs to tell client it couldn't apply its commands +[plantuml,repositoryBug,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Events as clientEvent + participant Commands as clientCmd +end box + +box "Repository" + participant Commands as repoCmd + participant Events as repoEvent + participant Core as core +end box + +== Client A connected with participation id "client-a"\nsubscribed to "partition-id"\nassumes invalid nodeA (part of "partition-id") == + +[->> editor ++ +editor -> clientCmd ++ +clientCmd -> repoCmd ++: addProperty("nodeA", age, "23", "cmd-1") +repoCmd ->> core +activate core +clientCmd <-- repoCmd: received("cmd-1") +deactivate repoCmd +clientCmd -> clientEvent: registerProcessedCmd("cmd-1") +activate clientEvent +deactivate clientEvent +deactivate repoCmd +editor <-- clientCmd +deactivate clientCmd +deactivate editor + +core -> core: update() +core -> core: handleError() + +core -> repoEvent +deactivate core + +activate repoEvent +clientEvent <<- repoEvent: error("internalError", "internal error occurred." [("client-a", "cmd-1")], 1) +deactivate repoEvent + +activate clientEvent +clientEvent -> clientEvent: removeProcessedCmd("cmd-1") +deactivate clientEvent +---- +1. User enters new property value on node `nodeA` that's known to the editor. +2. Client editor forwards user action into command. +3. Client sends <> command with `nodeA` node id, `age` property (details omitted), `23` value and command id `cmd-1`. +4. Repository registers command for processing. +5. Repository acknowledges reception of command with id `cmd-1`. +6. Client registers processed command id `cmd-1`. +7. Client informs editor of command submission. +8. Repository tries to update internal representation. +Some error occurs (e.g. database unavailable). +9. Repository handles the error. +10. Repository creates event for notification. +11. Repository emits <> event with `internalError` error code, `internal error occurred` message and sequence number `1`. +It includes one <> with value `(client-a, cmd-1)`. +12. Client removes `cmd-1` from open commands list. diff --git a/delta/scenarios/scenarios.adoc b/delta/scenarios/scenarios.adoc new file mode 100644 index 0000000..d2932e8 --- /dev/null +++ b/delta/scenarios/scenarios.adoc @@ -0,0 +1,21 @@ +[[scenarios]] +== Scenarios +include::virginRepo.adoc[] + +include::reconnectKnownPartition.adoc[] + +include::changeKnownNodeRemoteUpdate.adoc[] + +include::changeKnownNodeLocalUpdate.adoc[] + +include::changeUnknownNodeFailedCommand.adoc[] + +include::changeUnknownNodeFailedEvent.adoc[] + +include::changeSameValueRemoteUpdate.adoc[] + +include::repositoryBug.adoc[] + +include::concurrentChangeLocalUpdate.adoc[] + +include::concurrentChangeRemoteUpdate.adoc[] \ No newline at end of file diff --git a/delta/scenarios/virginRepo.adoc b/delta/scenarios/virginRepo.adoc new file mode 100644 index 0000000..a135c88 --- /dev/null +++ b/delta/scenarios/virginRepo.adoc @@ -0,0 +1,64 @@ +=== Virgin repository, first time client connects + +[plantuml,virginRepo,svg] +---- +hide footbox +autonumber + +box "Client A" + participant Editor as editor + participant Events as clientEvent + participant Commands as clientCmd + participant Queries as clientQuery +end box + +box "Repository" + participant Queries as repoQuery + participant Commands as repoCmd +' participant Queries as rQry + participant Events as repoEvent + participant Core as core +end box + +== Client A unconnected == + +clientQuery -> repoQuery ++: signOn() +return participationId = "client-a" + +[->> clientCmd ++ +clientCmd -> repoCmd ++: addPartition(nodeA, "cmd-1") +repoCmd ->> core +activate core +clientCmd <-- repoCmd: received("cmd-1") +deactivate clientCmd +deactivate repoCmd + +core -> core: update() + +core -> repoEvent +deactivate core + +activate repoEvent +clientEvent <<- repoEvent: partitionAdded(nodeA, [("client-a", "cmd-1")], 1) +deactivate repoEvent + +activate clientEvent +clientEvent -> editor +deactivate clientEvent + +activate editor +editor -> editor: draw(nodeA) +---- + +1. Client <> to repository. +2. Repository confirms participation with participation id `client-a`. +3. Client initiates new partition. +4. Client sends <> command with `nodeA` payload (details omitted) and command id `cmd-1`. +5. Repository registers command for processing. +6. Repository acknowledges reception of command with id `cmd-1`. +7. Repository updates internal representation. +8. Repository creates event for update. +9. Repository emits event <> with `nodeA` payload and sequence number `1`. +It includes one <> with value `(client-a, cmd-1)` +10. Client receives event and forwards information to editor. +11. Client draws `nodeA`. diff --git a/index.adoc b/index.adoc index ca9f194..20ada51 100644 --- a/index.adoc +++ b/index.adoc @@ -9,6 +9,7 @@ * xref:metametamodel/metametamodel.adoc[Meta-Metamodel (M3)] * xref:serialization/serialization.adoc[Serialization Format] * xref:bulk/repo-access-api.adoc[Bulk Repository Access API] +* xref:delta/delta-api.adoc[Delta Repository Access API] == Versions diff --git a/metametamodel/metametamodel.adoc b/metametamodel/metametamodel.adoc index 4e9f9e4..6c2da14 100644 --- a/metametamodel/metametamodel.adoc +++ b/metametamodel/metametamodel.adoc @@ -412,10 +412,9 @@ It is indirectly a <> (as it is a top level element in a <> or <>. -fields with `type` of StructuredDataType can be `null`. +An M1 instance of StructuredDataType MUST have non-null values for all its fields. -A StructuredDataType can (directly or indirectly) contain a field with itself as `type`. +A StructuredDataType MUST NOT (directly or indirectly) contain a field with itself as `type`. [[Field]] @@ -864,6 +863,7 @@ Some <> will be widely used, so it makes sense t === Supporting terminology +[[multiplicity]] ==== Multiplicity Multiplicity describes how many targets a <> must and can have. diff --git a/roadmap/roadmap.adoc b/roadmap/roadmap.adoc index 63b50b0..7209753 100644 --- a/roadmap/roadmap.adoc +++ b/roadmap/roadmap.adoc @@ -4,6 +4,7 @@ include::../shared/issue-footnotes.adoc[] :refarch: ../reference-architecture/reference-architecture :serialization: ../serialization/serialization :bulk: ../bulk/repo-access-api +:delta: ../delta/delta-api :v2023-1: ../2023.1/ :v2024-1: ../2024.1/ @@ -19,15 +20,18 @@ As a volunteer-run Open Source effort, we cannot commit to a timeline. We're actively looking for corporate sponsors, with some prospects in sight. [[in-progress]] -=== In progress for _after_ version 2023.1 +=== In progress for _after_ version 2025.1 + +[[derived-models]] +==== Derived models +As described in our <<{refarch}.adoc#derivedModel, reference architecture>>, derived models are calculated from other (original or derived) models without direct human interaction. +They are usually some form of analysis result, such as one related to a type system. +Nodes in derived models are typically associated with an original node – e.g., the type computed for an AST node. + +The repository manages this association. Derived models may be persisted or be recalculated on the fly. + +https://github.com/LionWeb-io/specification/issues?q=is%3Aissue%20label%3Aderived%20[Existing issues on derived models] -[[bulk-protocol]] -==== Specifying bulk protocol -We've decided{fn-org148} to specify protocols only by their conceptual features. -The first such protocol will be the https://github.com/LionWeb-io/specification/blob/d8a54813c6bd224ef84e53a26ac7d60a45a866b5/bulk/repo-access-api.adoc[Bulk Repository access API]. -It is used to store and retrieve nodes in batches at the moment of invocation.{fn-org25} -It is intended for CRUD operations on (larger) sets of nodes, and enables integration with "simple" editor (i.e. no real-time collaboration). -Additionally, this API allows to list the available <<{m3}.adoc#partition, Partitions>>, get Languages known to the repository, and request unused <<{m3}.adoc#identifiers, node ids>>. [[envisioned]] === Envisioned @@ -37,11 +41,6 @@ This will influence the feature's priority. The list below is in no particular order. -[[delta-protocol]] -==== Delta protocol -As described in our <<{refarch}.adoc#delta, reference architecture>>, via delta protocol a client receives an initial snapshot similar to the bulk case. -Afterwards, the client continues to receive changes (aka deltas) from the repo; it also writes back changes continuously.{fn-org28} - [[standard-derived-models]] ==== Standard derived models We intend to support several common language (workbench) functionalities via <<{refarch}.adoc#derivedModel, derived models>>. @@ -158,10 +157,21 @@ Model-to-model generators would be implemented as <<{refarch}.adoc#processor, Pr [[versions]] == Versions +[[release-2025.1]] +[[version-2025.1]] +=== 2025.1 +* [[delta-protocol]] Specified <<{delta}.adoc#delta, Delta Repository Access API>> + +As described in our <<{refarch}.adoc#delta, reference architecture>>, via delta protocol a client receives an initial snapshot similar to the bulk case. +Afterwards, the client continues to receive changes (aka deltas) from the repo; it also writes back changes continuously.{fn-org28} + [[release-2024.1]] [[version-2024.1]] === 2024.1 -* Specified <<{bulk}.adoc#bulk, Bulk Repository Access API>> +* [[bulk-protocol]] Specified <<{bulk}.adoc#bulk, Bulk Repository Access API>> + +It is used to store and retrieve nodes in batches at the moment of invocation.{fn-org25} +It is intended for CRUD operations on (larger) sets of nodes, and enables integration with "simple" editor (i.e. no real-time collaboration). +Additionally, this API allows to list the available <<{m3}.adoc#partition, Partitions>>, get Languages known to the repository, and request unused <<{m3}.adoc#identifiers, node ids>>. + * Removed built-in `JSON` primitive datatype * Added <<{m3}.adoc#StructuredDataType, StructuredDataType>> diff --git a/serialization/serialization.adoc b/serialization/serialization.adoc index 6ef7586..077ede8 100644 --- a/serialization/serialization.adoc +++ b/serialization/serialization.adoc @@ -9,7 +9,7 @@ include::../shared/issue-footnotes.adoc[] :toc: preamble :toclevels: 3 -This document describes the serialization format for LionWeb *version 2024.1* chunks. +This document describes the serialization format for LionWeb *version 2025.1* chunks. == Conventions used in this document * _italic_ words refer to concepts defined by JSON. @@ -42,21 +42,21 @@ plantuml::serialization.puml[format=svg] Root level MUST be an _object_ with three _members_, called *serialization chunk*. [[SerializationChunk.serializationFormatVersion, `serializationFormatVersion`]] -The first _member_ SHOULD be _key_ `serializationFormatVersion` with a _string_ _value_.{fn-org58}{fn-org159}{fn-org172} +The first _member_ SHOULD be _name_ `serializationFormatVersion` with a _string_ _value_.{fn-org58}{fn-org159}{fn-org172} The value MUST be a non-empty string (without leading or trailing whitespace){fn-org165} describing the serialization format version used to create the processed document, according to <>. [[SerializationChunk.languages]] -The second _member_ SHOULD be _key_ `languages` with an _array_ _value_.{fn-org76}{fn-org78}{fn-org159} +The second _member_ SHOULD be _name_ `languages` with an _array_ _value_.{fn-org76}{fn-org78}{fn-org159} Each _element_ in the value array MUST adhere to <>. The order of _elements_ is undefined. _elements_ MUST contain all language/version referred to by any <> in the processed document. Each _element_ MUST be unique with respect to all its _members_. [[SerializationChunk.nodes]] -The third _member_ SHOULD be _key_ `nodes` with an _array_ _value_.{fn-org33}{fn-org159} +The third _member_ SHOULD be _name_ `nodes` with an _array_ _value_.{fn-org33}{fn-org159} Each _element_ in the value array MUST adhere to <>. The order of _elements_ is undefined. -Each _element_ MUST be unique with respect to the value of its _key_ `id`. +Each _element_ MUST be unique with respect to the value of its _name_ `id`. [[language]] === Language structure @@ -69,8 +69,8 @@ In this case, builtins MUST be listed as *used language* like any other language The _object_ MUST contain the following _members_:{fn-org76} -* [[UsedLanguage.key]] _key_ `key` with _string_ _value_, adhering to <>. -* [[UsedLanguage.version]] _key_ `version` with _string_ _value_, adhering to <>. +* [[UsedLanguage.key]] _name_ `key` with _string_ _value_, adhering to <>. +* [[UsedLanguage.version]] _name_ `version` with _string_ _value_, adhering to <>. [[language-key]] ==== Language key @@ -93,9 +93,9 @@ The order of _members_ is undefined. The _object_ MUST contain the following _members_: -* [[MetaPointer.lanuage]] _key_ `language` with _string_ _value_, adhering to <>. -* [[MetaPointer.version]] _key_ `version` with _string_ _value_, adhering to <>. -* [[MetaPointer.key]] _key_ `key` with _string_ _value_ according to <<{m3}.adoc#keys, Keys spec>>. +* [[MetaPointer.lanuage]] _name_ `language` with _string_ _value_, adhering to <>. +* [[MetaPointer.version]] _name_ `version` with _string_ _value_, adhering to <>. +* [[MetaPointer.key]] _name_ `key` with _string_ _value_ according to <<{m3}.adoc#keys, Keys spec>>. Refers to some <<{m3}.adoc#IKeyed, element in the language>>. Which element exactly is specified for each usage of meta-pointer. @@ -107,18 +107,18 @@ The order of _members_ is undefined. The _object_ MUST contain the following _members_:{fn-org59}{fn-java33}{fn-org55} -* [[Node.id]] _key_ `id` with _string_ _value_, adhering to <>. -* [[Node.classifier]] _key_ `classifier`{fn-org37-name}{fn-org184} with _object_ _value_, adhering to <>. +* [[Node.id]] _name_ `id` with _string_ _value_, adhering to <>. +* [[Node.classifier]] _name_ `classifier`{fn-org37-name}{fn-org184} with _object_ _value_, adhering to <>. The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#IKeyed.key, *key*>> of the <<{m3}.adoc#Concept, *Concept*>> or <<{m3}.adoc#Annotation, *Annotation*>> this *node* is an instance of. -* [[Node.properties]] _key_ `properties` with _array_ _value_, each _element_ adhering to <>. +* [[Node.properties]] _name_ `properties` with _array_ _value_, each _element_ adhering to <>. The order of _elements_ is undefined.{fn-org156} -* [[Node.containments]] _key_ `containments`{fn-org55-name-children}{fn-org206} with _array_ _value_, each _element_ adhering to <>. +* [[Node.containments]] _name_ `containments`{fn-org55-name-children}{fn-org206} with _array_ _value_, each _element_ adhering to <>. The order of _elements_ is undefined.{fn-org156} -* [[Node.references]] _key_ `references`{fn-org55-name-references} with _array_ _value_, each _element_ adhering to <>. +* [[Node.references]] _name_ `references`{fn-org55-name-references} with _array_ _value_, each _element_ adhering to <>. The order of _elements_ is undefined.{fn-org156} -* [[Node.annotations]] _key_ `annotations`{fn-org150} with _array_ _value_, each _element_ adhering to <>. +* [[Node.annotations]] _name_ `annotations`{fn-org150} with _array_ _value_, each _element_ adhering to <>. The order of _elements_ MUST be maintained.{fn-org157} -* [[Node.parent]] _key_ `parent`{fn-org187} with _string_ or _null_ _value_, adhering to <>. +* [[Node.parent]] _name_ `parent`{fn-org187} with _string_ or _null_ _value_, adhering to <>. For all features (i.e. `properties`, `containments`, and `references`) defined for a **node**'s classifier:{fn-org33} @@ -148,9 +148,9 @@ The order of _members_ is undefined. The _object_ MUST contain the following _members_: -* [[Property.property]] _key_ `property` with _object_ _value_, adhering to <>. +* [[Property.property]] _name_ `property` with _object_ _value_, adhering to <>. The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#IKeyed.key, *key*>> of the <<{m3}.adoc#Property, *Property*>> this *property* is an instance of. -* [[Property.value]] _key_ `value` with _value_ as one of +* [[Property.value]] _name_ `value` with _value_ as one of ** _string_{fn-org34} containing the value of the property referenced by the `property`. Refer to <> for the specification of the value format. Can be an empty _string_. @@ -165,9 +165,9 @@ The order of _members_ is undefined. The _object_ MUST contain the following _members_: -* [[Containment.containment]] _key_ `containment` with _object_ _value_, adhering to <>. +* [[Containment.containment]] _name_ `containment` with _object_ _value_, adhering to <>. The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#IKeyed.key, *key*>> of the <<{m3}.adoc#Containment, *Containment*>> this *containment* is an instance of. -* [[Containment.children]] _key_ `children` with _array_ _value_ with _string_ _elements_. +* [[Containment.children]] _name_ `children` with _array_ _value_ with _string_ _elements_. Each _element_ adheres to <<{m3}.adoc#identifiers, Identifier spec>>, and refers to the *id* of the contained *node*. The order of _elements_ MUST be maintained.{fn-org157} + @@ -183,19 +183,19 @@ The order of _members_ is undefined. The _object_ MUST contain the following _members_: -* [[Reference.reference]] _key_ `reference` with _object_ _value_, adhering to <>. +* [[Reference.reference]] _name_ `reference` with _object_ _value_, adhering to <>. The *meta-pointer*'s ``key``'s _value_ refers to the <<{m3}.adoc#IKeyed.key, *key*>> of the <<{m3}.adoc#Reference, *Reference*>> this *reference* is an instance of. -* [[Reference.targets]] _key_ `targets` with _array_ _value_ with __object_ _elements_. +* [[Reference.targets]] _name_ `targets` with _array_ _value_ with _object_ _elements_. The order of _elements_ MUST be maintained.{fn-org157} Each _element_ MUST have the following _members_ in undefined order:{fn-org55-name-references} -** [[Reference.reference.resolveInfo]] _key_ `resolveInfo`{fn-org36} with _value_ as one of: +** [[Reference.reference.resolveInfo]] _name_ `resolveInfo`{fn-org36} with _value_ as one of: *** _string_ containing *resolveInfo*, a textual hint that might be used to find the target *node* of this reference. Interface <<{m3}.adoc#INamed, INamed>> SHOULD be used as a default, if available. The exact value depends on the implementation. Can be an empty _string_. *** _null_ if no *resolveInfo* is available. -** [[Reference.reference.reference]] _key_ `reference`{fn-org35} with _value_ as one of: +** [[Reference.reference.reference]] _name_ `reference`{fn-org35} with _value_ as one of: *** _string_ according to <<{m3}.adoc#identifiers, Identifier spec>>. Refers to the *id* of the target *node*. + @@ -223,14 +223,13 @@ NOTE: *parent* is the inverse relation of either one *containment* or one *annot + NOTE: The referred *node* can be contained in the processed document, but also can be outside the processed document (i.e. not contained in the processed document). -* _null_ if +* _null_ if{fn-org228} ** This *node* is a *root node*, i.e. this node does not have a parent. -** This serialization is sent as an update request. [[property-values]] === Property serialization All property values MUST be serialized as JSON _string_.{fn-org34}{fn-org9}. -An unset property SHOULD be serialized as JSON _null_. +An unset property SHOULD be serialized as JSON _null_.{fn-org59} [[string]] ==== String @@ -293,9 +292,9 @@ The string contains a JSON _object_ according to spec (RFC 8259) with proper esc The contents of the string are formed as follows: A <<{m3}.adoc#StructuredDataType, LionCore StructuredDataType>> is encoded as JSON _object_. -Each <<{m3}.adoc#Field, Field>> forms one _member_, with the field's <<{m3}.adoc#IKeyed.key, key>> as JSON _key_ and the field's value as JSON _value_. +Each <<{m3}.adoc#Field, Field>> forms one _member_, with the field's <<{m3}.adoc#IKeyed.key, key>> as JSON _name_ and the field's value as JSON _value_. For fields of type <>, <>, <>, and <>, the _value_ is encoded as JSON _string_ in the same way as for a property. -For fields of type <>, the value is encoded as JSON _object_ if the field is set, otherwise as JSON _null_. +For fields of type <>, the value is encoded as JSON _object_. .Structured datatypes used in the examples -- @@ -321,6 +320,7 @@ structured datatype ComplexNumber [id 30, key complex] real: Decimal [id 31, key complex-real] imaginary: Decimal [id 32, key complex-imaginary] +// INVALID -- recursive (uses itself as field type) structured datatype FullyQualifiedName [id 50, key fqn] name: String [id 40, key nm] nested: FullyQualifiedName [id 55, key nested] @@ -362,24 +362,6 @@ unescaped content: } ---- -* FullyQualifiedName _com.example.subdomain_: `"{\n \"nm\": \"com\",\n \"nested\": {\n \"nm\": \"example\",\n \"nested\": {\n \"nm\": \"subdomain\",\n \"nested\": null\n }\n }\n}"` -+ -unescaped content: -+ -[source, json] ----- -{ - "nm": "com", - "nested": { - "nm": "example", - "nested": { - "nm": "subdomain", - "nested": null - } - } -} ----- - .Invalid examples * Amount with non-string field values: `"{\n \"amount-val\": 42,\n \"amount-cur\": \"cur-eur\",\n \"digital\": false\n}"` + @@ -460,6 +442,25 @@ unescaped content: } ---- +* FullyQualifiedName _com.example.subdomain_ with itself as field type: `"{\n \"nm\": \"com\",\n \"nested\": {\n \"nm\": \"example\",\n \"nested\": {\n \"nm\": \"subdomain\",\n \"nested\": null\n }\n }\n}"` ++ +unescaped content: ++ +[source, json] +---- +{ + "nm": "com", + "nested": { + "nm": "example", + "nested": { + "nm": "subdomain", + "nested": null + } + } +} +---- + + * FullyQualifiedName with _null_ as string value for unset nested structured datatype: `"{\n \"nm\": \"com\",\n \"nested\": {\n \"nm\": \"example\",\n \"nested\": {\n \"nm\": \"subdomain\",\n \"nested\": \"null\"\n }\n }\n}"` + unescaped content: @@ -605,6 +606,13 @@ include::annotation-variants.json[] NOTE: The term "version" is a bit ambiguous within LionWeb.{fn-org172} This section lists all versions as they appear in <> and <<{m3}.adoc#Language.version, `Language.version`>> for languages `LionWeb-M3` and `LionWeb-builtins`. +=== 2025.1 +Technical name: `2025.1` + +* Editorial changes and clarifications. + +Refer to <<{roadmap}.adoc#release-2025.1, roadmap>> for details. + === 2024.1 Technical name: `2024.1` diff --git a/shared/issue-footnotes-imported.adoc b/shared/issue-footnotes-imported.adoc index 1168294..75adfc2 100644 --- a/shared/issue-footnotes-imported.adoc +++ b/shared/issue-footnotes-imported.adoc @@ -211,7 +211,7 @@ :fn-org262: footnote:org262[https://github.com/LionWeb-io/specification/issues/262[What happens to a derived node when base node changes? #262]] :fn-org263: footnote:org263[https://github.com/LionWeb-io/specification/issues/263[Introduce term "computed node" for all nodes in a derived model #263]] :fn-org264: footnote:org264[https://github.com/LionWeb-io/specification/issues/264[Scenarios for delta protocol #264]] -:fn-org265: footnote:org265[https://github.com/LionWeb-io/specification/issues/265[Value Types #265]] +:fn-org265: footnote:org265[https://github.com/LionWeb-io/specification/issues/265[Value Types / StructuredDataType #265]] :fn-org266: footnote:org266[https://github.com/LionWeb-io/specification/issues/266[Who updates resolveInfo in references on name changes? #266]] :fn-org267: footnote:org267[https://github.com/LionWeb-io/specification/issues/267[How does a delta client know about new partitions? #267]] :fn-org268: footnote:org268[https://github.com/LionWeb-io/specification/issues/268[How to subscribe to reference targets? #268]] @@ -226,10 +226,82 @@ :fn-org277: footnote:org277[https://github.com/LionWeb-io/specification/issues/277[Remove JSON standard Primitive Datatype #277]] :fn-org279: footnote:org279[https://github.com/LionWeb-io/specification/issues/279[Make LionCore M3 and builtins language definitions have version-dependent IDs #279]] :fn-org280: footnote:org280[https://github.com/LionWeb-io/specification/issues/280[Describe all types of deltas #280]] -:fn-org281: footnote:org281[https://github.com/LionWeb-io/specification/issues/281[Delta needs to support transactions / connected deltas #281]] +:fn-org281: footnote:org281[https://github.com/LionWeb-io/specification/issues/281[Delta needs to support composite commands / events #281]] :fn-org283: footnote:org283[https://github.com/LionWeb-io/specification/issues/283[Comparing nodes and the order of features #283]] :fn-org284: footnote:org284[https://github.com/LionWeb-io/specification/issues/284[Do we want generic or detailed delta messages? #284]] :fn-org285: footnote:org285[https://github.com/LionWeb-io/specification/issues/285[Deleting a node does not touch existing references to that node #285]] :fn-org286: footnote:org286[https://github.com/LionWeb-io/specification/issues/286[If we remove a node via delta protocol, do we also need to send events for all descendants? #286]] :fn-org287: footnote:org287[https://github.com/LionWeb-io/specification/issues/287[Do we include the optional parameters in delta events? #287]] :fn-org289: footnote:org289[https://github.com/LionWeb-io/specification/issues/289[We do not allow multiple property values #289]] +:fn-org290: footnote:org290[https://github.com/LionWeb-io/specification/issues/290[Define standard annotation language for M2 documentation #290]] +:fn-org291: footnote:org291[https://github.com/LionWeb-io/specification/issues/291[Do we separate basic model sync ("delta") from updates on changes ("notification") a la CQRS? #291]] +:fn-org292: footnote:org292[https://github.com/LionWeb-io/specification/issues/292[Enable loading a chunk even with unknown annotations #292]] +:fn-org293: footnote:org293[https://github.com/LionWeb-io/specification/issues/293[Repository does not need to keep a history (of commands) #293]] +:fn-org294: footnote:org294[https://github.com/LionWeb-io/specification/issues/294[Repository does not need to keep a history (git-like) #294]] +:fn-org295: footnote:org295[https://github.com/LionWeb-io/specification/issues/295[We don't assume a client has a local history of the model #295]] +:fn-org296: footnote:org296[https://github.com/LionWeb-io/specification/issues/296[Repo + protocol should be resilient against buggy / broken client requests #296]] +:fn-org297: footnote:org297[https://github.com/LionWeb-io/specification/issues/297[Repository doesn't maintain an understanding of the state of a client's model #297]] +:fn-org298: footnote:org298[https://github.com/LionWeb-io/specification/issues/298[Repo must tell client if command applied successfully #298]] +:fn-org299: footnote:org299[https://github.com/LionWeb-io/specification/issues/299[Repo must send all updates to all clients #299]] +:fn-org300: footnote:org300[https://github.com/LionWeb-io/specification/issues/300[Delta protocol doesn't need to know about M2 / Language #300]] +:fn-org301: footnote:org301[https://github.com/LionWeb-io/specification/issues/301[Is a repo required to distribute updates on all model states? #301]] +:fn-org302: footnote:org302[https://github.com/LionWeb-io/specification/issues/302[How does a client react on an unapplied command? #302]] +:fn-org303: footnote:org303[https://github.com/LionWeb-io/specification/issues/303[Unresolvable edit conflict scenario #303]] +:fn-org304: footnote:org304[https://github.com/LionWeb-io/specification/issues/304[Resolvable edit conflict scenario #304]] +:fn-org305: footnote:org305[https://github.com/LionWeb-io/specification/issues/305[Each command has a unique id #305]] +:fn-org306: footnote:org306[https://github.com/LionWeb-io/specification/issues/306[Each event must list all command ids it results from #306]] +:fn-org307: footnote:org307[https://github.com/LionWeb-io/specification/issues/307[Can an instance of an annotation appear in the language that defines the annotation? #307]] +:fn-org308: footnote:org308[https://github.com/LionWeb-io/specification/issues/308[Do we support serialization chunks that contain a language and its instance? #308]] +:fn-org311: footnote:org311[https://github.com/LionWeb-io/specification/issues/311[Do we allow unresolved annotation instances? #311]] +:fn-org312: footnote:org312[https://github.com/LionWeb-io/specification/issues/312[How to handle commands with invalid optional parameter value? #312]] +:fn-org313: footnote:org313[https://github.com/LionWeb-io/specification/issues/313[What's the command id of a bulk api store request? #313]] +:fn-org314: footnote:org314[https://github.com/LionWeb-io/specification/issues/314[How to report a command has completely been discarded, without any resulting event? #314]] +:fn-org315: footnote:org315[https://github.com/LionWeb-io/specification/issues/315[Change vs. Event #315]] +:fn-org316: footnote:org316[https://github.com/LionWeb-io/specification/issues/316[Repository error event #316]] +:fn-org317: footnote:org317[https://github.com/LionWeb-io/specification/issues/317[How fine-grained do we want to split up commands? #317]] +:fn-org318: footnote:org318[https://github.com/LionWeb-io/specification/issues/318[Repository should handle as much complexity as possible of delta protocol, relieving clients #318]] +:fn-org320: footnote:org320[https://github.com/LionWeb-io/specification/issues/320[We disallow concept nodes in annoations / annotation instances in containments #320]] +:fn-org321: footnote:org321[https://github.com/LionWeb-io/specification/issues/321[Moving a child between parents, replacing a child at the destination #321]] +:fn-org322: footnote:org322[https://github.com/LionWeb-io/specification/issues/322[We don't specify how client and/or repository react to mixed LionWeb versions #322]] +:fn-org323: footnote:org323[https://github.com/LionWeb-io/specification/issues/323[We strive for compatibility between different LionWeb versions, but don't guarantee it #323]] +:fn-org324: footnote:org324[https://github.com/LionWeb-io/specification/issues/324[Shouldn't Field also implement INamed? #324]] +:fn-org326: footnote:org326[https://github.com/LionWeb-io/specification/issues/326[If we add a subtree, do we emit one add per node or only one for the (added) root node of the tree? #326]] +:fn-org327: footnote:org327[https://github.com/LionWeb-io/specification/issues/327[Do we allow to add more than one node per AddChild command? #327]] +:fn-org328: footnote:org328[https://github.com/LionWeb-io/specification/issues/328[Term to use for optional event parameters #328]] +:fn-org329: footnote:org329[https://github.com/LionWeb-io/specification/issues/329[How fine-grained do we want reference commands? #329]] +:fn-org330: footnote:org330[https://github.com/LionWeb-io/specification/issues/330[events/commands' policy: We don't have parameters that modify the semantics, only to provide data #330]] +:fn-org331: footnote:org331[https://github.com/LionWeb-io/specification/issues/331[Do we allow additional data on events? #331]] +:fn-org332: footnote:org332[https://github.com/LionWeb-io/specification/issues/332[Do we allow additional data on commands? #332]] +:fn-org333: footnote:org333[https://github.com/LionWeb-io/specification/issues/333[If moving between partitions, how to inform subscribers to only one of them? #333]] +:fn-org334: footnote:org334[https://github.com/LionWeb-io/specification/issues/334[Base format for delta protocol #334]] +:fn-org335: footnote:org335[https://github.com/LionWeb-io/specification/issues/335[Include a computer-readable version of message structure in delta spec? #335]] +:fn-org337: footnote:org337[https://github.com/LionWeb-io/specification/issues/337[Define Delta Participation (was: Session) #337]] +:fn-org339: footnote:org339[https://github.com/LionWeb-io/specification/issues/339[Repository takes the final decision on any change to its contents #339]] +:fn-org340: footnote:org340[https://github.com/LionWeb-io/specification/issues/340[We don't support (distributed) transactions #340]] +:fn-org341: footnote:org341[https://github.com/LionWeb-io/specification/issues/341[Should we have an event sequence number? #341]] +:fn-org342: footnote:org342[https://github.com/LionWeb-io/specification/issues/342[Can a client request missing events by sequence number? #342]] +:fn-org343: footnote:org343[https://github.com/LionWeb-io/specification/issues/343[Scope of event sequence number #343]] +:fn-org344: footnote:org344[https://github.com/LionWeb-io/specification/issues/344[Do we have a "end Participation" / "sign-off" API? #344]] +:fn-org345: footnote:org345[https://github.com/LionWeb-io/specification/issues/345[Who assigns participation id? #345]] +:fn-org346: footnote:org346[https://github.com/LionWeb-io/specification/issues/346[Delta JSON: Shall we have abstract base types? #346]] +:fn-org347: footnote:org347[https://github.com/LionWeb-io/specification/issues/347[Delta JSON: Shall we have convenience types? #347]] +:fn-org348: footnote:org348[https://github.com/LionWeb-io/specification/issues/348[Do we need a "repository shutdown" event? #348]] +:fn-org349: footnote:org349[https://github.com/LionWeb-io/specification/issues/349[Can a client ask the repo if the participation is still alive? #349]] +:fn-org350: footnote:org350[https://github.com/LionWeb-io/specification/issues/350[Is participation handling a query or something else? #350]] +:fn-org351: footnote:org351[https://github.com/LionWeb-io/specification/issues/351[Does a CompositeEvent have its own sequence number? #351]] +:fn-org352: footnote:org352[https://github.com/LionWeb-io/specification/issues/352[Can a client change a node it is not subscribed to? #352]] +:fn-org353: footnote:org353[https://github.com/LionWeb-io/specification/issues/353[Does a composite command have its own commandId? #353]] +:fn-org354: footnote:org354[https://github.com/LionWeb-io/specification/issues/354[Reconnect query: Report invalid participation by error or by `participationValid` flag? #354]] +:fn-org355: footnote:org355[https://github.com/LionWeb-io/specification/issues/355[We don't support `swapNodes` command #355]] +:fn-org356: footnote:org356[https://github.com/LionWeb-io/specification/issues/356[How to react on commands that assume wrong current model state, but could still apply? #356]] +:fn-org357: footnote:org357[https://github.com/LionWeb-io/specification/issues/357[How to mark added node in DeltaSerializationChunk? #357]] +:fn-org358: footnote:org358[https://github.com/LionWeb-io/specification/issues/358[Does DeltaSerializationChunk have the same format as bulk SerializationChunk? #358]] +:fn-org359: footnote:org359[https://github.com/LionWeb-io/specification/issues/359[How does composite commandId and part commandId relate? #359]] +:fn-org360: footnote:org360[https://github.com/LionWeb-io/specification/issues/360[Can we nest composite commands / events? #360]] +:fn-org361: footnote:org361[https://github.com/LionWeb-io/specification/issues/361[Do we want `listPartitions` query in delta? #361]] +:fn-org362: footnote:org362[https://github.com/LionWeb-io/specification/issues/362[How does a Delta Chunk look like #362]] +:fn-org363: footnote:org363[https://github.com/LionWeb-io/specification/issues/363[We don't specify order of command execution #363]] +:fn-org364: footnote:org364[https://github.com/LionWeb-io/specification/issues/364[Should we define the list of used languages per Participation? #364]] +:fn-org365: footnote:org365[https://github.com/LionWeb-io/specification/issues/365[A client might use only one, or both, of bulk and delta protocol #365]] +:fn-org366: footnote:org366[https://github.com/LionWeb-io/specification/issues/366[A repository might support only one, or both, of bulk and delta protocol #366]] +:fn-org367: footnote:org367[https://github.com/LionWeb-io/specification/issues/367[Can the list of used languages in a chunk always be derived from the content? #367]]