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

Examples of org.waveprotocol.wave.model.document.operation.DocOpCursor


  public static DocOpCursor createScrubber(final DocOpCursor target) {
    final ScrubCache attrNames = new ScrubCache(attrNameScrubber);
    final ScrubCache annotationNames = new ScrubCache(annotationKeyScrubber);

    return new DocOpCursor() {
      @Override
      public void deleteCharacters(String chars) {
        target.deleteCharacters(scrubString(chars));
      }
View Full Code Here


    final ListIterator<Item> iterator = items.listIterator();
    try {
      // In theory, the above call to the validator makes the error checking in
      // this DocOpCursor redundant.  We check for errors anyway in case the
      // validator is incorrect.
      m.apply(new DocOpCursor() {

        Item current = null;

        AnnotationMap inherited = AnnotationMapImpl.EMPTY_MAP;
View Full Code Here

   * @param inputOp document operation to serialize
   * @return serialized protocol buffer document operation
   */
  public static ProtocolDocumentOperation serialize(DocOp inputOp) {
    final ProtocolDocumentOperation output = ProtocolDocumentOperationJsoImpl.create();
    inputOp.apply(new DocOpCursor() {

      private Component addComponent() {
        ComponentJsoImpl component = ComponentJsoImpl.create();
        output.addComponent(component);
        return component;
View Full Code Here

   * @return serialized protocol buffer document operation
   */
  public static ProtocolDocumentOperation serialize(DocOp inputOp) {
    final ProtocolDocumentOperation.Builder output = ProtocolDocumentOperation.newBuilder();

    inputOp.apply(new DocOpCursor() {
      private ProtocolDocumentOperation.Component.Builder newComponentBuilder() {
        return ProtocolDocumentOperation.Component.newBuilder();
      }

      @Override public void retain(int itemCount) {
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.document.operation.DocOpCursor

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.