Android Open Source - demo-flickr-feed-android Item






From Project

Back to project page demo-flickr-feed-android.

License

The source code is released under:

This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...

If you think the Android project demo-flickr-feed-android 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 uk.org.tomek.flickrfeed.model;
//from   w  w w .  j  a va2s.c om
import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.orm.SugarRecord;

/**
 * Created by tomek on 23/11/14.
 */
public class Item extends SugarRecord<Item> implements Parcelable {

    public Item() {
    }

    @Expose
    private String title;
    @Expose
    private String link;
    @Expose
    private Media media;
    @SerializedName("date_taken")
    @Expose
    private String dateTaken;
    @Expose
    private String description;
    @Expose
    private String published;
    @Expose
    private String author;
    @SerializedName("author_id")
    @Expose
    private String authorId;
    @Expose
    private String tags;

    /**
     *
     * @return
     * The title
     */
    public String getTitle() {
        return title;
    }

    /**
     *
     * @param title
     * The title
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     *
     * @return
     * The link
     */
    public String getLink() {
        return link;
    }

    /**
     *
     * @param link
     * The link
     */
    public void setLink(String link) {
        this.link = link;
    }

    /**
     *
     * @return
     * The media
     */
    public Media getMedia() {
        return media;
    }

    /**
     *
     * @param media
     * The media
     */
    public void setMedia(Media media) {
        this.media = media;
    }

    /**
     *
     * @return
     * The dateTaken
     */
    public String getDateTaken() {
        return dateTaken;
    }

    /**
     *
     * @param dateTaken
     * The date_taken
     */
    public void setDateTaken(String dateTaken) {
        this.dateTaken = dateTaken;
    }

    /**
     *
     * @return
     * The description
     */
    public String getDescription() {
        return description;
    }

    /**
     *
     * @param description
     * The description
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     *
     * @return
     * The published
     */
    public String getPublished() {
        return published;
    }

    /**
     *
     * @param published
     * The published
     */
    public void setPublished(String published) {
        this.published = published;
    }

    /**
     *
     * @return
     * The author
     */
    public String getAuthor() {
        return author;
    }

    /**
     *
     * @param author
     * The author
     */
    public void setAuthor(String author) {
        this.author = author;
    }

    /**
     *
     * @return
     * The authorId
     */
    public String getAuthorId() {
        return authorId;
    }

    /**
     *
     * @param authorId
     * The author_id
     */
    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    /**
     *
     * @return
     * The tags
     */
    public String getTags() {
        return tags;
    }

    /**
     *
     * @param tags
     * The tags
     */
    public void setTags(String tags) {
        this.tags = tags;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.title);
        dest.writeString(this.link);
        dest.writeParcelable(this.media, 0);
        dest.writeString(this.dateTaken);
        dest.writeString(this.description);
        dest.writeString(this.published);
        dest.writeString(this.author);
        dest.writeString(this.authorId);
        dest.writeString(this.tags);
    }

    private Item(Parcel in) {
        this.title = in.readString();
        this.link = in.readString();
        this.media = in.readParcelable(Media.class.getClassLoader());
        this.dateTaken = in.readString();
        this.description = in.readString();
        this.published = in.readString();
        this.author = in.readString();
        this.authorId = in.readString();
        this.tags = in.readString();
    }

    public static final Parcelable.Creator<Item> CREATOR = new Parcelable.Creator<Item>() {
        public Item createFromParcel(Parcel source) {
            return new Item(source);
        }

        public Item[] newArray(int size) {
            return new Item[size];
        }
    };

    @Override
    public String toString() {
        return "Item{" +
                "title='" + title + '\'' +
                ", link='" + link + '\'' +
                ", media=" + media +
                ", dateTaken='" + dateTaken + '\'' +
                ", description='" + description + '\'' +
                ", published='" + published + '\'' +
                ", author='" + author + '\'' +
                ", authorId='" + authorId + '\'' +
                ", tags='" + tags + '\'' +
                '}';
    }
}




Java Source Code List

tomek.co.uk.flickrfeed.ApplicationTest.java
uk.org.tomek.flickrfeed.App.java
uk.org.tomek.flickrfeed.activity.ImageDetailsActivity.java
uk.org.tomek.flickrfeed.activity.MainActivity.java
uk.org.tomek.flickrfeed.activity.SettingsActivity.java
uk.org.tomek.flickrfeed.adapter.FeedAdapter.java
uk.org.tomek.flickrfeed.fagment.SettingsFragment.java
uk.org.tomek.flickrfeed.fagment.StartingFragment.java
uk.org.tomek.flickrfeed.model.Feed.java
uk.org.tomek.flickrfeed.model.Item.java
uk.org.tomek.flickrfeed.model.Media.java
uk.org.tomek.flickrfeed.rest.FlickrConverter.java
uk.org.tomek.flickrfeed.rest.MockRestClient.java
uk.org.tomek.flickrfeed.rest.RealRestClient.java
uk.org.tomek.flickrfeed.rest.RestClient.java
uk.org.tomek.flickrfeed.rest.RestUtils.java
uk.org.tomek.flickrfeed.rest.service.FlickrPostsService.java
uk.org.tomek.flickrfeed.utils.Logger.java
uk.org.tomek.flickrfeed.utils.StringUtils.java