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.
- 1. Conventions used in this document
- 2. Introduction
- 3. Description
- 4. Open questions
- 5. Scenarios
- 5.1. Virgin repository, first time client connects
- 5.2. Client reconnects to known partition
- 5.3. Client changes known node with remote update
- 5.4. Client changes known node with local update
- 5.5. Client tries to change unknown node with failed command
- 5.6. Client tries to change unknown node with failed event
- 5.7. Client with remote update changes property to same value as it already has
- 5.8. Repository has bug, needs to tell client it couldn’t apply its commands
- 5.9. Concurrent changes to known node with local update
- 5.10. Concurrent changes to known node with remote update
- 6. Messages
- 6.1. Parameter types
- 6.2. Errors
- 6.3. Queries
- 6.4. Command — event pairs overview
- 6.5. Commands
- 6.5.1. Lifecycle
- 6.5.2. Partitions
- 6.5.3. Nodes
- 6.5.4. Properties
- 6.5.5. Children
- 6.5.5.1. Add child
- 6.5.5.2. Delete child
- 6.5.5.3. Replace child
- 6.5.5.4. Move child from other containment
- 6.5.5.5. Move child from other containment in same parent
- 6.5.5.6. Move child in same containment
- 6.5.5.7. Move child from other containment and replace existing child
- 6.5.5.8. Move child from other containment in same parent and replace existing child
- 6.5.5.9. Move child in same containment and replace existing child
- 6.5.6. Annotations
- 6.5.6.1. Add annotation
- 6.5.6.2. Delete annotation
- 6.5.6.3. Replace annotation
- 6.5.6.4. Move annotation from other parent
- 6.5.6.5. Move annotation in same parent
- 6.5.6.6. Move annotation from other parent and replace existing annotation
- 6.5.6.7. Move annotation in same parent and replace existing annotation
- 6.5.7. References
- 6.5.7.1. Add reference
- 6.5.7.2. Delete reference
- 6.5.7.3. Change reference
- 6.5.7.4. Move entry from other reference
- 6.5.7.5. Move entry from other reference in same parent
- 6.5.7.6. Move entry in same reference
- 6.5.7.7. Move entry from other reference and replace existing entry
- 6.5.7.8. Move entry from other reference in same parent and replace existing entry
- 6.5.7.9. Move entry in same reference and replace existing entry
- 6.5.7.10. Add reference ResolveInfo
- 6.5.7.11. Delete reference ResolveInfo
- 6.5.7.12. Change reference ResolveInfo
- 6.5.7.13. Add reference target
- 6.5.7.14. Delete reference target
- 6.5.7.15. Change reference target
- 6.5.8. Composite
- 6.6. Events
- 6.6.1. Partitions
- 6.6.2. Nodes
- 6.6.3. Properties
- 6.6.4. Children
- 6.6.4.1. Child added
- 6.6.4.2. Child deleted
- 6.6.4.3. Child replaced
- 6.6.4.4. Child moved from other containment
- 6.6.4.5. Child moved from other containment in same parent
- 6.6.4.6. Child moved in same containment
- 6.6.4.7. Child moved from other containment and replaced existing child
- 6.6.4.8. Child moved from other containment in same parent and replaced existing child
- 6.6.4.9. Child moved in same containment and replaced existing child
- 6.6.5. Annotations
- 6.6.5.1. Annotation added
- 6.6.5.2. Annotation deleted
- 6.6.5.3. Annotation replaced
- 6.6.5.4. Annotation moved from other parent
- 6.6.5.5. Annotation moved in same parent
- 6.6.5.6. Annotation moved from other parent and replaced existing annotation
- 6.6.5.7. Annotation moved in same parent and replaced existing annotation
- 6.6.6. References
- 6.6.6.1. Reference added
- 6.6.6.2. Reference deleted
- 6.6.6.3. Reference changed
- 6.6.6.4. Entry moved from other reference
- 6.6.6.5. Entry moved from other reference in same parent
- 6.6.6.6. Entry moved in same reference
- 6.6.6.7. Entry moved from other reference and replaced existing entry
- 6.6.6.8. Entry moved from other reference in same parent and replaced existing entry
- 6.6.6.9. Entry moved in same reference and replaced existing entry
- 6.6.6.10. Reference ResolveInfo added
- 6.6.6.11. Reference ResolveInfo deleted
- 6.6.6.12. Reference ResolveInfo changed
- 6.6.6.13. Reference target added
- 6.6.6.14. Reference target deleted
- 6.6.6.15. Reference target changed
- 6.6.7. Miscellaneous
1. 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 BCP14 (RFC2119, RFC8174) when, and only when, they appear in all capitals, as shown here.
-
Footnotes refer to more discussions and rationale, but are non-normative.
2. Introduction
Delta API assumes a bidirectional communication channel. The client initiates the channel with the repository to open a participation[1]. Both parties communicate through the established channel via messages.
-
Queries 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 participations.[4]
-
Commands 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.[5] However, the repository processes the command asynchronously, and eventually broadcasts the effect(s) as event.
-
Events 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)[6]; this command might have been sent by this client or another client.[7] All clients receive the same events (given the same subscription scope and disregarding event sequence numbers).
A client describes the interesting part of the repository’s contents by specifying its subscription scope. The client receives only events on nodes within that scope.
A typical workflow for a client would be:
-
Client connects to repository and starts a participation.
-
Client subscribes to some partitions with subscription queries. The response contains a serialization chunk with the current contents of these partitions.
-
Client initiates its editor or processing with the chunk.
-
Client sends commands to request changes to some nodes in the subscribed partitions.
-
Client receives events with the actual changes that have been applied to the subscribed nodes.
-
Client updates its editor or processing with the event’s contents.
-
Client receives events originating from other clients' commands.
-
Client updates its editor or processing with the event’s contents.
-
Client ends the participation.
The repository is always the ultimate arbiter of its contents.[8] 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.[3]
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 onechildDeleted
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 nodeX
on the second command and changes the property as requested. It first emits achildDeleted
event (correlated to the first command), but laterchildAdded
andpropertyChanged
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.[9] The order is defined by the event’s sequence number.[10] 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.
2.1. Command overview
We specified the semantics of each command and event precisely, leading to lots of similar, but different commands/events.[11]
This table provides an overview of actions (rows) and element they apply to (columns).
Action | Child | Annotation | Reference | Property | Partition / Classifier |
---|---|---|---|---|---|
Add |
|||||
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[13] |
Move child from other containment and replace existing child |
Move annotation from other parent and replace existing annotation |
|||
Move from other feature in same node and replace existing[13] |
Move child from other containment in same parent and replace existing child |
Move entry from other reference in same parent and replace existing entry |
|||
Move in same feature in same node and replace existing[13] |
Move annotation in same parent and replace existing annotation |
||||
Composite |
3. Description
3.1. Client characteristics
A client is a program connecting to a repository. Each client has exactly one participation 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).[1]
The client has the responsibility to guarantee uniqueness of query and command ids within the same participation.
Authentication and authorization are out of scope of this API.
3.2. Channel characteristics
Logically, the channel has independent parts for each kind 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.
3.3. Participation characteristics
Each participation has a 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 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 starts by the client connecting to the repository via delta protocol. A participation ends either by the client ending it, or if the client disconnects involuntarily (e.g. by crashing or a connection failure).
A client can try to reconnect a participation if the client still knows a previously valid participation id, and the last event sequence number the client received.[14]
3.4. Event sequence numbers
Each event contains a sequence number.[10] This number is a positive integer that increments by one for each consecutive event. It is unique per participation.[15]
A client SHOULD use this number to order incoming events, and check whether the client missed any event.
3.5. Subscription characteristics
The subscription, or subscription scope, is the set of partitions a participation 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 partition; it includes all changes to the partition and all its descendants (including annotation instances).[16]
At the start of a participation, the subscription scope is empty. A client can change its subscription scope by subscribing to newly created partitions, or subscribe / unsubscribe 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.[17]
3.6. Message characteristics
Each message is atomic; it cannot be split.
Each message has some id unique to the participation:
-
kind
is an 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. -
data
is a flat map with arbitrary keys and values. All values MUST be strings, the keys MUST be identifier-compatible. A kind might imply presence of specific keys indata
.
This protocol message is symmetric to messages in bulk API.
4. 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 Delete child 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)[21] -→ postponed
-
How to report a command has completely been discarded, without any resulting event?[22] -→ NoOpEvent
5. Scenarios
5.1. Virgin repository, first time client connects
-
Client signs on to repository.
-
Repository confirms participation with participation id
client-a
. -
Client initiates new partition.
-
Client sends Add partition command with
nodeA
payload (details omitted) and command idcmd-1
. -
Repository registers command for processing.
-
Repository acknowledges reception of command with id
cmd-1
. -
Repository updates internal representation.
-
Repository creates event for update.
-
Repository emits event Partition added with
nodeA
payload and sequence number1
. It includes one CommandSource with value(client-a, cmd-1)
-
Client receives event and forwards information to editor.
-
Client draws
nodeA
.
5.2. Client reconnects to known partition
-
Client knows the relevant partition, wants to subscribe.
-
Client sends Subscribe to partition query with partition node id
partition-id
. -
Repository retrieves all contents of partition with node id
partition-id
. -
Repository found contents.
-
Repository responds to query with id
qry-1
with contents of 3 nodes:partitionNode
,childNodeA
,childNodeB
(details omitted). -
Client receives query result and forwards information to editor.
-
Client draws
childNodeA
andchildNodeB
.partitionNode
is not drawn, it represents the canvas.
5.3. Client changes known node with remote update
-
User enters new property value.
-
Client editor forwards user action into command.
-
Client sends Add property command with
nodeA
node id,age
property (details omitted),23
value and command idcmd-1
. -
Repository registers command for processing.
-
Repository acknowledges reception of command with id
cmd-1
. -
Client informs editor of command submission.
-
Repository updates internal representation.
-
Repository creates event for update.
-
Repository emits event Property added with
nodeA
node id,age
property (details omitted),23
value and sequence number1
. It includes one CommandSource with value(client-a, cmd-1)
-
Client receives event and forwards information to editor.
-
Client updates
nodeA
with new property value.
5.4. Client changes known node with local update
-
User enters new property value.
-
Client updates
nodeA
with new property value. -
Client editor forwards user action into command.
-
Client sends Add property command with
nodeA
node id,age
property (details omitted),23
value and command idcmd-1
. -
Repository registers command for processing.
-
Repository acknowledges reception of command with id
cmd-1
. -
Client registers processed command id
cmd-1
. -
Repository updates internal representation.
-
Repository creates event for update.
-
Repository emits event Property added with
nodeA
node id,age
property (details omitted),23
value and sequence number1
. It includes one CommandSource with value(client-a, cmd-1)
-
Client found a matching registered processed command id.
-
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. -
Another client sends Add property command with command id
cmd-x
(other parameters omitted). -
Repository updates internal representation.
-
Repository creates event for update.
-
Repository emits event Property added with sequence number
2
(other parameters omitted). It includes one CommandSource with value(other-client, cmd-x)
-
Client did not find any matching registered processed command id.
-
Client forwards information to editor.
-
Client updates with new property value.
5.5. Client tries to change unknown node with failed command
-
User enters new property value on node
nodeA
that’s known to the editor. -
Client editor forwards user action into command.
-
Client sends Add property command with
nodeA
node id,age
property (details omitted),23
value and command idcmd-1
. -
Repository checks whether it knows a node with id
nodeA
. -
Repository doesn’t know that node.
-
Repository refuses command.
-
Client informs editor of failed command.
-
Client informs user.
5.6. Client tries to change unknown node with failed event
-
User enters new property value on node
nodeA
that’s known to the editor. -
Client editor forwards user action into command.
-
Client sends Add property command with
nodeA
node id,age
property (details omitted),23
value and command idcmd-1
. -
Repository registers command for processing.
-
Repository acknowledges reception of command with id
cmd-1
. -
Client registers processed command id
cmd-1
. -
Client informs editor of command submission.
-
Repository realizes it does not know a node with id
nodeA
-
Repository creates event for notification.
-
Repository emits Error event with
unknownNode
error code,cannot add property to unknown node
message and sequence number1
. It includes one CommandSource with value(client-a, cmd-1)
. -
Client removes
cmd-1
from open commands list.
5.7. Client with remote update changes property to same value as it already has
-
User enters changed property value that’s the same value as the old value.
-
Client editor forwards user action into command.
-
Client sends Change property command with
nodeA
node id,age
property (details omitted),23
old value,23
new value and command idcmd-1
. -
Repository registers command for processing.
-
Repository acknowledges reception of command with id
cmd-1
. -
Client registers processed command id
cmd-1
. -
Client informs editor of command submission.
-
Repository determines no change to internal representation.
-
Repository creates event for notification.
-
Repository emits No-op event with CommandSource with value
(client-a, cmd-1)
and sequence number1
. -
Client removes
cmd-1
from open commands list.
5.8. Repository has bug, needs to tell client it couldn’t apply its commands
-
User enters new property value on node
nodeA
that’s known to the editor. -
Client editor forwards user action into command.
-
Client sends Add property command with
nodeA
node id,age
property (details omitted),23
value and command idcmd-1
. -
Repository registers command for processing.
-
Repository acknowledges reception of command with id
cmd-1
. -
Client registers processed command id
cmd-1
. -
Client informs editor of command submission.
-
Repository tries to update internal representation. Some error occurs (e.g. database unavailable).
-
Repository handles the error.
-
Repository creates event for notification.
-
Repository emits Error event with
internalError
error code,internal error occurred
message and sequence number1
. It includes one CommandSource with value(client-a, cmd-1)
. -
Client removes
cmd-1
from open commands list.
5.9. Concurrent changes to known node with local update
-
User enters new property value.
-
Client updates
nodeA
with new property value. -
Client editor forwards user action into command.
-
Client sends Add property command with
nodeA
node id,age
property (details omitted),23
value and command idcmd-1
. -
Repository registers command for processing.
-
Repository acknowledges reception of command with id
cmd-1
. -
Client registers processed command id
cmd-1
. -
Another client sends Add property command
nodeA
node id,age
property (details omitted),42
value and command idcmd-x
. -
Repository resolves concurrent updates t
nodeA
,age
property with "last write wins" strategy. Repository updates internal representation with value42
. -
Repository creates event for update.
-
Repository emits event Property added with
nodeA
node id,age
property (details omitted),23
value and sequence number1
. It includes one CommandSource with values(client-a, cmd-1)
and(other-client, cmd-x)
. -
Client found a matching registered processed command id.
-
Client unregisters processed command id
cmd-1
. -
Not all command sources could be matched against registered processed command ids. Client forwards information to editor.
-
Client updates with new property value.
5.10. Concurrent changes to known node with remote update
-
User enters new property value.
-
Client editor forwards user action into command.
-
Client sends Add property command with
nodeA
node id,age
property (details omitted),23
value and command idcmd-1
. -
Repository registers command for processing.
-
Repository acknowledges reception of command with id
cmd-1
. -
Client informs editor of command submission.
-
Another client sends Add property command
nodeA
node id,age
property (details omitted),42
value and command idcmd-x
. -
Repository resolves concurrent updates t
nodeA
,age
property with "last write wins" strategy. Repository updates internal representation with value42
. -
Repository creates event for update.
-
Repository emits event Property added with
nodeA
node id,age
property (details omitted),23
value and sequence number1
. It includes one CommandSource with values(client-a, cmd-1)
and(other-client, cmd-x)
. -
Client receives event and forwards information to editor.
-
Client updates
nodeA
with new property value.
6. Messages
6.1. Parameter types
protocolMessages |
Optional protocol messages. |
TargetNode |
Target’s node as id. |
MetaPointer |
MetaPointer-tuple to describe an M2 element (classifier, feature, etc.). Encoded as meta-pointer. |
PropertyValue |
Property value encoded as property value. |
ResolveInfo |
ResolveInfo of a reference as string.
Can be |
Index |
Position inside a multiple link or annotations as integer >= 0.
Cannot be |
Command |
Any command. |
CommandId |
Id of a command.[18] Same format as identifiers; must be unique per participation. |
QueryId |
Id of a query. Same format as identifiers; must be unique per participation. |
SerializationChunk | |
Event |
Any event. |
ParticipationId |
Id of a participation. Same format as identifiers; must be unique for all concurrent participations. |
CommandSource |
(ParticipationId, CommandId) tuple[6] this event is based on. This allows a client to know when its command has been processed (either successful or not). |
EventSequenceNumber |
event sequence number of this event. |
FreeId |
Free node id. |
DeltaProtocolVersion |
Version of the delta protocol, e.g. |
boolean |
A boolean value, i.e. either |
integer type |
An integer value. |
6.1.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
.
6.2. Errors
6.2.1. Invalid participation
The participation the client uses to communicate with the repository is not valid.
Possible reasons:
-
The participation never has been valid.
-
The client signed off.
-
The client disconnected.
invalidParticipation
6.2.2. Node already exists
Client tries to create a node with an id that already exists.
nodeAlreadyExists
6.2.3. Unknown node
Client tries to operate on a node unknown to the repository.
unknownNode
6.2.4. Unknown index
Client tries to operate on an index beyond the number of existing elements.
unknownIndex
6.2.5. Entry at index is not the given entry
Client provided an entry (either a node or a target/resolveInfo) and an index, but the entry is not at the given index.
indexNodeMismatch
6.2.6. Move without parent
Client tries to move a node that doesn’t have a parent.
moveWithoutParent
6.2.7. Invalid move
Client tries to move a node incompatible with the emitted command.
invalidMove
6.2.8. Undefined reference target
Client tries to set a reference with neither target
nor resolveInfo
undefinedReferenceTarget
6.3. Queries
6.3.1. Subscription
6.3.1.1. 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.[23]
creation |
boolean Whether this client wants to receive events on newly created partitions ( |
deletion |
boolean Whether this client wants to receive events on deleted partitions ( |
partitions |
boolean Whether this client wants to automatically subscribe to newly created partitions ( |
queryId |
QueryId Id of this query. |
protocolMessages |
queryId |
QueryId Id of this query. |
protocolMessages |
SubscribeToChangingPartitions
6.3.1.2. Subscribe to partition
partition |
TargetNode Node id of the partition this client wants to receive events of. |
queryId |
QueryId Id of this query. |
protocolMessages |
contents |
SerializationChunk Complete contents of |
queryId |
QueryId Id of this query. |
protocolMessages |
-
already subscribed to
partition
SubscribeToPartitionContents
6.3.1.3. Unsubscribe from partition
This client does not want to receive events on any changes to partition
or any of its descendants anymore.[24]
partition |
TargetNode Node id of the partition this client wants to stop receiving events of. |
queryId |
QueryId Id of this query. |
protocolMessages |
queryId |
QueryId Id of this query. |
protocolMessages |
-
not subscribed to
partition
UnsubscribeFromPartitionContents
6.3.2. Participation
Even though participation handling does not relate to repository contents, we consider them queries.[4].
6.3.2.1. Sign On (start a participation)
The client starts a participation.
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. |
deltaProtocolVersion | |
queryId |
QueryId Id of this query. |
protocolMessages |
participationId |
ParticipationId the repository assigns to this participation. |
queryId |
QueryId Id of this query. |
protocolMessages |
-
Unsupported delta protocol version
SignOn
6.3.2.2. Sign Off (end a participation)
The client ends a participation.[25]
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. |
queryId |
QueryId Id of this query. |
protocolMessages |
queryId |
QueryId Id of this query. |
protocolMessages |
SignOff
6.3.2.3. Reconnect (resume an existing participation)
The client has been technically disconnected, but still knows its participation id. Then the client can ask to reconnect to the repository.[14]
participationId |
ParticipationId The previously used participation id. |
lastReceivedSequenceNumber |
EventSequenceNumber Last event sequence number received by the client. |
queryId |
QueryId Id of this query. |
protocolMessages |
lastSentSequenceNumber |
EventSequenceNumber Last event sequence number sent by the repository. |
queryId |
QueryId Id of this query. |
protocolMessages |
-
Invalid participation If the participation is not valid.[26]
Reconnect
6.3.3. Miscellaneous
6.3.3.1. Get available ids
Same functionality as bulk API ids command.
We don’t assume leases, i.e. ids handed out to one client are "owned" by that client forever.
count |
integer type Number of ids requested. |
queryId |
QueryId Id of this query. |
protocolMessages |
ids |
FreeId[] List of ids guaranteed to be free.
The repository MUST return between one (inclusive) and |
queryId |
QueryId Id of this query. |
protocolMessages |
GetAvailableIds
6.3.3.2. List partitions
Lists all non-language partitions accessible in the repository.[27]
Same functionality as bulk API listPartitions command.
queryId |
QueryId Id of this query. |
protocolMessages |
partitions |
SerializationChunk All accessible 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 Languages or partition children/annotations. |
queryId |
QueryId Id of this query. |
protocolMessages |
ListPartitions
6.4. Command — event pairs overview
6.4.1. Partitions
Command / Event / Description | Before | After |
---|---|---|
nothing |
||
nothing |
6.4.2. Nodes
Command / Event / Description | Before | After |
---|---|---|
6.4.3. Properties
Command / Event / Description | Before | After |
---|---|---|
6.4.4. Children
Command / Event / Description | Before | After |
---|---|---|
Replace existing node |
||
Move existing node |
||
Move existing node |
||
Move existing node |
||
Move existing node |
||
Move existing node |
||
Move existing node |
6.4.5. Annotations
Command / Event / Description | Before | After |
---|---|---|
Delete existing node |
||
Replace existing node |
||
Move existing node |
||
Move existing node |
||
Move existing node |
||
Move existing node |
6.4.6. References
Command / Event / Description | Before | After |
---|---|---|
Delete existing |
||
Replace existing |
||
Move existing |
||
Move existing |
||
Move existing |
||
Move existing |
||
Move existing |
||
Move existing |
||
Add |
||
Delete existing |
||
Change ResolveInfo of existing entry inside |
||
Add |
||
Delete existing |
||
Change target of existing entry inside |
6.5. Commands
6.5.1. Lifecycle
6.5.2. Partitions
6.5.2.1. Add partition
Add newPartition
node as new partition.
Before | After |
---|---|
nothing |
newPartition |
SerializationChunk[28] 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). 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.[28] |
commandId |
CommandId Id of this command. |
protocolMessages |
AddPartition
6.5.2.2. Delete partition
Delete partition deletedPartition
, and all its descendants (including annotation instances).
Does NOT change references to any of the deleted nodes.[29]
Before | After |
---|---|
nothing |
deletedPartition | |
commandId |
CommandId Id of this command. |
protocolMessages |
DeletePartition
6.5.3. Nodes
6.5.3.1. Change classifier
Change classifier of node
to newClassifier
.
Before | After |
---|---|
node | |
newClassifier | |
commandId |
CommandId Id of this command. |
protocolMessages |
ChangeClassifier
6.5.4. Properties
6.5.4.1. Add property
Before | After |
---|---|
-
Unknown node for
node
AddProperty
6.5.4.2. Delete property
Before | After |
---|---|
-
Unknown node for
node
DeleteProperty
6.5.4.3. Change property
Before | After |
---|---|
-
Unknown node for
node
ChangeProperty
6.5.5. Children
6.5.5.1. 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.[28]
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond the number ofcontainment
entries inparent
)
AddChild
6.5.5.2. Delete child
Delete existing node deletedChild
[30] from parent
's containment
at index
, and all its descendants (including annotation instances).
Does NOT change references to any of the deleted nodes.[29]
Before | After |
---|---|
-
Unknown node for
parent
-
?
index
is beyond (the number ofcontainment
entries inparent
) - 1 -
Entry at index is not the given entry for
containment
/index
anddeletedChild
DeleteChild
6.5.5.3. Replace child
Delete current child replacedChild
[30] inside parent
's containment
at index
, and all its descendants (including annotation instances).
Does NOT change references to any of the deleted nodes.[29]
Replace existing node replacedChild
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.[28]
Before | After |
---|---|
-
Unknown node for
parent
-
Entry at index is not the given entry for
containment
/index
andreplacedChild
-
?
index
is beyond (the number ofcontainment
entries inparent
) - 1
ReplaceChild
6.5.5.4. Move child from other containment
Move existing node movedChild
inside newParent
's newContainment
at newIndex
.
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond the number ofnewContainment
entries innewParent
) -
?
movedChild
is already a child ofnewParent
MoveChildFromOtherContainment
6.5.5.5. 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
.
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond the number ofnewContainment
entries inmovedChild
's parent) -
Invalid move as
movedChild
is already a child insidenewContainment
MoveChildFromOtherContainmentInSameParent
6.5.5.6. Move child in same containment
Move existing node movedChild
within its current containment to newIndex
.
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond (the number ofmovedChild
's containment entries inmovedChild
's parent) - 1) -
Invalid move as
movedChild
is already atnewIndex
MoveChildInSameContainment
6.5.5.7. Move child from other containment and replace existing child
Move existing node movedChild
inside newParent
's newContainment
at newIndex
.
Delete current child replacedChild
[30] inside newParent
's newContainment
at newIndex
, and all its descendants (including annotation instances).
Does NOT change references to any of the deleted nodes.[29]
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond the number ofnewContainment
entries innewParent
) -
Entry at index is not the given entry for
newContainment
/newIndex
andreplacedChild
-
?
movedChild
is already a child ofnewParent
MoveAndReplaceChildFromOtherContainment
6.5.5.8. 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 replacedChild
[30] 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.[29]
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond the number ofnewContainment
entries inmovedChild
's parent) -
Invalid move as
movedChild
is already a child insidenewContainment
-
Entry at index is not the given entry for
newContainment
/newIndex
andreplacedChild
MoveAndReplaceChildFromOtherContainmentInSameParent
6.5.5.9. Move child in same containment and replace existing child
Move existing node movedChild
within its current containment to newIndex
.
Delete current child replacedChild
[30] inside the same containment at newIndex
, and all its descendants (including annotation instances).
Does NOT change references to any of the deleted nodes.[29]
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond (the number of `movedChild
's containment entries inmovedChild
's parent) - 2) -
Invalid move as
movedChild
is already atnewIndex
-
Entry at index is not the given entry for
newIndex
andreplacedChild
MoveAndReplaceChildInSameContainment
6.5.6. Annotations
6.5.6.1. 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.[28]
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond the number of annotations ofparent
)
AddAnnotation
6.5.6.2. Delete annotation
Delete existing node deletedAnnotation
[30] from parent
's annotations at index
, and all its descendants (including annotation instances).
Does NOT change references to any of the deleted nodes.[29]
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number of annotations ofparent
) - 1) -
Entry at index is not the given entry for
index
anddeletedAnnotation
DeleteAnnotation
6.5.6.3. Replace annotation
Delete current node replacedAnnotation
[30] at parent
's annotations at index
, and all its descendants (including annotation instances).
Does NOT change references to any of the deleted nodes.[29]
Replace existing node replacedAnnotation
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.[28]
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number of annotations ofparent
) - 1) -
Entry at index is not the given entry for
index
andreplacedAnnotation
ReplaceAnnotation
6.5.6.4. Move annotation from other parent
Move existing node movedAnnotation
inside newParent
's annotations at newIndex
.
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond the number of annotations ofnewParent
) -
?
movedAnnotation
is already an annotation ofnewParent
MoveAnnotationFromOtherParent
6.5.6.5. Move annotation in same parent
Move existing node movedAnnotation
within the same parent to newIndex
.
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond (the number of annotations ofmovedAnnotation
's parent) - 1)
MoveAnnotationInSameParent
6.5.6.6. Move annotation from other parent and replace existing annotation
Move existing node movedAnnotation
inside newParent
's annotations at newIndex
.
Delete current node replacedAnnotation
[30] at newParent
's annotations at newIndex
, and all its descendants (including annotation instances).
Does NOT change references to any of the deleted nodes.[29]
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond the number of annotations ofnewParent
) -
Entry at index is not the given entry for
newIndex
andreplacedAnnotation
-
?
movedAnnotation
is already an annotation ofnewParent
MoveAndReplaceAnnotationFromOtherParent
6.5.6.7. Move annotation in same parent and replace existing annotation
Move existing node movedAnnotation
within the same parent to newIndex
.
Delete current node replacedAnnotation
[30] 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.[29]
Before | After |
---|---|
-
Unknown index for
newIndex
(is beyond (the number of annotations ofmovedAnnotation
's parent) - 1) -
Entry at index is not the given entry for
newIndex
andreplacedAnnotation
MoveAndReplaceAnnotationInSameParent
6.5.7. References
6.5.7.1. Add reference
Add newTarget
/ newResolveInfo
to parent
's reference
at index
.
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond the number ofreference
entries ofparent
)
AddReference
6.5.7.2. Delete reference
Delete existing entry deletedTarget
/deletedResolveInfo
[30] from parent
's reference
at index
.
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number ofreference
entries ofparent
) - 1) -
Entry at index is not the given entry for
reference
/index
anddeletedTarget
/deletedResolveInfo
-
Undefined reference target for
deletedTarget
/deletedResolveInfo
DeleteReference
6.5.7.3. Change reference
Replace existing entry oldTarget
/oldResolveInfo
[30] inside parent
's reference
at index
with newTarget
/newResolveInfo
.
Before | After |
---|---|
parent | |
reference | |
index | |
oldTarget | |
oldResolveInfo | |
newTarget | |
newResolveInfo | |
commandId | |
protocolMessages |
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number ofreference
entries ofparent
) - 1) -
Entry at index is not the given entry for
reference
/index
andoldTarget
/oldResolveInfo
ChangeReference
6.5.7.4. Move entry from other reference
Move existing entry movedTarget
/movedResolveInfo
[30] inside oldParent
's oldReference
at oldIndex
to newParent
's newReference
at newIndex
.
Before | After |
---|---|
newParent | |
newReference | |
newIndex | |
oldParent | |
oldReference | |
oldIndex | |
movedTarget | |
movedResolveInfo | |
commandId | |
protocolMessages |
-
Unknown index for
newIndex
(is beyond (the number ofnewReference
entries ofnewParent
)) -
Unknown index for
oldIndex
(is beyond (the number ofoldReference
entries ofoldParent
) - 1) -
Entry at index is not the given entry for
oldReference
/oldIndex
andmovedTarget
/movedResolveInfo
MoveEntryFromOtherReference
6.5.7.5. Move entry from other reference in same parent
Move existing entry movedTarget
/movedResolveInfo
[30] inside parent
's oldReference
at oldIndex
to parent
's newReference
at newIndex
.
Before | After |
---|---|
parent | |
newReference | |
newIndex | |
oldReference | |
oldIndex | |
movedTarget | |
movedResolveInfo | |
commandId | |
protocolMessages |
-
Unknown node for
parent
-
Unknown index for
newIndex
(is beyond (the number ofnewReference
entries ofparent
)) -
Unknown index for
oldIndex
(is beyond (the number ofoldReference
entries ofparent
) - 1) -
Entry at index is not the given entry for
oldReference
/oldIndex
andmovedTarget
/movedResolveInfo
MoveEntryFromOtherReferenceInSameParent
6.5.7.6. Move entry in same reference
Move existing entry movedTarget
/movedResolveInfo
[30] inside parent
's reference
at oldIndex
inside parent
's reference
at newIndex
.
Before | After |
---|---|
parent | |
reference | |
oldIndex | |
newIndex | |
movedTarget | |
movedResolveInfo | |
commandId | |
protocolMessages |
-
Unknown node for
parent
-
Unknown index for
newIndex
(is beyond (the number ofreference
entries ofparent
) - 1) -
Unknown index for
oldIndex
(is beyond (the number ofreference
entries ofparent
) - 1) -
Entry at index is not the given entry for
reference
/oldIndex
andmovedTarget
/movedResolveInfo
MoveEntryInSameReference
6.5.7.7. Move entry from other reference and replace existing entry
Move existing entry movedTarget
/movedResolveInfo
[30] inside oldParent
's oldReference
at oldIndex
to newParent
's newReference
at newIndex
,
replacing existing entry replacedTarget
/replacedResolveInfo
[30] in newParent
's newReference
at newIndex
.
Before | After |
---|---|
newParent | |
newReference | |
newIndex | |
replacedTarget | |
replacedResolveInfo | |
oldParent | |
oldReference | |
oldIndex | |
movedTarget | |
movedResolveInfo | |
commandId | |
protocolMessages |
-
Unknown index for
newIndex
(is beyond (the number ofnewReference
entries ofnewParent
) - 1) -
Unknown index for
oldIndex
(is beyond (the number ofoldReference
entries ofoldParent
) - 1) -
Entry at index is not the given entry for
newReference
/newIndex
andreplacedTarget
/replacedResolveInfo
-
Entry at index is not the given entry for
oldReference
/oldIndex
andmovedTarget
/movedResolveInfo
-
Undefined reference target for
replacedTarget
/replacedResolveInfo
MoveAndReplaceEntryFromOtherReference
6.5.7.8. Move entry from other reference in same parent and replace existing entry
Move existing entry movedTarget
/movedResolveInfo
[30] inside parent
's oldReference
at oldIndex
to parent
's newReference
at newIndex
,
replacing existing entry replacedTarget
/replacedResolveInfo
[30] in parent
's newReference
at newIndex
.
Before | After |
---|---|
parent | |
newReference | |
newIndex | |
replacedTarget | |
replacedResolveInfo | |
oldReference | |
oldIndex | |
movedTarget | |
movedResolveInfo | |
commandId | |
protocolMessages |
-
Unknown node for
parent
-
Unknown index for
newIndex
(is beyond (the number ofnewReference
entries ofparent
) - 1) -
Unknown index for
oldIndex
(is beyond (the number ofoldReference
entries ofparent
) - 1) -
Entry at index is not the given entry for
newReference
/newIndex
andreplacedTarget
/replacedResolveInfo
-
Entry at index is not the given entry for
oldReference
/oldIndex
andmovedTarget
/movedResolveInfo
-
Undefined reference target for
replacedTarget
/replacedResolveInfo
MoveAndReplaceEntryFromOtherReferenceInSameParent
6.5.7.9. Move entry in same reference and replace existing entry
Move existing entry movedTarget
/movedResolveInfo
[30] inside parent
's reference
at oldIndex
inside parent
's reference
at newIndex
,
replacing existing entry replacedTarget
/replacedResolveInfo
[30] in parent
's reference
at newIndex
.
Before | After |
---|---|
parent | |
reference | |
oldIndex | |
movedTarget | |
movedResolveInfo | |
newIndex | |
replacedTarget | |
replacedResolveInfo | |
commandId | |
protocolMessages |
-
Unknown node for
parent
-
Unknown index for
newIndex
(is beyond (the number ofreference
entries ofparent
) - 2) -
Unknown index for
oldIndex
(is beyond (the number ofreference
entries ofparent
) - 1) -
Entry at index is not the given entry for
reference
/oldIndex
andmovedTarget
/movedResolveInfo
-
Entry at index is not the given entry for
reference
/newIndex
andreplacedTarget
/replacedResolveInfo
-
Undefined reference target for
replacedTarget
/replacedResolveInfo
MoveAndReplaceEntryInSameReference
6.5.7.10. Add reference ResolveInfo
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number ofreference
entries ofparent
) - 1) -
Entry at index is not the given entry for
reference
/index
andtarget
AddReferenceResolveInfo
6.5.7.11. Delete reference ResolveInfo
Delete existing deletedResolveInfo
from existing entry target
[30] inside parent
's reference
at index
.
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number ofreference
entries ofparent
) - 1) -
Undefined reference target as target is
null
-
Entry at index is not the given entry for
reference
/index
andtarget
/deletedResolveInfo
DeleteReferenceResolveInfo
6.5.7.12. Change reference ResolveInfo
Change oldResolveInfo
of existing entry target
[30] inside parent
's reference
at index
to newResolveInfo
.
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number ofreference
entries ofparent
) - 1)
ChangeReferenceResolveInfo
6.5.7.13. Add reference target
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number ofreference
entries ofparent
) - 1) -
Entry at index is not the given entry for
reference
/index
andresolveInfo
AddReferenceTarget
6.5.7.14. Delete reference target
Delete existing deletedTarget
from existing entry resolveInfo
[30] inside parent
's reference
at index
.
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number ofreference
entries ofparent
) - 1) -
Entry at index is not the given entry for
reference
/index
anddeletedTarget
/resolveInfo
DeleteReferenceTarget
6.5.7.15. Change reference target
Before | After |
---|---|
-
Unknown node for
parent
-
Unknown index for
index
(is beyond (the number ofreference
entries ofparent
) - 1) -
Entry at index is not the given entry for
reference
/index
andoldTarget
/resolveInfo
ChangeReferenceTarget
6.5.8. Composite
6.5.8.1. Composite
Groups several commands into a logical group.[31] 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.[32] We can nest composite commands arbitrarily.[33]
parts |
Command[] |
protocolMessages |
-
accumulation of all errors of
parts
CompositeCommand
6.6. Events
6.6.1. Partitions
6.6.1.1. 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.
PartitionAdded
6.6.1.2. Partition deleted
Partition deletedPartition
, and all its deletedDescendants
[34], have been deleted from the repository.
This client is now unsubscribed from any changes to deletedPartition
or any of its descendants.
PartitionDeleted
6.6.2. Nodes
6.6.2.1. Classifier changed
Classifier of node
has been changed from oldClassifier
to newClassifier
.
ClassifierChanged
6.6.3. Properties
6.6.3.1. Property added
PropertyAdded
6.6.3.2. Property deleted
PropertyDeleted
6.6.4. Children
6.6.4.1. 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.[35]
All other children inside parent
's containment
with index >= index
have been moved to next higher index.
ChildAdded
6.6.4.2. Child deleted
Existing node deletedChild
, and all its deletedDescendants
[34], have been deleted from parent
's containment
at index
.[36]
All other children inside parent
's containment
with index > index
have been moved to next lower index.
deletedChild | |
deletedDescendants | |
parent | |
containment | |
index | |
originCommands | |
sequenceNumber | |
protocolMessages |
ChildDeleted
6.6.4.3. Child replaced
Existing node replacedChild
, and all its replacedDescendants
[34], 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.[35]
replacedChild
, and all its descendants, have been deleted.
newChild | |
replacedChild | |
replacedDescendants | |
parent | |
containment | |
index | |
originCommands | |
sequenceNumber | |
protocolMessages |
ChildReplaced
6.6.4.4. 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.
newParent | |
newContainment | |
newIndex | |
movedChild | |
oldParent | |
oldContainment | |
oldIndex | |
originCommands | |
sequenceNumber | |
protocolMessages |
ChildMovedFromOtherContainment
6.6.4.5. 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.
newContainment | |
newIndex | |
movedChild | |
parent | |
oldContainment | |
oldIndex | |
originCommands | |
sequenceNumber | |
protocolMessages |
ChildMovedFromOtherContainmentInSameParent
6.6.4.6. 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]
newIndex | |
movedChild | |
parent | |
containment | |
oldIndex | |
originCommands | |
sequenceNumber | |
protocolMessages |
ChildMovedInSameContainment
6.6.4.7. 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 replacedDescendants
[34], 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.
newParent | |
newContainment | |
newIndex | |
movedChild | |
oldParent | |
oldContainment | |
oldIndex | |
replacedChild | |
replacedDescendants | |
originCommands | |
sequenceNumber | |
protocolMessages |
ChildMovedAndReplacedFromOtherContainment
Move child from other containment and replace existing child
6.6.4.8. 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 replacedDescendants
[34], 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.
newContainment | |
newIndex | |
movedChild | |
parent | |
oldContainment | |
oldIndex | |
replacedChild | |
replacedDescendants | |
originCommands | |
sequenceNumber | |
protocolMessages |
ChildMovedAndReplacedFromOtherContainmentInSameParent
6.6.4.9. 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 replacedDescendants
[34], 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]
newIndex | |
movedChild | |
parent | |
containment | |
oldIndex | |
replacedChild | |
replacedDescendants | |
originCommands | |
sequenceNumber | |
protocolMessages |
ChildMovedAndReplacedInSameContainment
6.6.5. Annotations
6.6.5.1. 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.[35]
All other annotations inside parent
's annotations with index >= index
have been moved to next higher index.
AnnotationAdded
6.6.5.2. Annotation deleted
Existing node deletedAnnotation
, and all its deletedDescendants
[34], have been deleted from parent
's annotations at index
.[36]
All other annotations inside parent
's annotations with index > index
have been moved to next lower index.
deletedAnnotation | |
deletedDescendants | |
parent | |
index | |
originCommands | |
sequenceNumber | |
protocolMessages |
AnnotationDeleted
6.6.5.3. Annotation replaced
Existing node replacedAnnotation
, and all its replacedDescendants
[34], 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.[35]
replacedAnnotation
, and all its descendants, have been deleted.
newAnnotation | |
replacedAnnotation | |
replacedDescendants | |
parent | |
index | |
originCommands | |
sequenceNumber | |
protocolMessages |
AnnotationReplaced
6.6.5.4. 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.
newParent | |
newIndex | |
movedAnnotation | |
oldParent | |
oldIndex | |
originCommands | |
sequenceNumber | |
protocolMessages |
AnnotationMovedFromOtherParent
6.6.5.5. 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]
AnnotationMovedInSameParent
6.6.5.6. 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 replacedDescendants
[34], 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.
newParent | |
newIndex | |
movedAnnotation | |
oldParent | |
oldIndex | |
replacedAnnotation | |
replacedDescendants | |
originCommands | |
sequenceNumber | |
protocolMessages |
AnnotationMovedAndReplacedFromOtherParent
6.6.5.7. 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 replacedDescendants
[34], have been deleted.
If oldIndex
< newIndex
: All other annotations inside parent
's annotations 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 annotations 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]
newIndex | |
movedAnnotation | |
parent | |
oldIndex | |
replacedAnnotation | |
replacedDescendants | |
originCommands | |
sequenceNumber | |
protocolMessages |
AnnotationMovedAndReplacedInSameParent
Move annotation in same parent and replace existing annotation
6.6.6. References
6.6.6.1. 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.
parent | |
reference | |
index | |
newTarget | |
newResolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
ReferenceAdded
6.6.6.2. 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.
parent | |
reference | |
index | |
deletedTarget | |
deletedResolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
ReferenceDeleted
6.6.6.3. Reference changed
Existing reference with oldTarget
/oldResolveInfo
inside parent
's annotations at index
has been replaced with newTarget
/newResolveInfo
.
parent | |
reference | |
index | |
newTarget | |
newResolveInfo | |
oldTarget | |
oldResolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
ReferenceChanged
6.6.6.4. 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.
newParent | |
newReference | |
newIndex | |
oldParent | |
oldReference | |
oldIndex | |
target | |
resolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
EntryMovedFromOtherReference
6.6.6.5. 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.
parent | |
newReference | |
newIndex | |
oldReference | |
oldIndex | |
target | |
resolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
EntryMovedFromOtherReferenceInSameParent
6.6.6.6. 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]
parent | |
reference | |
oldIndex | |
newIndex | |
target | |
resolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
EntryMovedInSameReference
6.6.6.7. 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.
newParent | |
newReference | |
newIndex | |
movedTarget | |
movedResolveInfo | |
oldParent | |
oldReference | |
oldIndex | |
replacedTarget | |
replacedResolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
EntryMovedAndReplacedFromOtherReference
6.6.6.8. 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.
parent | |
newReference | |
newIndex | |
movedTarget | |
movedResolveInfo | |
oldReference | |
oldIndex | |
replacedTarget | |
replacedResolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
EntryMovedAndReplacedFromOtherReferenceInSameParent
6.6.6.9. 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 reference
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 reference
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]
parent | |
reference | |
newIndex | |
movedTarget | |
movedResolveInfo | |
oldIndex | |
replacedTarget | |
replacedResolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
EntryMovedAndReplacedInSameReference
6.6.6.10. Reference ResolveInfo added
newResolveInfo
has been added as ResolveInfo to existing entry inside parent
's reference
at index
with target
.
parent | |
reference | |
index | |
newResolveInfo | |
target | |
originCommands | |
sequenceNumber | |
protocolMessages |
ReferenceResolveInfoAdded
6.6.6.11. Reference ResolveInfo deleted
ResolveInfo deletedResolveInfo
has been deleted from existing entry inside parent
's reference
at index
with target
.
parent | |
reference | |
index | |
target | |
deletedResolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
ReferenceResolveInfoDeleted
6.6.6.12. Reference ResolveInfo changed
ResolveInfo of existing entry inside parent
's reference
at index
with target
has been changed from replacedResolveInfo
to newResolveInfo
.
parent | |
reference | |
index | |
newResolveInfo | |
target | |
replacedResolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
ReferenceResolveInfoChanged
6.6.6.13. Reference target added
newTarget
has been added as target to existing entry inside parent
's reference
at index
with resolveInfo
.
parent | |
reference | |
index | |
newTarget | |
resolveInfo | |
originCommands | |
sequenceNumber | |
protocolMessages |
ReferenceTargetAdded
6.6.6.14. Reference target deleted
Target deletedTarget
has been deleted from existing entry inside parent
's reference
at index
with resolveInfo
.
parent | |
reference | |
index | |
resolveInfo | |
deletedTarget | |
originCommands | |
sequenceNumber | |
protocolMessages |
ReferenceTargetDeleted
6.6.6.15. Reference target changed
Target of existing entry inside parent
's reference
at index
with resolveInfo
has been changed from replacedTarget
to newTarget
.
parent | |
reference | |
index | |
newTarget | |
resolveInfo | |
replacedTarget | |
originCommands | |
sequenceNumber | |
protocolMessages |
ReferenceTargetChanged
6.6.7. Miscellaneous
6.6.7.1. Composite
Composite events don’t mention origin commands on their own; they are only mentioned in each part.[6] We can nest composite events arbitrarily.[33]
parts |
Event[] |
protocolMessages |
CompositeEvent
6.6.7.2. No-op
Nothing happened as result of one or more command(s).[22]
NoOpEvent
none
6.6.7.3. Error
Repository couldn’t handle one or more command(s).[37]
Error
none