/**
  * Valorizza un nodo in base alle informazioni specificate..
  *
  * @param nodeToValue Il nodo da valorizzare.
  * @param parent Il nodo parente.
  * @param realNode Il nodo dal quela estrarre le info.
  */
 protected void fillTreeNode(TreeNode nodeToValue, TreeNode parent, ITreeNode realNode) {
   nodeToValue.setCode(realNode.getCode());
   if (null == parent) {
     nodeToValue.setParent(nodeToValue);
   } else {
     nodeToValue.setParent(parent);
   }
   Set<Object> codes = realNode.getTitles().keySet();
   Iterator<Object> iterKey = codes.iterator();
   while (iterKey.hasNext()) {
     String key = (String) iterKey.next();
     String title = realNode.getTitles().getProperty(key);
     nodeToValue.getTitles().put(key, title);
   }
 }
 private void addTreeWrapper(TreeNode currentNode, TreeNode parent, ITreeNode currentTreeNode) {
   ITreeNode[] children = currentTreeNode.getChildren();
   for (int i = 0; i < children.length; i++) {
     ITreeNode newCurrentTreeNode = children[i];
     TreeNode newNode = new TreeNode();
     this.fillTreeNode(newNode, currentNode, newCurrentTreeNode);
     currentNode.addChild(newNode);
     this.addTreeWrapper(newNode, currentNode, newCurrentTreeNode);
   }
 }