Back to project page RabbitEars.
The source code is released under:
MIT License
If you think the Android project RabbitEars listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.fbs.rabbitears.contracts.rss; //from www . ja v a2s .c o m import com.google.gson.annotations.SerializedName; import java.util.Date; import java.util.List; /** * RSS Channel Item Serialization Contract */ public class Item { public String title; public String link; public String description; public Enclosure enclosure; public Guid guid; public Date pubDate; @SerializedName("<a10>updated") public Date updated; @SerializedName("category") public List<Category> categories; public boolean hasEnclosure() { return enclosure != null; } public Date getDate() { return (pubDate != null) ? pubDate : updated; } public String getCategoryString() { String categoryString = null; if (categories != null) { StringBuilder categoryBuilder = new StringBuilder(); for (Category cat : categories) { categoryBuilder.append(cat.value); if (categories.indexOf(cat) < categories.size() - 1) { categoryBuilder.append(", "); } } categoryString = categoryBuilder.toString(); } return categoryString; } public String getGuid() { String guidString = null; if (guid != null) { guidString = guid.value; } return guidString; } }