Examples of annotationBoundary()


Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuffer.annotationBoundary()

    b.annotationBoundary(AnnotationBoundaryMapImpl.builder()
        .updateValues("b", "XZ", "yz", "f-", null, null,
            "g-", "a", null, "k-", "b", "", "r", "", "2")
        .build());
    b.updateAttributes(new AttributesUpdateImpl("a", null, "1"));
    b.annotationBoundary(AnnotationBoundaryMapImpl.builder()
        .initializationEnd("b", "g-", "k-", "r")
        .updateValues("e", "166", null, "f-", null, null)
        .build());
    b.updateAttributes(new AttributesUpdateImpl("P", null, "", ":wq", "ZZ", null));
    b.annotationBoundary(AnnotationBoundaryMapImpl.builder()
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuffer.annotationBoundary()

    b.annotationBoundary(AnnotationBoundaryMapImpl.builder()
        .initializationEnd("b", "g-", "k-", "r")
        .updateValues("e", "166", null, "f-", null, null)
        .build());
    b.updateAttributes(new AttributesUpdateImpl("P", null, "", ":wq", "ZZ", null));
    b.annotationBoundary(AnnotationBoundaryMapImpl.builder()
        .initializationEnd("e", "f-")
        .build());

    return b.finish();
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder.annotationBoundary()

    b1.updateAttributes(ATTRSUP);
    b2.updateAttributes(ATTRSUP_SCRUBBED);

    b1.annotationBoundary(ANNO);
    b2.annotationBoundary(ANNO_SCRUBBED);

    DocOp o1 = DocOpScrub.scrub(b1.buildUnchecked());
    DocOp o2 = b2.buildUnchecked();
    assertTrue("\n" + o1 + "\n but expected \n" + o2,
        OpComparators.SYNTACTIC_IDENTITY.equal(o1, o2));
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder.annotationBoundary()

    AnnotationBoundaryMap mapB = new AnnotationBoundaryMapImpl(
        new String[]{},new String[]{"a"},new String[]{"b"},new String[]{null});
    AnnotationBoundaryMap mapC = new AnnotationBoundaryMapImpl(
        new String[]{"a"},new String[]{},new String[]{},new String[]{});
    m.elementStart("a", a);
    m.annotationBoundary(mapA);
    m.characters("test");
    m.annotationBoundary(mapB);
    m.characters("text");
    m.annotationBoundary(mapC);
    m.elementEnd();
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder.annotationBoundary()

    AnnotationBoundaryMap mapC = new AnnotationBoundaryMapImpl(
        new String[]{"a"},new String[]{},new String[]{},new String[]{});
    m.elementStart("a", a);
    m.annotationBoundary(mapA);
    m.characters("test");
    m.annotationBoundary(mapB);
    m.characters("text");
    m.annotationBoundary(mapC);
    m.elementEnd();

    assertReversible(makeBlipOp("annotationBoundary", m.build()));
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder.annotationBoundary()

    m.elementStart("a", a);
    m.annotationBoundary(mapA);
    m.characters("test");
    m.annotationBoundary(mapB);
    m.characters("text");
    m.annotationBoundary(mapC);
    m.elementEnd();

    assertReversible(makeBlipOp("annotationBoundary", m.build()));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder.annotationBoundary()

  public void testEmptyAnnotationBoundary() {
    DocOpBuilder m = new DocOpBuilder();

    Attributes a = new AttributesImpl(ImmutableMap.of("a1", "1", "a2", "2"));
    m.elementStart("a", a);
    m.annotationBoundary(AnnotationBoundaryMapImpl.EMPTY_MAP);
    m.characters("text");
    m.annotationBoundary(AnnotationBoundaryMapImpl.EMPTY_MAP);
    m.elementEnd();

    assertReversible(makeBlipOp("emptyAnnotationBoundary", m.build()));
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder.annotationBoundary()

    Attributes a = new AttributesImpl(ImmutableMap.of("a1", "1", "a2", "2"));
    m.elementStart("a", a);
    m.annotationBoundary(AnnotationBoundaryMapImpl.EMPTY_MAP);
    m.characters("text");
    m.annotationBoundary(AnnotationBoundaryMapImpl.EMPTY_MAP);
    m.elementEnd();

    assertReversible(makeBlipOp("emptyAnnotationBoundary", m.build()));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder.annotationBoundary()

    for (ProtocolDocumentOperation.Component c : op.getComponent()) {
      if (c.hasAnnotationBoundary()) {
        AnnotationBoundary boundary = c.getAnnotationBoundary();
        if (boundary.getEmpty()) {
          output.annotationBoundary(AnnotationBoundaryMapImpl.EMPTY_MAP);
        } else {
          String[] ends = boundary.getEnd().toArray(new String[boundary.getEnd().size()]);
          int changes = boundary.getChange().size();
          String[] changeKeys = new String[changes];
          String[] oldValues = new String[changes];
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder.annotationBoundary()

            KeyValueUpdate kvu = boundary.getChange(i);
            changeKeys[i] = kvu.getKey();
            oldValues[i] = kvu.hasOldValue() ? kvu.getOldValue() : null;
            newValues[i] = kvu.hasNewValue() ? kvu.getNewValue() : null;
          }
          output.annotationBoundary(new AnnotationBoundaryMapImpl(ends, changeKeys, oldValues,
              newValues));
        }
      } else if (c.hasCharacters()) {
        output.characters(c.getCharacters());
      } else if (c.hasElementStart()) {
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.