package com.aesthetikx.hubski.model;

import java.net.URL;
import java.util.List;

public class Comment {

    private String username;
    private URL userLink;
    private URL link;
    private String body;
    private String age;
    private int score;
    private Comment parent;
    private List<Comment> children;

    public Comment(String username, URL userLink, URL link, String body, String age, int score,
                   Comment parent, List<Comment> children) {
        this.username = username;
        this.userLink = userLink;
        this.link = link;
        this.body = body;
        this.age = age;
        this.score = score;
        this.parent = parent;
        this.children = children;
    }

    public String getUsername() {
        return username;
    }

    public URL getUserLink() {
        return userLink;
    }

    public URL getLink() {
        return link;
    }

    public String getBody() {
        return body;
    }

    public String getAge() {
        return age;
    }

    public int getScore() {
        return score;
    }

    public Comment getParent() {
        return parent;
    }

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

}

@@ -31,16 +31,123 @@
 model;%0A%0A
+import com.aesthetikx.hubski.adapter.BaseTreeListItem;%0Aimport com.aesthetikx.hubski.adapter.TreeListItem;%0A%0A
 import j
@@ -204,16 +204,65 @@
 Comment 
+extends BaseTreeListItem implements TreeListItem 
 %7B%0A%0A    p
@@ -409,36 +409,8 @@
 re;%0A
-    private Comment parent;%0A
     
@@ -541,69 +541,89 @@
 ore,
-%0A                   Comment pa
+ List%3CComment%3E child
 ren
-t
 , 
-List%3CComment%3E children) %7B
+int depth) %7B%0A        super(children, true, true, depth);
 %0A   
@@ -795,38 +795,8 @@
 re;%0A
-        this.parent = parent;%0A
     
@@ -1202,25 +1202,33 @@
 lic 
+List%3C
 Comment
+%3E
  get
-Pa
+Child
 ren
-t
 () %7B
@@ -1247,14 +1247,16 @@
 urn 
-pa
+child
 ren
-t
 ;%0A  
@@ -1267,37 +1267,202 @@
 %0A    public 
-List%3CComment%3E
+void print(int depth) %7B%0A        String tab = %22%22;%0A        for (int i = 0; i %3C depth; ++i) tab += %22%5Ct%22;%0A        System.out.println(tab + getUsername());%0A        for (Comment child:
  getChildren
@@ -1455,32 +1455,33 @@
 d: getChildren()
+)
  %7B%0A        retur
@@ -1475,32 +1475,53 @@
         
-return children;
+    child.print(depth + 1);%0A        %7D
 %0A    %7D%0A%0A

Add depth to comment, implement tree list item