* @param node
* one node to examine
* @return true if this node should be pruned from the tree, false otherwise
*/
private boolean pruneForDisplay(DashHierarchy hier, PropertyKey node) {
Prop p = hier.pget(node);
String templateId = p.getID();
boolean isProject = StringUtils.hasValue(templateId);
for (int i = p.getNumChildren(); i-- > 0;) {
PropertyKey child = p.getChild(i);
boolean shouldPrune = isProject || pruneForDisplay(hier, child);
if (shouldPrune)
p.removeChild(i);
}
return isProject == false && p.getNumChildren() == 0;
}