Package org.waveprotocol.wave.model.document.util

Examples of org.waveprotocol.wave.model.document.util.XmlStringBuilder.wrap()


  private void assertManifestXml(final String expected) {
    manifestDoc.with(new Action() {
      @Override
      public <N, E extends N, T extends N> void exec(MutableDocument<N, E, T> doc) {
        XmlStringBuilder exp = XmlStringBuilder.createFromXmlString(expected);
        assertStructureEquivalent(exp.wrap("conversation"), doc);
      }
    });
  }

  /**
 
View Full Code Here


      for (Map.Entry<String, String> entry : state.entrySet()) {
        builder.append(
            GadgetXmlUtil.constructStateXml(entry.getKey(), entry.getValue()));
      }
    }
    builder.wrap(
        TAGNAME,
        URL_ATTRIBUTE, url,
        TITLE_ATTRIBUTE, "",
        PREFS_ATTRIBUTE, prefs != null ? prefs : "",
        STATE_ATTRIBUTE, "",
View Full Code Here

           child != null; child = doc.getNextSibling(child)) {
        builder.append(augmentBuilder(child, inclusion));
      }
      if (asElement != doc.getDocumentElement()
          && shouldInclude(inclusion, getNodeRange(asElement))) {
        builder.wrap(doc.getTagName(asElement),
            CollectionUtils.adaptStringMap(doc.getAttributes(asElement)));
      }
    } else {
      T asText = doc.asText(nearestCommonAncestor);
      int tStart = doc.getLocation(asText);
View Full Code Here

    E asElement = doc.asElement(node);
    if (doc.asElement(node) != null) {
      for (N child = doc.getFirstChild(node); child != null; child = doc.getNextSibling(child)) {
        builder.append(augmentBuilder(child, inclusion));
      }
      builder.wrap(doc.getTagName(asElement),
          CollectionUtils.adaptStringMap(doc.getAttributes(asElement)));
    } else {
      T asText = doc.asText(node);
      int tStart = doc.getLocation(asText);
      String data = doc.getData(asText);
View Full Code Here

    return EditorDocHelper.isNamedElement(node, NAMEVALUEPAIR_TAG);
  }

  public static XmlStringBuilder createXml(String url) {
    XmlStringBuilder builder = XmlStringBuilder.createEmpty();
    builder.wrap(TEMPLATE_TAG, URL_ATTRIBUTE, url);
    return builder;
  }

  private HtmlTemplate() {
  }
View Full Code Here

      for (Map.Entry<String, String> entry : state.entrySet()) {
        builder.append(
            GadgetXmlUtil.constructStateXml(entry.getKey(), entry.getValue()));
      }
    }
    builder.wrap(
        TAGNAME,
        URL_ATTRIBUTE, url,
        TITLE_ATTRIBUTE, "",
        PREFS_ATTRIBUTE, prefs != null ? prefs : "",
        STATE_ATTRIBUTE, "",
View Full Code Here

           child != null; child = doc.getNextSibling(child)) {
        builder.append(augmentBuilder(child, inclusion));
      }
      if (asElement != doc.getDocumentElement()
          && shouldInclude(inclusion, getNodeRange(asElement))) {
        builder.wrap(doc.getTagName(asElement),
            CollectionUtils.adaptStringMap(doc.getAttributes(asElement)));
      }
    } else {
      T asText = doc.asText(nearestCommonAncestor);
      int tStart = doc.getLocation(asText);
View Full Code Here

    E asElement = doc.asElement(node);
    if (doc.asElement(node) != null) {
      for (N child = doc.getFirstChild(node); child != null; child = doc.getNextSibling(child)) {
        builder.append(augmentBuilder(child, inclusion));
      }
      builder.wrap(doc.getTagName(asElement),
          CollectionUtils.adaptStringMap(doc.getAttributes(asElement)));
    } else {
      T asText = doc.asText(node);
      int tStart = doc.getLocation(asText);
      String data = doc.getData(asText);
View Full Code Here

    return EditorDocHelper.isNamedElement(node, NAMEVALUEPAIR_TAG);
  }

  public static XmlStringBuilder createXml(String url) {
    XmlStringBuilder builder = XmlStringBuilder.createEmpty();
    builder.wrap(TEMPLATE_TAG, URL_ATTRIBUTE, url);
    return builder;
  }

  private HtmlTemplate() {
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.