private static void buildTree( ModelSchema modelSchema, Tree tree, Node parent )
{
for( Node child : parent.getNodes() )
{
Predicate predicate = child.getPredicate();
tree.addPredicate( parent.getId(), child.getId(), getPredicateFor( modelSchema, predicate ), child.getScore() );
buildTree( modelSchema, tree, child );
}