Package net.easymodo.asagi.model

Examples of net.easymodo.asagi.model.Topic.addPost()


        mat = omImagesPattern.matcher(text);
        if(mat.find()) omImages = Integer.parseInt(mat.group(1));

        Post op = this.parsePost(text, 0);
        Topic thread = new Topic(op.getNum(), omPosts, omImages);
        thread.addPost(op);

        return thread;
    }

    @SuppressWarnings("RedundantStringConstructorCall")
View Full Code Here


            if(type.equals("opContainer")) {
                t = this.parseThread(text);
                p.addThread(t);
            } else {
                if(t != null) t.addPost(this.parsePost(text, t.getNum()));
            }
        }

        p.setLastMod(newLastMod);
        return p;
View Full Code Here

                } else {
                    throw new ContentParseException("Two OP posts in thread in " + threadNum);
                }
            } else {
                if(t != null) {
                    t.addPost(this.parsePost(text, t.getNum()));
                } else {
                    throw new ContentParseException("Thread without OP post in " + threadNum);
                }
            }
        }
View Full Code Here

                            }

                            // Looks like it's new
                            // Add the post's num to the full topic, we'll
                            // update it for real with newTopic.
                            fullTopic.addPost(newPost.getNum()); newPosts++;

                            // Comment too long. Click here to view the full text.
                            // This means we have to refresh the full thread
                            if(newPost.isOmitted()) mustRefresh = true;
                        }
View Full Code Here

            for(PostJson pj : tj.getPosts()) {
                if(pj.getResto() == 0) {
                    t = this.makeThreadFromJson(pj);
                    p.addThread(t);
                } else {
                    if(t != null) t.addPost(this.makePostFromJson(pj));
                }
            }
        }

        p.setLastMod(newLastMod);
View Full Code Here

                } else {
                    throw new ContentParseException("Two OP posts in thread in " + threadNum);
                }
            } else {
                if(t != null) {
                    t.addPost(this.makePostFromJson(pj));
                } else {
                    throw new ContentParseException("Thread without OP post in " + threadNum);
                }
            }
        }
View Full Code Here

            throw new ContentParseException("Could not parse thread (thread post num missing and could not be zero)");
        }

        Topic t = new Topic(pj.getNo(), pj.getOmittedPosts(), pj.getOmittedImages());

        t.addPost(this.makePostFromJson(pj));
        return t;
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.