Android Open Source - LinuxZaSve_mobile Comment






From Project

Back to project page LinuxZaSve_mobile.

License

The source code is released under:

Apache License

If you think the Android project LinuxZaSve_mobile 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.linuxzasve.mobile.rest.model;
//from   w  ww  .ja va 2 s.c om
import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class Comment implements Parcelable {
    private int id;
    private String name;
    private String url;
    private String date;
    private String content;
    private String parent;
    private List<Comment> children;
    private int depth;

    public int getId() {
        return id;
    }

    public void setId(final int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(final String url) {
        this.url = url;
    }

    public String getDate() {
        return date;
    }

    public void setDate(final String date) {
        this.date = date;
    }

    public String getContent() {
        return content;
    }

    public void setContent(final String content) {
        this.content = content;
    }

    public String getParent() {
        return parent;
    }

    public void setParent(final String parent) {
        this.parent = parent;
    }

    public List<Comment> getChildren() {
        return children;
    }

    public void setChildren(final List<Comment> children) {
        this.children = children;
    }

    public int getDepth() {
        return depth;
    }

    public void setDepth(final int depth) {
        this.depth = depth;
    }

    public Comment() {
    }

    public void addChild(final Comment comment) {
        if (children == null) {
            children = new ArrayList<Comment>();
        }

        children.add(comment);
    }


    // parcelable

    public Comment(Parcel in) {
        id = in.readInt();
        name = in.readString();
        url = in.readString();
        date = in.readString();
        content = in.readString();
        parent = in.readString();
        in.readList(children, Comment.class.getClassLoader());


    }

    public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
        public Comment createFromParcel(Parcel in) {
            return new Comment(in);
        }

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

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

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeInt(id);
        parcel.writeString(name);
        parcel.writeString(url);
        parcel.writeString(date);
        parcel.writeString(content);
        parcel.writeString(parent);
        parcel.writeList(children);
        parcel.writeInt(depth);
    }
}




Java Source Code List

com.linuxzasve.mobile.ActivityHelper.java
com.linuxzasve.mobile.MainActivity.java
com.linuxzasve.mobile.adapters.ArticleListArrayAdapter.java
com.linuxzasve.mobile.adapters.CommentListArrayAdapter.java
com.linuxzasve.mobile.db.Comment.java
com.linuxzasve.mobile.emote.EmoticonDrawables.java
com.linuxzasve.mobile.fragments.ArticleDisplayFragment.java
com.linuxzasve.mobile.fragments.ArticleListFragmentType.java
com.linuxzasve.mobile.fragments.ArticleListFragment.java
com.linuxzasve.mobile.fragments.CommentEditFragment.java
com.linuxzasve.mobile.fragments.CommentListFragment.java
com.linuxzasve.mobile.googl.GooGlService.java
com.linuxzasve.mobile.googl.GoogleUrlShortener.java
com.linuxzasve.mobile.googl.model.GooGlRequest.java
com.linuxzasve.mobile.googl.model.GooGlResponse.java
com.linuxzasve.mobile.rest.LzsRestGateway.java
com.linuxzasve.mobile.rest.LzsRestService.java
com.linuxzasve.mobile.rest.model.Attachment.java
com.linuxzasve.mobile.rest.model.Author.java
com.linuxzasve.mobile.rest.model.Category.java
com.linuxzasve.mobile.rest.model.Comment.java
com.linuxzasve.mobile.rest.model.CustomFields.java
com.linuxzasve.mobile.rest.model.DetailedImage.java
com.linuxzasve.mobile.rest.model.Image.java
com.linuxzasve.mobile.rest.model.LzsRestResponse.java
com.linuxzasve.mobile.rest.model.Post.java
com.linuxzasve.mobile.rest.model.Tag.java
com.linuxzasve.mobile.rest.model.Thumbnail.java
com.linuxzasve.mobile.timthumb.TimThumb.java