Android Open Source - govchecker Rep_ Object






From Project

Back to project page govchecker.

License

The source code is released under:

GNU General Public License

If you think the Android project govchecker 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 com.govchecker;
/*ww  w  . j  av a 2s .  c  o  m*/
import org.json.JSONObject;

public class Rep_Object {
  
  /* This object is a representation of an Elected Representative, either Senate or
   * House of Reps.
   * 
   * The idea is to farm out the rep specific functions to this object.
   */
  
  private String first_name;
  private JSONObject resultJson;
  private String last_name;
  private String full_name;
  private String party;
  private Integer PID;
  private Integer house;
  private String constituency;
  private String date_entered;
    private String position;
  private String date_left;
  private String attendance;
  private String left_reason;
  private String last_updated;
  private Integer rebellions;
  
  public Rep_Object()
  {
    
  }
  
  public Rep_Object(Integer pID)
  {
    getRepDetails(pID);
  }
  
  public void getRepDetails(Integer pID)
  {
    
  }
  
  public void populate_Rep()
  {
    
  }
  
  public void set_Attendance(String pct){
    this.attendance = pct;
  }
  
  public void set_pID(Integer pID)
  {
    this.PID = pID;
  }
  
  public void set_FirstName(String name)
  {
    this.first_name = name;
  }
  
  public void set_LastName(String name)
  {
    this.last_name = name;
  }
  
  public void set_FullName(String name)
  {
    this.full_name = name;
  }
  public void set_House(Integer houseid)
  {
    house = houseid;
  }
  
  public void set_Constituency(String constit)
  {
    constituency = constit;
  }
  
  public void set_DateEntered(String Dstring)
  {
    date_entered = Dstring;
  }

    public void set_Position(String pos){
        position = pos;
    }
  
  public void set_Party(String partyid)
  {
    party = partyid;
  }
  
  public void set_Rebellions(Integer reb){
    this.rebellions = reb;
  }
  
  public String get_Attendance(){
    return this.attendance;
  }
  
  public Integer get_Rebellions(){
    return this.rebellions;
  }
  
  public String get_Name()
  {
    if(first_name == null && last_name == null)
    {
      return full_name;
    } else {
      return first_name +" "+ last_name;
    }
  }
  
  public String get_FullName()
  {
    return full_name;
  }
  
  public String get_Party()
  {
    return party;
  }
  
  public Integer get_House()
  {
    return house;
  }
  
  public String get_Constituency()
  {
    return constituency;
  }
  
  public String get_DateEntered()
  {
    return date_entered;
  }
  
  public String get_DateLeft()
  {
    return date_left;
  }
  
  public String get_ReasonLeft()
  {
    return left_reason;
  }
  
  public Integer get_personID()
  {
    return this.PID;
  }

    public String get_Position(){
        String nullpos = "Member of Parliament";
        if(this.position != null){
            return this.position;
        } else {
            return nullpos;
        }
    }

}




Java Source Code List

com.govchecker.HansardSearchDisplay.java
com.govchecker.HansardSearch.java
com.govchecker.OAWebView.java
com.govchecker.OpenAusDB.java
com.govchecker.OpenAusSearchDroid.java
com.govchecker.RepSearch.java
com.govchecker.Rep_Display.java
com.govchecker.Rep_Object.java
com.govchecker.SearchHansardActivity.java
com.govchecker.SearchRepsActivity.java
com.govchecker.SearchSenate.java
com.govchecker.Utilities.java
com.govchecker.VoteResultDisplay.java