Research and Development 1/^Archief/2009-2010/14/Deltacodering
Uit Werkplaats
< Research and Development 1 | ^Archief | 2009-2010 | 14
Inhoud
Standaardtypes
Dit zijn de standaarttypes die voor het coderen van delta's gebruikt worden.
Wiretypes
- WIRETYPE_VARINT = 0
- WIRETYPE_LENGTH_DELIMITED = 2
tag
arguments: int fieldnumber, int wiretype
- varint32 ( (fieldnumber << 3) | wiretype)
message
arguments: int fieldnumber, object
- tag(fieldnumber, WIRETYPE_LENGTH_DELIMITED)
- varint32 size
- object
- unknownfields(object)
string
arguments: int fieldnumber, string value
- tag(fieldnumber, WIRETYPE_LENGTH_DELIMITED)
- varint32 size
- rawbyte[] utf8(value)
int32
arguments: int fieldnumber, int value
- tag(fieldnumber, WIRETYPE_VARINT)
- value >= 0?
- varint32 value
- else
- varint64 value
int64
arguments: int fieldnumber, long value
- tag(fieldnumber, WIRETYPE_VARINT)
- varint64 value
bool
arguments: int fieldnumber, bool value
- tag(fieldnumber, WIRETYPE_VARINT)
- rawbyte value ? 1 : 0;
bytes
arguments: int fieldnumber, byte[] value
- tag(fieldnumber, WIRETYPE_LENGTH_DELIMITED)
- varint32 size
- rawbyte[] value
enum
arguments: int fieldnumber, int value
- tag(fieldnumber, WIRETYPE_VARINT)
- varint value
varint32/64
arguments: int/long value
- 1bit moreDataFollowing
- 7bit data
...
- 1bit moreDataFollowing = 0
- 7bit data
Messages
Dit zijn de door FedOne geïmplementeerde messages
appliedDelta
- message signedOriginalDelta
- message hashedVersion
- int32 operationsApplied
- int64 timestamp
signedDelta
- bytes delta
- message[] protocolSignature
protocolSignature
- bytes signatureBytes
- bytes signerId
- enum signatureAlgorithm //alleen SHA1_RSA = 1
delta
- message hashedVersion
- string author
- message[] operation
- string[] address
hashedVersion
- int64 version
- bytes historyHash
operation
- string addParticipant
- string removeParticipant
- message mutateDocument
- bool noOp
mutateDocument
- string documentId
- message documentOperation
documentOperation
- message[] component
component
- message annotationBoundary
- string characters
- message elementStart;
- bool elementEnd
- int32 retainItemCount
- string deleteCharacters
- message elementStart deleteElementStart
- bool deleteElementEnd
- message replaceAttributes
- message updateAttributes
annotationBoundary
- bool empty
- string[] element
- message[] keyValueUpdate changeList
elementStart
- string type
- message[] keyvaluepair attributes
replaceAttributes
- bool empty
- message[] keyvaluepair oldAttributes
- message[] keyvaluepair newAttributes
updateAttributes
- bool empty
- message[] keyValueUpdate attributeUpdates
keyValueUpdate
- string key
- string oldValue
- string newValue
keyValuePair
- string key
- string value