Package com.google.wave.api

Examples of com.google.wave.api.Annotation


    List<Annotation> result = Lists.newArrayList();
    for (RangedAnnotation<String> annotation : doc.rangedAnnotations(0, doc.size(), null)) {
      if (annotation.key() != null && annotation.value() != null) {
        int start = apiView.transformToTextOffset(annotation.start());
        int end = apiView.transformToTextOffset(annotation.end());
        result.add(new Annotation(annotation.key(), annotation.value(), new Range(start, end)));
      }
    }
    return result;
  }
View Full Code Here


   * An instance creator that creates an empty {@link Annotation}.
   */
  private static class AnnotationInstanceCreator implements InstanceCreator<Annotation> {
    @Override
    public Annotation createInstance(Type type) {
      return new Annotation("", "", -1, -1);
    }
View Full Code Here

   * An instance creator that creates an empty {@link Annotation}.
   */
  private static class AnnotationInstanceCreator implements InstanceCreator<Annotation> {
    @Override
    public Annotation createInstance(Type type) {
      return new Annotation("", "", -1, -1);
    }
View Full Code Here

   * An instance creator that creates an empty {@link Annotation}.
   */
  private static class AnnotationInstanceCreator implements InstanceCreator<Annotation> {
    @Override
    public Annotation createInstance(Type type) {
      return new Annotation("", "", -1, -1);
    }
View Full Code Here

    }

    Annotations annotations = event.getBlip().getAnnotations();
    Iterator<Annotation> iterator = annotations.iterator();
    while (iterator.hasNext()) {
      Annotation annotation = iterator.next();
      String name = annotation.getName();
      String value = annotation.getValue();
      if (name.equals(this.HIGHLIGHT_ANNOTATION_NAME) && value.equals("new")) {

        // Check for authsub token first
        String user = event.getModifiedBy();
        UserInfo userInfo = util.getUserInfo(user);
        if (userInfo == null) {
          appendAuthSubGadget(blip, user);
        } else {
          BlipContentRefs blipContentRefs = blip.range(annotation.getRange().getStart(), annotation
              .getRange().getEnd());
          blipContentRefs.annotate(this.HIGHLIGHT_ANNOTATION_NAME, "done");

          Set<String> participants = new HashSet<String>();
          participants.add(event.getModifiedBy());
View Full Code Here

   * An instance creator that creates an empty {@link Annotation}.
   */
  private static class AnnotationInstanceCreator implements InstanceCreator<Annotation> {
    @Override
    public Annotation createInstance(Type type) {
      return new Annotation("", "", -1, -1);
    }
View Full Code Here

    List<Annotation> result = Lists.newArrayList();
    for (RangedAnnotation<String> annotation : doc.rangedAnnotations(0, doc.size(), null)) {
      if (annotation.key() != null && annotation.value() != null) {
        int start = apiView.transformToTextOffset(annotation.start());
        int end = apiView.transformToTextOffset(annotation.end());
        result.add(new Annotation(annotation.key(), annotation.value(), new Range(start, end)));
      }
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of com.google.wave.api.Annotation

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.