Index: DCWoRMS/trunk/src/simulator/stats/implementation/DCWormsStatistics.java
===================================================================
--- DCWoRMS/trunk/src/simulator/stats/implementation/DCWormsStatistics.java	(revision 481)
+++ DCWoRMS/trunk/src/simulator/stats/implementation/DCWormsStatistics.java	(revision 490)
@@ -19,4 +19,5 @@
 import java.util.TreeMap;
 
+import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -55,5 +56,5 @@
 import schedframe.exceptions.ResourceException;
 import schedframe.resources.ResourceType;
-import schedframe.resources.StandardResourceType;
+import schedframe.resources.UserResourceType;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.extensions.Extension;
@@ -87,7 +88,7 @@
 import csiro.mit.utils.jfreechart.timetablechart.data.TimetableEventSource;
 import csiro.mit.utils.jfreechart.timetablechart.renderer.TimetableRenderer;
+import dcworms.schedframe.scheduling.ExecTask;
+import dcworms.schedframe.scheduling.Executable;
 import eduni.simjava.Sim_stat;
-import gssim.schedframe.scheduling.ExecTask;
-import gssim.schedframe.scheduling.Executable;
 
 public class DCWormsStatistics implements SimulationStatistics {
@@ -149,5 +150,5 @@
 	protected HashMap<String, List<String>> task_processorsMap;
 
-	protected JobRegistryImpl jr;
+	protected JobRegistry jr;
 
 	
@@ -168,5 +169,5 @@
 
 		this.resourceController = resourceController;
-		 jr = new JobRegistryImpl("COMPUTING_GRID_0#BROKER");
+		jr = new JobRegistryImpl("");
 		init();
 	}
@@ -231,8 +232,5 @@
 			simulationStatsFile.close();
 		}
-
-	}
-
-
+	}
 
 	/************* RESOURCE STATISTICS SECTION **************/
@@ -241,29 +239,17 @@
 		
 		//TEMPORARY CONFIGURATION SECTION
-		StandardResourceType [] resForAnalyze = {StandardResourceType.DataCenter, StandardResourceType.ComputingNode, StandardResourceType.Processor};
-		HashMap<StandardResourceType, List<Stats>> type_stats = new HashMap<StandardResourceType, List<Stats>>();
-		
-		List<Stats> crStats = new ArrayList<Stats>();
-		crStats.add(Stats.textLoad);
-		crStats.add(Stats.chartLoad);
-		crStats.add(Stats.textEnergy);
-		crStats.add(Stats.chartEnergy);
-		type_stats.put(StandardResourceType.DataCenter, crStats);
-		
-		List<Stats> cnStats = new ArrayList<Stats>();
-		cnStats.add(Stats.textLoad);
-		cnStats.add(Stats.chartLoad);
-		cnStats.add(Stats.textEnergy);
-		cnStats.add(Stats.chartEnergy);
-		type_stats.put(StandardResourceType.ComputingNode, cnStats);
-		
-		List<Stats> cpuStats = new ArrayList<Stats>();
-		cpuStats.add(Stats.textLoad);
-		cpuStats.add(Stats.chartLoad);
-		cpuStats.add(Stats.textEnergy);
-		//cpuStats.add(Stats.chartEnergy);
-		type_stats.put(StandardResourceType.Processor, cpuStats);
-		
-		
+		
+		HashMap<String, List<Stats>> type_stats = new HashMap<String, List<Stats>>();
+		
+		for(String resourceName: resourceController.getComputingResourceLayers()){
+			List<Stats> cStats = new ArrayList<Stats>();
+			cStats.add(Stats.textLoad);
+			if(ArrayUtils.contains(configuration.resForUtilizationChart, resourceName))
+				cStats.add(Stats.chartLoad);
+			cStats.add(Stats.textEnergy);
+			if(ArrayUtils.contains(configuration.resForEnergyChart, resourceName))
+				cStats.add(Stats.chartEnergy);
+			type_stats.put(resourceName, cStats);
+		}		
 		
 		peGanttMap = new HashMap<String, TimetableEventSource>();
@@ -305,17 +291,17 @@
 		}
 		
-		for(StandardResourceType resType: resForAnalyze){
+		for(String resourceName: resourceController.getComputingResourceLayers()){
 			List<ComputingResource> resources = null;
 			try {
 				resources = new ArrayList<ComputingResource>();
 				for(ComputingResource compRes: resourceController.getComputingResources() ){
-					resources.addAll(compRes.getDescendantsByType(resType));
-				}
-				/*if(resourceController.getComputingResources().get(0).getType().equals(resType))
-					resources.addAll(resourceController.getComputingResources());*/
+					resources.addAll(compRes.getDescendantsByType(new UserResourceType(resourceName)));
+				}
+				if(resourceController.getComputingResources().get(0).getType().getName().equals(resourceName))
+					resources.addAll(resourceController.getComputingResources());
 			} catch (Exception e) {
 				continue;
 			}
-			if(type_stats.containsKey(resType)){
+			if(type_stats.containsKey(resourceName)){
 				Map<String, GSSAccumulator> energyCategoryStats = new TreeMap<String, GSSAccumulator>();
 				Map<String, GSSAccumulator> loadCategoryStats = new TreeMap<String, GSSAccumulator>();
@@ -323,5 +309,5 @@
 					ResourceUsageStats resourceUsage = null;
 					ResourceEnergyStats energyUsage = null;
-					if(type_stats.get(resType).contains(Stats.textLoad)){
+					if(type_stats.get(resourceName).contains(Stats.textLoad)){
 						resourceUsage = gatherResourceLoadStats(resource, basicResStats);
 						resourceUsage.setMeanUsage(calculateResourceLoad(resource, basicResLoad));
@@ -331,10 +317,10 @@
 						}
 					}
-					if(type_stats.get(resType).contains(Stats.chartLoad)){
+					if(type_stats.get(resourceName).contains(Stats.chartLoad)){
 						if (configuration.creatediagrams_resources) {
 							createResourceLoadDiagram(resourceUsage);
 						}
 					}
-					if(type_stats.get(resType).contains(Stats.textEnergy)){
+					if(type_stats.get(resourceName).contains(Stats.textEnergy)){
 						energyUsage = gatherResourceEnergyStats(resource);
 						energyUsage.setMeanUsage(calculateEnergyLoad(energyUsage));
@@ -352,6 +338,5 @@
 							boolean top = true;
 							while(parent != null){
-								if(een != null &&  een.getPowerProfile() != null)
-								{
+								if(een != null &&  een.getPowerProfile() != null) {
 									top = false;
 									break;
@@ -368,5 +353,5 @@
 						}
 					}
-					if(type_stats.get(resType).contains(Stats.chartEnergy)){
+					if(type_stats.get(resourceName).contains(Stats.chartEnergy)){
 
 						if (configuration.creatediagrams_energyusage) {
@@ -760,5 +745,5 @@
 	private JFreeChart getResourcesEnergyDiagram(ResourceType resType, String chartName,
 			Title subtitle, String simulationTime) {
-		String energy = "ENERGY [W]";
+		String energy = "POWER [W]";
 		boolean urls = false;
 		boolean tooltip = true;
Index: DCWoRMS/trunk/src/simulator/stats/implementation/TaskStats.java
===================================================================
--- DCWoRMS/trunk/src/simulator/stats/implementation/TaskStats.java	(revision 481)
+++ DCWoRMS/trunk/src/simulator/stats/implementation/TaskStats.java	(revision 490)
@@ -1,7 +1,8 @@
 package simulator.stats.implementation;
 
-import gssim.schedframe.scheduling.Executable;
 
 import java.util.List;
+
+import dcworms.schedframe.scheduling.Executable;
 
 import simulator.stats.implementation.out.StatsSerializer;
