}
@Override
public void annotationBoundary(AnnotationBoundaryMap map) {
Component component = MessageFactoryHelper.createDocumentOperationComponent();
AnnotationBoundary boundary =
MessageFactoryHelper.createDocumentAnnotationBoundary();
int endSize = map.endSize();
int changeSize = map.changeSize();
if (endSize == 0 && changeSize == 0) {
boundary.setEmpty(true);
} else {
for (int i = 0; i < endSize; i++) {
boundary.addEnd(map.getEndKey(i));
}
for (int i = 0; i < changeSize; i++) {
boundary.addChange(createKeyValueUpdate(map.getChangeKey(i),
map.getOldValue(i), map.getNewValue(i)));
}
}
component.setAnnotationBoundary(boundary);
mutation.addComponent(component);