Package com.google.walkaround.proto.GoogleImport.GoogleDocumentContent

Examples of com.google.walkaround.proto.GoogleImport.GoogleDocumentContent.ElementStart


    if (component.hasAnnotationBoundary()) {
      out.annotationBoundary(annotationBoundaryFrom(component.getAnnotationBoundary()));
    } else if (component.hasCharacters()) {
      out.characters(component.getCharacters());
    } else if (component.hasElementStart()) {
      ElementStart elementStart = component.getElementStart();
      out.elementStart(elementStart.getType(), attributesFrom(elementStart));
    } else if (component.hasElementEnd()) {
      if (!component.getElementEnd()) {
        throw new InvalidInputException("Element end present but false: " + component);
      }
      out.elementEnd();
View Full Code Here


    Preconditions.checkNotNull(keyAttributeName, "Null keyAttributeName");
    Preconditions.checkNotNull(valueAttributeName, "Null valueAttributeName");
    Map<String, String> out = Maps.newHashMap();
    for (Component component : doc.getComponentList()) {
      if (component.hasElementStart()) {
        ElementStart start = component.getElementStart();
        Assert.check(elementType.equals(start.getType()), "Unexpected element type: %s", doc);
        Map<String, String> attrs = Maps.newHashMap();
        for (KeyValuePair attr : start.getAttributeList()) {
          attrs.put(attr.getKey(), attr.getValue());
        }
        Assert.check(attrs.size() == 2, "Need two attrs: %s", doc);
        String key = attrs.get(keyAttributeName);
        String value = attrs.get(valueAttributeName);
View Full Code Here

TOP

Related Classes of com.google.walkaround.proto.GoogleImport.GoogleDocumentContent.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.