Package com.google.walkaround.proto.ProtocolDocumentOperation.Component

Examples of com.google.walkaround.proto.ProtocolDocumentOperation.Component.KeyValueUpdate


    return attribute;
  }

  private static KeyValueUpdate createKeyValueUpdate(
      String key, String oldValue, String newValue) {
    KeyValueUpdate attribute = MessageFactoryHelper.createDocumentKeyValueUpdate();
    attribute.setKey(key);
    if (oldValue != null) {
      attribute.setOldValue(oldValue);
    }
    if (newValue != null) {
      attribute.setNewValue(newValue);
    }
    return attribute;
  }
View Full Code Here


  }

  private AttributesUpdate attributesUpdateFrom(UpdateAttributes message) {
    List<AttributeUpdate> updates = new ArrayList<AttributeUpdate>();
    for (int i = 0; i < message.getAttributeUpdateSize(); i++) {
      KeyValueUpdate p = message.getAttributeUpdate(i);
      updates.add(new AttributeUpdate(p.getKey(), p.hasOldValue() ? p.getOldValue() : null,
          p.hasNewValue() ? p.getNewValue() : null));
    }
    return createAttributesUpdateImpl(updates);
  }
View Full Code Here

    for (int i = 0; i < endKeys.length; i++) {
      endKeys[i] = message.getEnd(i);
    }
    for (int i = 0; i < changeKeys.length; i++) {
      KeyValueUpdate change = message.getChange(i);
      changeKeys[i] = change.getKey();
      changeOldValues[i] = change.hasOldValue() ? change.getOldValue() : null;
      changeNewValues[i] = change.hasNewValue() ? change.getNewValue() : null;
    }

    try {
      return AnnotationBoundaryMapImpl.builder()
          .initializationEnd(endKeys)
View Full Code Here

TOP

Related Classes of com.google.walkaround.proto.ProtocolDocumentOperation.Component.KeyValueUpdate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.