code: function createTree(){
      for (var i = 0; i < gRootNodes.length; ++i){
          var node = {
              _id : gRootNodes[i]._id, //todo : id instead of name?
              node : gRootNodes[i],
              parent : "root",
              childNodes : loadChildNodes(gRootNodes[i])
          };
          gTree.childNodes.push(node);
      }
  }
docs: Creates an object containing the nodes of the graph in the form of a tree