public static DefaultMutableTreeNode transform()
     {
         DefaultMutableTreeNode root= new DefaultMutableTreeNode((HierarchyType) rootElement.getValue());
         LinkedList coada = new LinkedList();
         coada.push(root);
         while (coada.size()>0)
         {
           DefaultMutableTreeNode node =(DefaultMutableTreeNode) coada.pop();
           if(getName(node.getUserObject()).equals("hierarchy"))
           {
               HierarchyType temp = (HierarchyType)node.getUserObject();
               DefaultMutableTreeNode a = new DefaultMutableTreeNode(temp.getHierarchyDocs());
               DefaultMutableTreeNode b = new DefaultMutableTreeNode(temp.getHierarchyBlocks());
               
               node.add(a); node.add(b);
               coada.push(a);coada.push(b);
           }
           if(getName(node.getUserObject()).equals("hierarchydocs"))
           {
               HierarchyDocsType temp = (HierarchyDocsType)node.getUserObject();
               List<DocumentType> docs = temp.getDocument();
               for(int i=0; i<docs.size(); i++){
                   DefaultMutableTreeNode a = new DefaultMutableTreeNode(docs.get(i));
                   node.add(a);
                   coada.push(a);
               }
           }
           if(getName(node.getUserObject()).equals("hierarchyblocks"))
           {
               HierarchyBlocksType temp = (HierarchyBlocksType)node.getUserObject();
               List<BlockType> docs = temp.getTextBlockOrImageBlockOrComposedBlock();
               for(int i=0; i<docs.size(); i++){
                   DefaultMutableTreeNode a = new DefaultMutableTreeNode(docs.get(i));
                   node.add(a);
                   coada.push(a);
               }
           }
           if(getName(node.getUserObject()).equals("document"))
           {
               DocumentType temp = (DocumentType)node.getUserObject();
               DefaultMutableTreeNode a = new DefaultMutableTreeNode(temp);
               //node.add(a);
           }
           if(getName(node.getUserObject()).equals("imageblock"))
           {
               ImageBlockType temp = (ImageBlockType)node.getUserObject();
               DefaultMutableTreeNode a = new DefaultMutableTreeNode(temp.getPolygon());
               node.add(a);
               coada.push(a);
           }
           
           if(getName(node.getUserObject()).equals("polygon"))
           {
               PolygonType temp = (PolygonType)node.getUserObject();
               List<PointType> docs = temp.getPoint();
               for(int i=0; i<docs.size(); i++){
                   DefaultMutableTreeNode a = new DefaultMutableTreeNode(docs.get(i));
                   node.add(a);
                   
               }
           }
           if(getName(node.getUserObject()).equals("textblock"))
           {
               TextBlockType temp = (TextBlockType)node.getUserObject();
               List<TextBlockType.TextLine> docs = temp.getTextLine();
               for(int i=0; i<docs.size(); i++){
                   DefaultMutableTreeNode a = new DefaultMutableTreeNode(docs.get(i));
                   node.add(a);
                   coada.push(a);
               }
           }
           if(getName(node.getUserObject()).equals("point"))
           {
               PointType temp = (PointType)node.getUserObject();
               DefaultMutableTreeNode a = new DefaultMutableTreeNode(temp);
               node.add(a);
           }
           if(getName(node.getUserObject()).equals("composedblock"))
           {
               ComposedBlockType temp = (ComposedBlockType)node.getUserObject();
               List<BlockType> docs = temp.getTextBlockOrImageBlockOrComposedBlock();
               for(int i=0; i<docs.size(); i++){
                   DefaultMutableTreeNode a = new DefaultMutableTreeNode(docs.get(i));
                   node.add(a);
                   coada.push(a);
               }
           }
           
           
         }
         return root;
     }