Android Open Source - Team7-301Project Search Response






From Project

Back to project page Team7-301Project.

License

The source code is released under:

Apache License

If you think the Android project Team7-301Project listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package ca.ualberta.cs.remote_server;
// www .  ja  v a 2s . com
import ca.ualberta.cs.f14t07_application.Hits;
/**
 * class used to process search response
 * borrowed from lab7
 * 
 * taken from;
 * https://github.com/dfserrano/AndroidElasticSearch
 * 
 * This Class processes and interprets the search response gotten from elastic Search and 
 * Splits it into hits which can then be processed and turned into forumEntries
 * @author lexie
 * 
 */
public class SearchResponse<T> {

  private int took;
  private boolean timed_out;
  private Shard _shards;
  private Hits<T> hits;
  
  public SearchResponse() {}

  public int getTook() {
    return took;
  }

  public void setTook(int took) {
    this.took = took;
  }

  public boolean isTimed_out() {
    return timed_out;
  }

  public void setTimed_out(boolean timed_out) {
    this.timed_out = timed_out;
  }

  public Shard get_shards() {
    return _shards;
  }

  public void set_shards(Shard _shards) {
    this._shards = _shards;
  }

  public Hits<T> getHits() {
    return hits;
  }

  public void setHits(Hits<T> hits) {
    this.hits = hits;
  }     
}
/**
*A Shard gets the total number of successful and unsuccessful results
*that were gained from elastic search
*
*@author lexie
*/
class Shard {
  private int total;
  private int successful;
  private int failed;
  
  public Shard() {}
  
  public int getTotal() {
    return total;
  }
  public void setTotal(int total) {
    this.total = total;
  }
  public int getSuccessful() {
    return successful;
  }
  public void setSuccessful(int successful) {
    this.successful = successful;
  }
  public int getFailed() {
    return failed;
  }
  public void setFailed(int failed) {
    this.failed = failed;
  }
}




Java Source Code List

ca.ualberta.cs.controllers.AuthorController.java
ca.ualberta.cs.controllers.BrowseController.java
ca.ualberta.cs.controllers.ForumEntryController.java
ca.ualberta.cs.controllers.SearchController.java
ca.ualberta.cs.f14t07_application.Hits.java
ca.ualberta.cs.f14t07_application.LogoActivity.java
ca.ualberta.cs.f14t07_application.Post.java
ca.ualberta.cs.intent_singletons.BrowseRequestSingleton.java
ca.ualberta.cs.intent_singletons.ContextSingleton.java
ca.ualberta.cs.intent_singletons.EntrySingleton.java
ca.ualberta.cs.intent_singletons.ForumEntrySingleton.java
ca.ualberta.cs.models.Answer.java
ca.ualberta.cs.models.AuthorModel.java
ca.ualberta.cs.models.DataManager.java
ca.ualberta.cs.models.Entry.java
ca.ualberta.cs.models.ForumEntryList.java
ca.ualberta.cs.models.ForumEntry.java
ca.ualberta.cs.models.JsonDriver.java
ca.ualberta.cs.models.Observable.java
ca.ualberta.cs.models.Question.java
ca.ualberta.cs.models.Reply.java
ca.ualberta.cs.remote_server.NetworkChecker.java
ca.ualberta.cs.remote_server.SearchHit.java
ca.ualberta.cs.remote_server.SearchResponse.java
ca.ualberta.cs.remote_server.SimpleSearchCommand.java
ca.ualberta.cs.views.AnswerActivity.java
ca.ualberta.cs.views.AnswerListAdapter.java
ca.ualberta.cs.views.AskActivity.java
ca.ualberta.cs.views.BrowseActivity.java
ca.ualberta.cs.views.HelpActivity.java
ca.ualberta.cs.views.MainScreenActivity.java
ca.ualberta.cs.views.Observer.java
ca.ualberta.cs.views.QuestionActivity.java
ca.ualberta.cs.views.ReplyListAdapter.java