Android Open Source - AQUArinthia R S S Item






From Project

Back to project page AQUArinthia.

License

The source code is released under:

GNU General Public License

If you think the Android project AQUArinthia 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 at.theengine.android.simple_rss2_android;
/*from  ww w .j  av  a2s  . c  o  m*/
import java.net.MalformedURLException;
import java.net.URL;

public class RSSItem implements Comparable<RSSItem>, Copyable<RSSItem>{
    private String title;
    private URL link;
    private String description;
    private String content;
    private String date;
    private float lat;
    private float lng;
    
    public void setContent(String content){
      this.content = content;
    }
    
    public String getContent(){
      return this.content;
    }
    
    public void setTitle(String title){
      this.title = title;
    }
    
    public String getTitle(){
      return this.title;
    }
    
    public void setDescription(String description){
      this.description = description;
    }
    
    public String getDescription(){
      return this.description;
    }
    
    public void setLink(String link) {
        try {
            this.link = new URL(link);
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }
    }
    
    public URL getLink(){
      return this.link;
    }

    public String getDate() {
        return this.date;
    }

    public void setDate(String date) {
        this.date = date;
    }
    
    public float getLat() {
        return this.lat;
    }

    public void setLat(float lat) {
        this.lat = lat;
    }
    
    public float getLng() {
        return this.lng;
    }

    public void setLng(float lng) {
        this.lng = lng;
    }
    
    @Override
    public boolean equals(Object obj) {
            return super.equals(obj);
    }
      // sort by date
    public int compareTo(RSSItem another) {
        if (another == null) return 1;
        return another.date.compareTo(date);
    }

  @Override
  public RSSItem copy() {
    RSSItem copy = createForCopy();
        copyTo(copy);
        return copy;
  }

  @Override
  public RSSItem createForCopy() {
    return new RSSItem();
  }

  @Override
  public void copyTo(RSSItem dest) {
    dest.setTitle(title);
    dest.setDescription(description);
    dest.setLink(link.toExternalForm());
    dest.setDate(date);
    dest.setContent(content);
    dest.setLat(lat);
    dest.setLng(lng);
  }
}




Java Source Code List

at.theengine.android.aquarinthhia.DataLoaderCallback.java
at.theengine.android.aquarinthhia.DataLoader.java
at.theengine.android.aquarinthhia.InfoFragment.java
at.theengine.android.aquarinthhia.LakeData.java
at.theengine.android.aquarinthhia.LakeListAdapter.java
at.theengine.android.aquarinthhia.LakesFragment.java
at.theengine.android.aquarinthhia.MainActivity.java
at.theengine.android.aquarinthhia.MapActivity.java
at.theengine.android.aquarinthhia.RainData.java
at.theengine.android.aquarinthhia.RainListAdapter.java
at.theengine.android.aquarinthhia.RainfallFragment.java
at.theengine.android.aquarinthhia.RiverData.java
at.theengine.android.aquarinthhia.RiverListAdapter.java
at.theengine.android.aquarinthhia.RiversFragment.java
at.theengine.android.bestlocation.BestLocationListener.java
at.theengine.android.bestlocation.BestLocationProvider.java
at.theengine.android.simple_rss2_android.Copyable.java
at.theengine.android.simple_rss2_android.FeedParser.java
at.theengine.android.simple_rss2_android.RSSItem.java
at.theengine.android.simple_rss2_android.SimpleFeedParser.java
at.theengine.android.simple_rss2_android.SimpleRss2ParserCallback.java
at.theengine.android.simple_rss2_android.SimpleRss2Parser.java