public void addChild(ContentResult child) { if (this.children == null) { this.children = new ArrayList<ContentResult>(); } child.setPath(this.getPath() + "/" + child.getName()); this.children.add(child); }
public void setChildren(List<ContentResult> children) { for (ContentResult child : children) { child.setPath(this.getPath() + "/" + child.getName()); } this.children = children; }