Examples of AnnotationBoundaryMapImpl


Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

        keys.add(key);
        oldValues.add(activeUpdate.newValue);
        newValues.add(activeUpdate.oldValue);
      }
    }
    annotationResidue.annotationBoundary(new AnnotationBoundaryMapImpl(
        new String[0],
        keys.toArray(new String[0]),
        oldValues.toArray(new String[0]),
        newValues.toArray(new String[0])));
    annotationResidue.retain(size);
    annotationResidue.annotationBoundary(new AnnotationBoundaryMapImpl(
        keys.toArray(new String[0]),
        new String[0],
        new String[0],
        new String[0]));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

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

    Attributes a = new AttributesImpl(ImmutableMap.of("a1", "1", "a2", "2"));
    AnnotationBoundaryMap mapA = new AnnotationBoundaryMapImpl(
        new String[]{},new String[]{"a"},new String[]{null},new String[]{"b"});
    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);
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

            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

Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

        if (a.openAnnotations().isEmpty()) {
          return null;
        }
        ArrayList<String> l = new ArrayList<String>(a.openAnnotations());
        Collections.sort(l);
        AnnotationBoundaryMapImpl map =
          AnnotationBoundaryMapImpl.builder().initializationEnd(
              toArray(l)).build();
        assert !a.checkAnnotationBoundary(map, null).isIllFormed();
        return generate(map);
      }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

          ArrayList<String> changeKeys = new ArrayList<String>();
          ArrayList<String> changeOldValues = new ArrayList<String>();
          ArrayList<String> changeNewValues = new ArrayList<String>();

          void tryThisOption() throws Result {
            AnnotationBoundaryMapImpl map = AnnotationBoundaryMapImpl.builder()
                .initializationEnd(toArray(keysToEnd))
                .updateValues(toArray(changeKeys), toArray(changeOldValues),
                    toArray(changeNewValues)).build();
            final RandomizerOperationComponent component = generate(map);
            DocOpAutomaton temp = new DocOpAutomaton(a);
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

          } else {
            changeNewValues.add(currentActive.oldValue);
          }
        }
      }
      commit(new AnnotationBoundaryMapImpl(
          new String[0],
          changeKeys.toArray(new String[0]),
          changeOldValues.toArray(new String[0]),
          changeNewValues.toArray(new String[0])));
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

        } else {
          endKeys.add(key);
        }
      }
      sync();
      commit(new AnnotationBoundaryMapImpl(
          endKeys.toArray(new String[0]),
          changeKeys.toArray(new String[0]),
          changeOldValues.toArray(new String[0]),
          changeNewValues.toArray(new String[0])));
      temporary.clear();
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

      i.applyItem(b);
    }

    if (!items.isEmpty()) {
      String[] endKeys = knownAnnotationKeys.toArray(new String[knownAnnotationKeys.size()]);
      b.annotationBoundary(new AnnotationBoundaryMapImpl(
          endKeys, new String[0], new String[0], new String[0]));
    }
    return b.finish();
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

      for (int i = 0; i < size; i++) {
        newValues[i] = annotations.get(changeKeys[i]);
      }

      c.annotationBoundary(new AnnotationBoundaryMapImpl(
          new String[0], changeKeys, new String[size], newValues));

      applyData(c);
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.impl.AnnotationBoundaryMapImpl

            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()) {
        Map<String, String> attributesMap = Maps.newHashMap();
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.