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

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


    }
    return attribute;
  }

  private static ElementStart createElementStart(String type, Attributes attrs) {
    ElementStart elementStart = MessageFactoryHelper.createDocumentElementStart();
    elementStart.setType(type);
    for (Map.Entry<String, String> attribute : attrs.entrySet()) {
      elementStart.addAttribute(
          createKeyValuePair(attribute.getKey(), attribute.getValue()));
    }
    return elementStart;
  }
View Full Code Here


  }

  @Override
  public Attributes getDeleteElementStartAttributes(int i) {
    Component component = provider.getContent().getComponent(i);
    ElementStart elementStart = component.getDeleteElementStart();
    return attributesFrom(elementStart);
  }
View Full Code Here

  }

  @Override
  public String getDeleteElementStartTag(int i) {
    Component component = provider.getContent().getComponent(i);
    ElementStart elementStart = component.getDeleteElementStart();
    return elementStart.getType();
  }
View Full Code Here

  }

  @Override
  public Attributes getElementStartAttributes(int i) {
    Component component = provider.getContent().getComponent(i);
    ElementStart elementStart = component.getElementStart();
    return attributesFrom(elementStart);
  }
View Full Code Here

  }

  @Override
  public String getElementStartTag(int i) {
    Component component = provider.getContent().getComponent(i);
    ElementStart elementStart = component.getElementStart();
    return elementStart.getType();
  }
View Full Code Here

    } else if (component.hasCharacters()) {
      cursor.characters(component.getCharacters());
    } else if (component.hasDeleteCharacters()) {
      cursor.deleteCharacters(component.getDeleteCharacters());
    } else if (component.hasElementStart()) {
      ElementStart elementStart = component.getElementStart();
      cursor.elementStart(elementStart.getType(), attributesFrom(elementStart));
    } else if (component.hasElementEnd()) {
      if (!component.getElementEnd()) {
        throw new DelayedInvalidInputException("Element end present but false: " +
            provider.getContent());
      }
      cursor.elementEnd();
    } else if (component.hasDeleteElementStart()) {
      ElementStart elementStart = component.getDeleteElementStart();
      cursor.deleteElementStart(elementStart.getType(), attributesFrom(elementStart));
    } else if (component.hasDeleteElementEnd()) {
      if (!component.getDeleteElementEnd()) {
        throw new DelayedInvalidInputException("Delete element end present but false: " + provider);
      }
      cursor.deleteElementEnd();
View Full Code Here

TOP

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

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.