package model;

import java.io.File;
import java.io.IOException;

import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode;

public class TreeData {
	private TitanDSM dsmData;
	private ClusterData cluster;
	private DefaultMutableTreeNode treeRoot;
	
	public TreeData(File dsmFile) throws IOException, WrongDSMFormatException {
		dsmData = new TitanDSM(dsmFile);
		cluster = null;
		treeRoot = null;
	}
	
	public void loadClusterData(File clsxFile) throws IOException, WrongXMLNamespaceException {
		cluster = new ClusterData(clsxFile);
		buildTree(cluster.getTree());
	}
	
	private DefaultMutableTreeNode buildTree() {
		DefaultMutableTreeNode node=null;//This is temporary implementation.
		
		//IMPLEMENT REQUIRED
		
		return node;
	}
	
	private void buildTree(TreeNode clsxTree) {
		
		//IMPLEMENT REQUIRED
		
	}
	
	//get,set,save,load to be implemented. Plz get on work.
}

@@ -665,56 +665,306 @@
 ode 
-node=null;//This is temporary implementation.
+root = new DefaultMutableTreeNode (%22 root %22);%0A%09%09Vector%3CDefaultMutableTreeNode%3Evec = new Vector%3CDefaultMutableTreeNode%3E();//%EB%B0%B1%ED%84%B0%EA%B0%9D%EC%B2%B4%EC%83%9D%EC%84%B1%0A%09%09String %5B%5Ddata =%7B%22A%22, %22B%22,%22C%22,%22D%22,%22E%22,%7D;//dsm string %EA%B0%80%EC%A0%95%0A%09%09for(int i=0;i%3Cdata.length;i++)%7B%0A%09%09%09vec.add(new DefaultMutableTreeNode(data%5Bi%5D));%0A%09%09%09root.add(vec.get(i));
 %0A%09%09
+%7D
 %0A%09%09/
@@ -999,12 +999,12 @@
 urn 
-node
+root
 ;%0A%09%7D

Update TreeData.java