Package org.waveprotocol.box.search.proto.SearchResponseProtoImpl

Examples of org.waveprotocol.box.search.proto.SearchResponseProtoImpl.DigestProtoImpl


  public void copyFrom(SearchResponse message) {
    setQuery(message.getQuery());
    setTotalResults(message.getTotalResults());
    clearDigests();
    for (Digest field : message.getDigests()) {
      addDigests(new DigestProtoImpl(field));
    }
  }
View Full Code Here


  @Override
  public List<DigestProtoImpl> getDigests() {
    switchToProto();
    List<DigestProtoImpl> list = new ArrayList<DigestProtoImpl>();
    for (int i = 0; i < getDigestsSize(); i++) {
      DigestProtoImpl message = new DigestProtoImpl(proto.getDigests(i));
      list.add(message);
    }
    return list;
  }
View Full Code Here

  }

  @Override
  public DigestProtoImpl getDigests(int n) {
    switchToProto();
    return new DigestProtoImpl(proto.getDigests(n));
  }
View Full Code Here

  /** Get or create a DigestProtoImpl from a Digest. */
  private DigestProtoImpl getOrCreateDigestProtoImpl(Digest message) {
    if (message instanceof DigestProtoImpl) {
      return (DigestProtoImpl) message;
    } else {
      DigestProtoImpl messageImpl = new DigestProtoImpl();
      messageImpl.copyFrom(message);
      return messageImpl;
    }
  }
View Full Code Here

    if (jsonObject.has("3")) {
      JsonElement elem = jsonObject.get("3");
      {
        JsonArray array = elem.getAsJsonArray();
        for (int i = 0; i < array.size(); i++) {
          DigestProtoImpl payload = new DigestProtoImpl();
          GsonUtil.extractJsonObject(payload, array.get(i), gson, raw);
          addDigests(payload);
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.waveprotocol.box.search.proto.SearchResponseProtoImpl.DigestProtoImpl

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.