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

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


      }

      @Override
      public void updateAttributes(AttributesUpdate update) {
        Component component = MessageFactoryHelper.createDocumentOperationComponent();
        UpdateAttributes updateAttributes =
            MessageFactoryHelper.createDocumentUpdateAttributes();
        int n = update.changeSize();
        if (n == 0) {
          updateAttributes.setEmpty(true);
        } else {
          for (int i = 0; i < n; i++) {
          updateAttributes.addAttributeUpdate(createKeyValueUpdate(
              update.getChangeKey(i), update.getOldValue(i), update.getNewValue(i)));
          }
        }
        component.setUpdateAttributes(updateAttributes);
        mutation.addComponent(component);
View Full Code Here


  }

  @Override
  public AttributesUpdate getUpdateAttributesUpdate(int i) {
    Component component = provider.getContent().getComponent(i);
    UpdateAttributes r = component.getUpdateAttributes();
    return attributesUpdateFrom(r);
  }
View Full Code Here

      cursor.deleteElementEnd();
    } else if (component.hasReplaceAttributes()) {
      ReplaceAttributes r = component.getReplaceAttributes();
      cursor.replaceAttributes(oldAttributesFrom(r), newAttributesFrom(r));
    } else if (component.hasUpdateAttributes()) {
      UpdateAttributes r = component.getUpdateAttributes();
      cursor.updateAttributes(attributesUpdateFrom(r));
    } else {
      throw new DelayedInvalidInputException("Fell through in applyComponent: " + provider);
    }
  }
View Full Code Here

TOP

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

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.