Index: xssim/trunk/src/test/rewolucja/schemas/example/example1.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/example1.xml	(revision 276)
+++ xssim/trunk/src/test/rewolucja/schemas/example/example1.xml	(revision 294)
@@ -4,17 +4,17 @@
 	<!-- Analogiczny opis zasobow jak do tej pory, dla srodowiska gridowego -->
 	<resources>
-		<computingResource resourceType="DataCenter" resourceId="compRes1">
-			<computingResource resourceType="Processor" count="64"/>
+		<computingResource type="DataCenter" id="compRes1">
+			<computingResource type="Processor" count="64"/>
 		</computingResource>	
-		<computingResource resourceType="DataCenter" resourceId="compRes2">
-			<computingResource resourceType="Processor" count="64"/>
+		<computingResource type="DataCenter" id="compRes2">
+			<computingResource type="Processor" count="64"/>
 		</computingResource>
 		<!-- Plugin dla Brokera
 		Definicja pluginu zostala przeniesiona z pliku z propertiesami  ma byc tu czy w propertiesach, sciezki bezwzledne czy wzgledne z domyslnej lokalizacji (moga byc obie mozliwosci ale to juz na poziomie tworzenia zasobow)-->
-		<scheduler resourceType="GridBroker" resourceId="gridBroker">
+		<scheduler type="GridBroker" id="gridBroker">
 			<schedulingPlugin>
 				<name>GridFCFSLoadBalancingPlugin</name>
 			</schedulingPlugin>
-			<scheduler resourceType="Cluster" resourceId="cluster1">
+			<scheduler type="Cluster" id="cluster1">
 				<schedulingPlugin>
 					<name>FCFSLocalSchedulingPlugin</name>
@@ -24,5 +24,5 @@
 				</managedComputingResource>
 			</scheduler>
-			<scheduler resourceType="Cluster" resourceId="cluster2">
+			<scheduler type="Cluster" id="cluster2">
 				<schedulingPlugin>
 					<name>FCFSLocalSchedulingPlugin</name>
Index: xssim/trunk/src/test/rewolucja/schemas/example/example2.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/example2.xml	(revision 277)
+++ xssim/trunk/src/test/rewolucja/schemas/example/example2.xml	(revision 294)
@@ -4,18 +4,18 @@
 	<!-- Opis zasobow dla srodowiska gridowego -->
 	<resources>
-		<computingResource resourceType="DataCenter" resourceId="compRes1">
-			<computingResource resourceType="Processor" count="64"/>
+		<computingResource type="DataCenter" id="compRes1">
+			<computingResource type="Processor" count="64"/>
 		</computingResource>	
-		<computingResource resourceType="DataCenter" resourceId="compRes2">
-			<computingResource resourceType="Processor" count="64"/>
+		<computingResource type="DataCenter" id="compRes2">
+			<computingResource type="Processor" count="64"/>
 		</computingResource>
 		<!-- W tym przypadku Broker zarzadza dwoma klastrami (cluster1 i cluster2)
 		Kazdy z klastrow skojarzony jest z odpowiednimi zasobami (odpowiednio compRes1 i compRes2) tzn. sklada sie(zarzadza) wszystkimi zasobami znajdujacymi sie pod nimi
 		Patrz tez example3.xml -->
-		<scheduler resourceType="GridBroker" resourceId="gridBroker">
+		<scheduler type="GridBroker" id="gridBroker">
 			<schedulingPlugin>
 				<name>GridFCFSLoadBalancingPlugin</name>
 			</schedulingPlugin>
-			<scheduler resourceType="Cluster" resourceId="cluster1">
+			<scheduler type="Cluster" id="cluster1">
 				<schedulingPlugin>
 					<name>FCFSLocalSchedulingPlugin</name>
@@ -26,5 +26,5 @@
 				</managedComputingResource>
 			</scheduler>
-			<scheduler resourceType="Cluster" resourceId="cluster2">
+			<scheduler type="Cluster" id="cluster2">
 				<schedulingPlugin>
 					<name>FCFSLocalSchedulingPlugin</name>
Index: xssim/trunk/src/test/rewolucja/schemas/example/example3.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/example3.xml	(revision 278)
+++ xssim/trunk/src/test/rewolucja/schemas/example/example3.xml	(revision 294)
@@ -4,27 +4,27 @@
 	<!-- Opis zasobow dla srodowiska gridowego -->
 	<resources>
-		<computingResource resourceType="DataCenter" resourceId="compRes1">
-			<computingResource resourceType="ComputingNode" resourceId="node11"/>
-			<computingResource resourceType="ComputingNode" resourceId="node12"/>
-			<computingResource resourceType="ComputingNode" resourceId="node13"/>
-			<computingResource resourceType="ComputingNode" resourceId="node14"/>
-			<computingResource resourceType="ComputingNode" resourceId="node15"/>
-			<computingResource resourceType="ComputingNode" resourceId="node16"/>
+		<computingResource type="DataCenter" id="compRes1">
+			<computingResource type="ComputingNode" id="node11"/>
+			<computingResource type="ComputingNode" id="node12"/>
+			<computingResource type="ComputingNode" id="node13"/>
+			<computingResource type="ComputingNode" id="node14"/>
+			<computingResource type="ComputingNode" id="node15"/>
+			<computingResource type="ComputingNode" id="node16"/>
 		</computingResource>	
-		<computingResource resourceType="DataCenter" resourceId="compRes2">
-			<computingResource resourceType="ComputingNode" resourceId="node21"/>
-			<computingResource resourceType="ComputingNode" resourceId="node22"/>
-			<computingResource resourceType="ComputingNode" resourceId="node23"/>
-			<computingResource resourceType="ComputingNode" resourceId="node24"/>
-			<computingResource resourceType="ComputingNode" resourceId="node25"/>
-			<computingResource resourceType="ComputingNode" resourceId="node26"/>
+		<computingResource type="DataCenter" id="compRes2">
+			<computingResource type="ComputingNode" id="node21"/>
+			<computingResource type="ComputingNode" id="node22"/>
+			<computingResource type="ComputingNode" id="node23"/>
+			<computingResource type="ComputingNode" id="node24"/>
+			<computingResource type="ComputingNode" id="node25"/>
+			<computingResource type="ComputingNode" id="node26"/>
 		</computingResource>
 		<!-- W tym przypadku Broker zarzadza czterema klastrami (cluter1, cluster2, cluster3, cluster4)
 		Kazdy z klastrow sklada sie(zarzadza) z 3 wezlow wylistowanych ponizej -->
-		<scheduler resourceType="GridBroker" resourceId="gridBroker">
+		<scheduler type="GridBroker" id="gridBroker">
 			<schedulingPlugin>
 				<name>GridFCFSLoadBalancingPlugin</name>
 			</schedulingPlugin>
-			<scheduler resourceType="Cluster" resourceId="cluster1">
+			<scheduler type="Cluster" id="cluster1">
 				<schedulingPlugin>
 					<name>FCFSLocalSchedulingPlugin</name>
@@ -38,5 +38,5 @@
 				</managedComputingResource>
 			</scheduler>
-			<scheduler resourceType="Cluster" resourceId="cluster2">
+			<scheduler type="Cluster" id="cluster2">
 				<schedulingPlugin>
 					<name>FCFSLocalSchedulingPlugin</name>
@@ -50,5 +50,5 @@
 				</managedComputingResource>
 			</scheduler>
-			<scheduler resourceType="Cluster" resourceId="cluster3">
+			<scheduler type="Cluster" id="cluster3">
 				<schedulingPlugin>
 					<name>FCFSLocalSchedulingPlugin</name>
@@ -62,5 +62,5 @@
 				</managedComputingResource>
 			</scheduler>
-			<scheduler resourceType="Cluster" resourceId="cluster4">
+			<scheduler type="Cluster" id="cluster4">
 				<schedulingPlugin>
 					<name>FCFSLocalSchedulingPlugin</name>
Index: xssim/trunk/src/test/rewolucja/schemas/example/example4.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/example4.xml	(revision 279)
+++ xssim/trunk/src/test/rewolucja/schemas/example/example4.xml	(revision 294)
@@ -5,6 +5,6 @@
 	<!-- Opis dla data center z podstawowa charakterystyka zasobow -->
 	<resources>
-		<computingResource resourceType="DataCenter" resourceId="compRes1">
-			<computingResource resourceType="ComputingNode" resourceId="compNode1">
+		<computingResource type="DataCenter" id="compRes1">
+			<computingResource type="ComputingNode" id="compNode1">
 				<resourceParameter name="memory">
 					<paramValue>12288</paramValue>
@@ -13,7 +13,7 @@
 					<paramValue>100</paramValue>
 				</resourceParameter>
-				<computingResource resourceType="Processor" count="8"/>
+				<computingResource type="Processor" count="8"/>
 			</computingResource>	
-			<computingResource resourceType="ComputingNode" resourceId="compNode2">
+			<computingResource type="ComputingNode" id="compNode2">
 				<resourceParameter name="memory">
 					<paramValue>12288</paramValue>
@@ -22,8 +22,8 @@
 					<paramValue>60</paramValue>
 				</resourceParameter>
-				<computingResource resourceType="Processor" count="8"/>
+				<computingResource type="Processor" count="8"/>
 			</computingResource>
 		</computingResource>
-		<scheduler resourceType="Cluster" resourceId="cluster1">
+		<scheduler type="Cluster" id="cluster1">
 			<schedulingPlugin>
 				<name>FCFSLocalSchedulingPlugin</name>
Index: xssim/trunk/src/test/rewolucja/schemas/example/example5.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/example5.xml	(revision 281)
+++ xssim/trunk/src/test/rewolucja/schemas/example/example5.xml	(revision 294)
@@ -5,14 +5,11 @@
 	<!-- Opis dla data center z uwzglednieniem aspektow energetycznych -->
 	<resources>
-		<computingResource resourceType="DataCenter" resourceId="compRes1">
-			<computingResource resourceType="ComputingNode" count="57">
-				<energyProfile>
-					<name>ComputingNodePowerProfile</name>
-				</energyProfile>
-				<energyEstimationPlugin>
-					<name>ComputingNodeEnergyEstimationPlugin</name>
-				</energyEstimationPlugin>
-				<computingResource resourceType="Processor" count="8">
-					<energyProfile>
+		<computingResource type="DataCenter" id="compRes1">
+			<computingResource type="ComputingNode" count="57">
+				<computingResource type="Processor" count="8">
+					<energyEstimationPlugin>
+						<name>CPUEnergyEstimationPlugin</name>
+					</energyEstimationPlugin>
+					<energyPowerProfile>
 						<name>CPUPowerProfile</name>
 						<pStates>
@@ -40,12 +37,15 @@
 							</powerState>
 						</powerStates>
-					</energyProfile>
-					<energyEstimationPlugin>
-						<name>CPUEnergyEstimationPlugin</name>
-					</energyEstimationPlugin>
+					</energyPowerProfile>
 				</computingResource>
+				<energyEstimationPlugin>
+					<name>ComputingNodeEnergyEstimationPlugin</name>
+				</energyEstimationPlugin>
+				<energyPowerProfile>
+					<name>ComputingNodePowerProfile</name>
+				</energyPowerProfile>
 			</computingResource>	
 		</computingResource>
-		<scheduler resourceType="Cluster" resourceId="cluster1">
+		<scheduler type="Cluster" id="cluster1">
 			<schedulingPlugin>
 				<name>FCFSLocalSchedulingPlugin</name>
Index: xssim/trunk/src/test/rewolucja/schemas/example/example6.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/example6.xml	(revision 280)
+++ xssim/trunk/src/test/rewolucja/schemas/example/example6.xml	(revision 294)
@@ -5,68 +5,39 @@
 	<!-- Opis dla data center z uwzglednieniem rozmieszczenia zasobow -->
 	<resources>
-		<computingResource resourceType="DataCenter" resourceId="compRes1">
-			<otherParameter name="dimensions">
-				<property name="width">
-					<value>40</value>
-				</property>
-				<property name="length">
-					<value>30</value>
-				</property>
-				<property name="height">
-					<value>4</value>
-				</property>
-			</otherParameter>
-			<computingResource resourceType="Rack" resourceId="rack1">
-				<otherParameter name="placement">
-					<property name="x">
-						<value>4</value>
-					</property>
-					<property name="y">
-						<value>3</value>
-					</property>
-				</otherParameter>
-				<otherParameter name="dimensions">
-					<property name="width">
-						<value>1</value>
-					</property>
-					<property name="length">
-						<value>1</value>
-					</property>
-					<property name="height">
-						<value>2</value>
-					</property>
-				</otherParameter>
-				<computingResource resourceType="ComputingNode" resourceId="node11">
+		<computingResource type="DataCenter" id="compRes1">
+			<computingResource type="Rack" id="rack1">
+				<computingResource type="ComputingNode" id="node11">
 				</computingResource>
-				<computingResource resourceType="ComputingNode" resourceId="node12">
+				<computingResource type="ComputingNode" id="node12">
 				</computingResource>
 			</computingResource>	
-			<computingResource resourceType="Rack" resourceId="rack2">
-				<otherParameter name="placement">
-					<property name="x">
-						<value>6</value>
-					</property>
-					<property name="y">
-						<value>3</value>
-					</property>
-				</otherParameter>
-				<otherParameter name="dimensions">
-					<property name="width">
-						<value>1</value>
-					</property>
-					<property name="length">
-						<value>1</value>
-					</property>
-					<property name="height">
-						<value>2</value>
-					</property>
-				</otherParameter>
-				<computingResource resourceType="ComputingNode" resourceId="node21">
+			<computingResource type="Rack" id="rack2">
+				<computingResource type="ComputingNode" id="node21">
 				</computingResource>
-				<computingResource resourceType="ComputingNode" resourceId="node22">
+				<computingResource type="ComputingNode" id="node22">
 				</computingResource>
+				<location>
+					<vertical>6</vertical>
+					<horizontal>3</horizontal>
+					<depth>0</depth>
+				</location>
+				<size>
+					<length>1</length>
+					<width>1</width>
+					<height>2</height>
+				</size>
 			</computingResource>
+			<location>
+				<vertical>4</vertical>
+				<horizontal>3</horizontal>
+				<depth>0</depth>
+			</location>
+			<size>
+				<length>1</length>
+				<width>1</width>
+				<height>2</height>
+			</size>
 		</computingResource>	
-		<scheduler resourceType="Cluster" resourceId="cluster1">
+		<scheduler type="Cluster" id="cluster1">
 			<schedulingPlugin>
 				<name>FCFSLocalSchedulingPlugin</name>
Index: xssim/trunk/src/test/rewolucja/schemas/example/example7.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/example7.xml	(revision 294)
+++ xssim/trunk/src/test/rewolucja/schemas/example/example7.xml	(revision 294)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<environment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+	xsi:noNamespaceSchemaLocation="../XSSimResSchema.xsd">
+	
+	<timeEstimationPlugin>
+		<name>ExecTimeEstimationPlugin</name>
+	</timeEstimationPlugin>
+	
+	<!-- Opis dla data center z uwzglednieniem rozmieszczenia zasobow -->
+	<resources>
+		<computingResource type="DataCenter" id="compRes1">
+			<computingResource type="Rack" id="rack1">
+				<computingResource type="ComputingNode" id="node11">
+				</computingResource>
+				<computingResource type="ComputingNode" id="node12">
+				</computingResource>
+			</computingResource>	
+			<computingResource type="Rack" id="rack2">
+				<computingResource type="ComputingNode" id="node21" templateId="modelNodeA"></computingResource>
+				<computingResource type="ComputingNode" id="node22">
+					<computingResource type="Processor" templateId="modelProcessorB" count="8"></computingResource>
+				</computingResource>
+			</computingResource>
+		</computingResource>	
+		<scheduler type="Cluster" id="cluster1">
+			<schedulingPlugin>
+				<name>FCFSLocalSchedulingPlugin</name>
+			</schedulingPlugin>		
+			<managedComputingResource>
+				<associatedComputingResource>compRes1</associatedComputingResource>
+			</managedComputingResource>
+		</scheduler>
+	</resources>
+	
+	<templates>
+		<computingResourceTemplate type="ComputingNode" id="modelNodeA">
+			<computingResource type="Processor" templateId="modelProcessorA" count="4"></computingResource>
+		</computingResourceTemplate>	
+		<computingResourceTemplate type="Processor" id="modelProcessorA">
+			<energyEstimationPlugin>
+				<name>CPUEnergyEstimationPlugin</name>
+			</energyEstimationPlugin>
+			<energyPowerProfile>
+				<name>CPUPowerProfile</name>
+				<pStates>
+					<pState>
+						<name>P0</name>
+						<frequency>3000</frequency>
+						<voltage>1.3</voltage>
+						<power>14</power>
+					</pState>
+					<pState>
+						<name>P1</name>
+						<frequency>2660</frequency>
+						<voltage>1.2</voltage>
+						<power>12</power>
+					</pState>
+					<pState>
+						<name>P2</name>
+						<frequency>2330</frequency>
+						<voltage>1.1</voltage>
+						<power>10</power>
+					</pState>
+					<pState>
+						<name>P3</name>
+						<frequency>2000</frequency>
+						<voltage>1.0</voltage>
+						<power>8</power>
+					</pState>
+				</pStates>
+				<powerStates>
+					<powerState>
+						<name>ON</name>
+						<power>20</power>
+						<transition>
+							<to>OFF</to>
+							<power>30</power>
+							<time>30</time>
+						</transition>
+					</powerState>
+					<powerState>
+						<name>OFF</name>
+						<power>0</power>
+						<transition>
+							<to>ON</to>
+							<power>40</power>
+							<time>60</time>
+						</transition>
+					</powerState>
+				</powerStates>
+			</energyPowerProfile>
+		</computingResourceTemplate>
+		<computingResourceTemplate type="Processor" id="modelProcessorB">
+			<energyEstimationPlugin>
+				<name>CPUEnergyEstimationPlugin</name>
+			</energyEstimationPlugin>
+			<energyPowerProfile>
+				<name>CPUPowerProfile</name>
+				<pStates>
+					<pState>
+						<name>P0</name>
+						<frequency>2200</frequency>
+						<voltage>1.3</voltage>
+						<power>20</power>
+					</pState>
+					<pState>
+						<name>P1</name>
+						<frequency>2000</frequency>
+						<voltage>1.2</voltage>
+						<power>17</power>
+					</pState>
+					<pState>
+						<name>P2</name>
+						<frequency>1800</frequency>
+						<voltage>1.1</voltage>
+						<power>16</power>
+					</pState>
+					<pState>
+						<name>P3</name>
+						<frequency>1000</frequency>
+						<voltage>1.0</voltage>
+						<power>10</power>
+					</pState>
+				</pStates>
+				<powerStates>
+					<powerState>
+						<name>ON</name>
+						<power>20</power>
+						<transition>
+							<to>OFF</to>
+							<power>30</power>
+							<time>30</time>
+						</transition>
+					</powerState>
+					<powerState>
+						<name>OFF</name>
+						<power>0</power>
+						<transition>
+							<to>ON</to>
+							<power>40</power>
+							<time>60</time>
+						</transition>
+					</powerState>
+				</powerStates>
+			</energyPowerProfile>
+		</computingResourceTemplate>
+	</templates>
+</environment>
