Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation:
de.fu_berlin.inf.dpp.concurrent.jupiter.InclusionTransformation

List of all members.

Public Member Functions

Operation transform (Operation op1, Operation op2, Object param)
int transformIndex (int index, Operation op, Object param)

Protected Member Functions

Operation transform (InsertOperation insA, InsertOperation insB, boolean isTransformPrivileged)
Operation transform (InsertOperation insA, DeleteOperation delB)
Operation transform (DeleteOperation delA, InsertOperation insB)
Operation transform (DeleteOperation delA, DeleteOperation delB)

Detailed Description

Implementation of the GOTO operational transformation functions. The pseudo code can be found in the paper "Achieving Convergence, Causality-preservation, and Intention-preservation in Real-time cooperative Editing Systems" by Chengzheng Sun, Xiaohua Jia, Yanchun Zhang, Yun Yang, and David Chen.


Member Function Documentation

Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform ( Operation  op1,
Operation  op2,
Object  param 
)

Transform operation op1 in the context of another operation op2. The transformed operation op1' is returned.

Parameters:
op1the operation to transform
op2the operation which is the context for the other one
parama boolean flag to privilege the first operation op1 (i.e. remains unchanged) when two insert operations are equivalent i.e. they have the same position and origin index.
Returns:
the transformed operation op1'

A NoOperation is not affected.

If the context is null, we return op1 unchanged.

Given two operations s1 and s2 to be transformed in the context of op2, we need to calculate s1' as t(s1, op2) and s2' as t(s2, op2') where op2' is t(op2, s1)

O s1 / \ op2 O O s2 / \ / s1' O O \ / s2' O

Given an operation op1 to be transformed in the context of two operations s1 and s2, we need to calculate op1' as t(op1', s2) where op1' is t(op1, s1)

O s1 / \ op1 O O s2 / \ / O O op1'\ / O

Implements de.fu_berlin.inf.dpp.concurrent.jupiter.InclusionTransformation.

Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform ( DeleteOperation  delA,
DeleteOperation  delB 
) [protected]
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform ( DeleteOperation  delA,
InsertOperation  insB 
) [protected]
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform ( InsertOperation  insA,
DeleteOperation  delB 
) [protected]
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform ( InsertOperation  insA,
InsertOperation  insB,
boolean  isTransformPrivileged 
) [protected]
int de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transformIndex ( int  index,
Operation  op,
Object  param 
)

Transforms an index against the given operation.

Parameters:
indexthe index to be transformed
opthe Operation to be transformed
paraman additional implementation dependent parameter
Returns:
the transformed index

Implements de.fu_berlin.inf.dpp.concurrent.jupiter.InclusionTransformation.

 All Classes Namespaces Files Functions Variables Enumerations