Comment.java in  » XML » wordpress-java » net » bican » wordpress » Java Source Code / Java Documentation 2Java Source Code and Java Documentation

Home
Java Source Code / Java Documentation 2
1.2D
2.3D
3.Ajax
4.Algebra
5.App Engine
6.Aspect
7.Assemble
8.Cache
9.Cassandra
10.Chat
11.Cloud
12.CMS
13.CouchDB
14.Crypt
15.Database
16.Distributed
17.Eclipse
18.Facebook
19.File
20.Forum
21.GAE
22.Game
23.Google tech
24.Graph
25.Graphic
26.GWT
27.Hibernate
28.HTML
29.HTTP
30.Image
31.IntelliJ
32.IRC
33.J2EE
34.J2ME
35.JDBC
36.JPA
37.JSON
38.JSR
39.JUnit
40.JVM
41.Language
42.Linux
43.Math
44.Maven
45.Media
46.Messenger
47.MiddleWare
48.Mobile
49.Mock
50.MongoDB
51.Mp3
52.Music
53.MVC
54.Network
55.OpenID
56.OSGi
57.Parse
58.Persist
59.Petri
60.Phone
61.Physics
62.REST
63.Robot
64.RPC
65.RSS
66.Ruby
67.Script
68.Search
69.Spring
70.SQL
71.SSH
72.Sudoku
73.Swing
74.Tapestry
75.Test
76.Text
77.Torrent
78.Twitter
79.UML
80.UnTagged
81.Utilities
82.Web
83.Wiki
84.XML
Java Source Code / Java Documentation 2 » XML » wordpress java » net.bican.wordpress 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


        /*
         * This file is part of jwordpress.
         *
         * jwordpress is free software: you can redistribute it and/or modify
         * it under the terms of the GNU General Public License as published by
         * the Free Software Foundation, either version 3 of the License, or
         * (at your option) any later version.
         *
         * jwordpress is distributed in the hope that it will be useful,
         * but WITHOUT ANY WARRANTY; without even the implied warranty of
         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
         * GNU General Public License for more details.
         *
         * You should have received a copy of the GNU General Public License
         * along with jwordpress.  If not, see <http://www.gnu.org/licenses/>.
         */
        package net.bican.wordpress;

        import java.io.BufferedReader;
        import java.io.File;
        import java.io.FileNotFoundException;
        import java.io.FileReader;
        import java.io.IOException;
        import java.util.Date;

        import redstone.xmlrpc.XmlRpcStruct;

        /**
         * A WordPress Comment object
         * 
         * @author Fred Potter &lt;[email protected]&gt;
         * 
         */
        public class Comment extends XmlRpcMapped implements  StringHeader {

            Date date_created_gmt;

            Integer user_id;

            Integer comment_id;

            Integer parent;

            String status;

            String content;

            String link;

            Integer post_id;

            String post_title;

            String author;

            String author_url;

            String author_email;

            String author_ip;

            /**
             * @return the date_created_gmt
             */
            public Date getDate_created_gmt() {
                return this .date_created_gmt;
            }

            /**
             * @param dateCreatedGmt the date_created_gmt to set
             */
            public void setDate_created_gmt(Date dateCreatedGmt) {
                this .date_created_gmt = dateCreatedGmt;
            }

            /**
             * @return the user_id
             */
            public Integer getUser_id() {
                return this .user_id;
            }

            /**
             * @param userId the user_id to set
             */
            public void setUser_id(Integer userId) {
                this .user_id = userId;
            }

            /**
             * @return the comment_id
             */
            public Integer getComment_id() {
                return this .comment_id;
            }

            /**
             * @param commentId the comment_id to set
             */
            public void setComment_id(Integer commentId) {
                this .comment_id = commentId;
            }

            /**
             * @return the parent
             */
            public Integer getParent() {
                return this .parent;
            }

            /**
             * @param parent the parent to set
             */
            public void setParent(Integer parent) {
                this .parent = parent;
            }

            /**
             * @return the status
             */
            public String getStatus() {
                return this .status;
            }

            /**
             * @param status the status to set
             */
            public void setStatus(String status) {
                this .status = status;
            }

            /**
             * @return the content
             */
            public String getContent() {
                return this .content;
            }

            /**
             * @param content the content to set
             */
            public void setContent(String content) {
                this .content = content;
            }

            /**
             * @return the link
             */
            public String getLink() {
                return this .link;
            }

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

            /**
             * @return the post_id
             */
            public Integer getPost_id() {
                return this .post_id;
            }

            /**
             * @param postId the post_id to set
             */
            public void setPost_id(Integer postId) {
                this .post_id = postId;
            }

            /**
             * @return the post_title
             */
            public String getPost_title() {
                return this .post_title;
            }

            /**
             * @param postTitle the post_title to set
             */
            public void setPost_title(String postTitle) {
                this .post_title = postTitle;
            }

            /**
             * @return the author
             */
            public String getAuthor() {
                return this .author;
            }

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

            /**
             * @return the author_url
             */
            public String getAuthor_url() {
                return this .author_url;
            }

            /**
             * @param authorUrl the author_url to set
             */
            public void setAuthor_url(String authorUrl) {
                this .author_url = authorUrl;
            }

            /**
             * @return the author_email
             */
            public String getAuthor_email() {
                return this .author_email;
            }

            /**
             * @param authorEmail the author_email to set
             */
            public void setAuthor_email(String authorEmail) {
                this .author_email = authorEmail;
            }

            /**
             * @return the author_ip
             */
            public String getAuthor_ip() {
                return this .author_ip;
            }

            /**
             * @param authorIp the author_ip to set
             */
            public void setAuthor_ip(String authorIp) {
                this .author_ip = authorIp;
            }

            /**
             * (non-Javadoc)
             * 
             * @see net.bican.wordpress.StringHeader#getStringHeader()
             */
            public String getStringHeader() {
                final String TAB = ":";
                return "Date Created GMT" + TAB + "User Id" + TAB
                        + "Comment Id" + TAB + "Parent" + TAB + "Status" + TAB
                        + "Content" + TAB + "Link" + TAB + "Post Id" + TAB
                        + "Post Title" + TAB + "Author" + TAB + "Author URL "
                        + TAB + "Author Email" + TAB + "Author IP";
            }

            /**
             * 
             * Creates a comment object from file
             * 
             * @param file input file
             * @return new Comment object
             * @throws FileNotFoundException
             * @throws IOException
             * @throws InvalidPostFormatException
             */
            public static Comment fromFile(File file)
                    throws FileNotFoundException, IOException,
                    InvalidPostFormatException {
                XmlRpcStruct c = FileParser.parseFile(new BufferedReader(
                        new FileReader(file)));
                Comment result = new Comment();
                result.fromXmlRpcStruct(c);
                return result;
            }
        }
w_w_w_.__j_a_v__a___2_s__.___c___om | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.