Package org.waveprotocol.wave.model.document.operation.impl

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


  public void testDocOp() {
    OpEquator eq = OpComparators.SYNTACTIC_IDENTITY;

    DocOpBuffer ba1 = new DocOpBuffer();
    ba1.characters("a");
    DocOp a1 = ba1.finish();

    DocOpBuffer ba2 = new DocOpBuffer();
    ba2.characters("a");
    DocOp a2 = ba2.finish();
View Full Code Here


    DocOpBuffer ba1 = new DocOpBuffer();
    ba1.characters("a");
    DocOp a1 = ba1.finish();

    DocOpBuffer ba2 = new DocOpBuffer();
    ba2.characters("a");
    DocOp a2 = ba2.finish();

    DocOpBuffer bb1 = new DocOpBuffer();
    bb1.deleteCharacters("a");
    DocOp b1 = bb1.finish();
View Full Code Here

    addOp = new CoreAddParticipant(PARTICIPANT_ID);
    removeOp = new CoreRemoveParticipant(PARTICIPANT_ID);
    noOp = CoreNoOp.INSTANCE;

    docOpBuilder = new DocOpBuffer();
    docOpBuilder.characters(TEXT);
    docOpCharacters = new CoreWaveletDocumentOperation(DOC_ID, docOpBuilder.finish());

    docOpBuilder = new DocOpBuffer();
    docOpBuilder.deleteCharacters(TEXT);
    docOpDeleteCharacters = new CoreWaveletDocumentOperation(DOC_ID, docOpBuilder.finish());
View Full Code Here

    docOpBuilder.deleteCharacters(TEXT);
    docOpDeleteCharacters = new CoreWaveletDocumentOperation(DOC_ID, docOpBuilder.finish());

    docOpBuilder = new DocOpBuffer();
    docOpBuilder.retain(TEXT.length());
    docOpBuilder.characters(TEXT);
    docOpRetainAndCharacters = new CoreWaveletDocumentOperation(DOC_ID, docOpBuilder.finish());

    docOpBuilder = new DocOpBuffer();
    docOpBuilder.retain(TEXT.length());
    docOpBuilder.deleteCharacters(TEXT);
View Full Code Here

    docOpRetainAndDeleteCharacters = new CoreWaveletDocumentOperation(DOC_ID, docOpBuilder.finish());

    docOpBuilder = new DocOpBuffer();
    docOpBuilder.elementStart("name1",
        new AttributesImpl(CollectionUtils.immutableMap("key1", "val1", "key2", "val2")));
    docOpBuilder.characters(TEXT);
    docOpBuilder.elementStart("name2",
        new AttributesImpl(CollectionUtils.immutableMap("key3", "val3", "key4", "val4")));
    docOpBuilder.characters(TEXT + TEXT);
    docOpBuilder.elementEnd();
    docOpBuilder.characters(TEXT + TEXT + TEXT);
View Full Code Here

    docOpBuilder.elementStart("name1",
        new AttributesImpl(CollectionUtils.immutableMap("key1", "val1", "key2", "val2")));
    docOpBuilder.characters(TEXT);
    docOpBuilder.elementStart("name2",
        new AttributesImpl(CollectionUtils.immutableMap("key3", "val3", "key4", "val4")));
    docOpBuilder.characters(TEXT + TEXT);
    docOpBuilder.elementEnd();
    docOpBuilder.characters(TEXT + TEXT + TEXT);
    docOpBuilder.elementEnd();
    docOpComplex = new CoreWaveletDocumentOperation(DOC_ID, docOpBuilder.finish());
  }
View Full Code Here

    docOpBuilder.characters(TEXT);
    docOpBuilder.elementStart("name2",
        new AttributesImpl(CollectionUtils.immutableMap("key3", "val3", "key4", "val4")));
    docOpBuilder.characters(TEXT + TEXT);
    docOpBuilder.elementEnd();
    docOpBuilder.characters(TEXT + TEXT + TEXT);
    docOpBuilder.elementEnd();
    docOpComplex = new CoreWaveletDocumentOperation(DOC_ID, docOpBuilder.finish());
  }

  @Override
View Full Code Here

  public void testWaveletDocumentOperationDocumentId() {
    OpEquator eq = OpComparators.SYNTACTIC_IDENTITY;

    DocOpBuffer b = new DocOpBuffer();
    b.characters("a");
    DocOp d = b.finish();

    CoreWaveletDocumentOperation a1 = new CoreWaveletDocumentOperation("a", d);
    CoreWaveletDocumentOperation a2 = new CoreWaveletDocumentOperation("a", d);
    CoreWaveletDocumentOperation b1 = new CoreWaveletDocumentOperation("b", d);
View Full Code Here

  public void testWaveletDocumentOperationDocOp() {
    OpEquator eq = OpComparators.SYNTACTIC_IDENTITY;

    DocOpBuffer ba = new DocOpBuffer();
    ba.characters("a");
    DocOp da = ba.finish();
    DocOpBuffer bb = new DocOpBuffer();
    bb.deleteCharacters("a");
    DocOp db = bb.finish();
View Full Code Here

  public void testOperationFromElementRecursive() {
    Bundle data = new Bundle();
    DocOpBuffer cursorA = new DocOpBuffer(), cursorB = new DocOpBuffer();
    DomOperationUtil.buildDomInitializationFromElement(data.D, data.A.asElement(), cursorA, true);
    cursorB.elementStart("a", Attributes.EMPTY_MAP);
    cursorB.characters("child");
    cursorB.elementStart("b", new AttributesImpl(Collections.singletonMap("x", "y")));
    cursorB.elementEnd();
    cursorB.elementEnd();

    checkCursors(cursorA, cursorB);
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.