Index: xssim/trunk/src/test/rewolucja/schemas/XSSimResSchema.xsd
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/XSSimResSchema.xsd	(revision 319)
+++ xssim/trunk/src/test/rewolucja/schemas/XSSimResSchema.xsd	(revision 325)
@@ -5,5 +5,8 @@
 		<xs:complexType name="pluginType">
 		<xs:annotation>
-			<xs:documentation>Base plugin description</xs:documentation>
+			<xs:documentation>Base plugin type. 
+			Plugins allow a researcher to configure and adapt the simulation framework to his/her experiment 
+			starting from modeling job performance, through method of calculating energy estimation up to implementation of scheduling policies
+			Name of the plugin specifies the JAVA class that implements dedicated interface.</xs:documentation>
 		</xs:annotation>
 		<xs:sequence>
@@ -15,8 +18,15 @@
 	<xs:complexType name="timeEstimationPluginType">
 		<xs:annotation>
-			<xs:documentation>Time estimation plugin</xs:documentation>
-		</xs:annotation>
-		<xs:complexContent>
-			<xs:extension base="pluginType"/>
+			<xs:documentation>TimeEstimationPlugin derived from Plugin. 
+			Time estimation plugin provides means to include specific application performance models during simulations
+			and allows researchers to introduce specific ways of calculating task execution time.</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:restriction base="pluginType">
+				<xs:sequence>
+					<xs:element name="name" type="xs:string" default="ExecTimeEstimationPlugin"></xs:element>
+					<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+				</xs:sequence>
+			</xs:restriction>
 		</xs:complexContent>	
 	</xs:complexType>
@@ -24,5 +34,10 @@
 	<xs:complexType name="resourceType">
 		<xs:annotation>
-			<xs:documentation>Base resource type</xs:documentation>
+			<xs:documentation>Base resource type. 
+			It allows to define simulation entities like computing resources, devices, schedulers.
+			Attributes: class - determines the component of the architecture i.e rack, processor, memory, storage etc.
+			type - type of resource; for instance, continuous for memory, bandwidth, etc. and discrete for processors
+			name - unique resource identifier, if not specified it will be generated by the simulator in the following manner: class + "_" + subsequent_natural_number
+			</xs:documentation>
 		</xs:annotation>
 		<xs:sequence>
@@ -31,10 +46,17 @@
 		<xs:attribute name="class" type="xs:string" use="required"/>
 		<xs:attribute name="type" type="xs:string" use="optional"/>
-		<xs:attribute name="id" type="xs:ID" use="optional"/>
+		<xs:attribute name="name" type="xs:ID" use="optional"/>
 	</xs:complexType>
 
 	<xs:complexType name="computingResourceType">
 		<xs:annotation>
-			<xs:documentation>Computing resource template</xs:documentation>
+			<xs:documentation> ComputingResource derived from Resource
+			Computing resource specifies resources that are able to perform computing operations. 
+			From the simulator point of view computing resource is everything that is/contains processing element.
+			Hence, all entities like core, processor, computing node, as well as those which aggregate them (like shelf, rack, container etc.)
+			should be define using this type. This way of description provides flexibility in defining system architecture
+			and allows to build hierarchy of resources that corresponds to real world.
+			Attributes: groupId - allows to group resources of the given class in the logical structures that can be used during binding them with schedulers
+			count - defines number of resources of the given class</xs:documentation>
 		</xs:annotation>
 		<xs:complexContent>
@@ -43,13 +65,16 @@
 					<xs:choice>
 						<xs:sequence>
-							<xs:element name="computingResource" type="computingResourceType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 							<xs:element name="resourceUnit" type="resourceUnitType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 							<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 							<xs:element name="energyEstimationPlugin" type="energyEstimationPluginType" minOccurs="0" maxOccurs="1"></xs:element>
 							<xs:element name="profile" type="profileType" minOccurs="0" maxOccurs="1"></xs:element>
-						</xs:sequence>
-						<xs:element name="templateId" type="xs:IDREF"/>
+							<xs:element name="location" type="locationType" minOccurs="0" maxOccurs="1"></xs:element>
+							<xs:element name="computingResource" type="computingResourceType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+						</xs:sequence>
+						<xs:sequence>
+							<xs:element name="templateId" type="xs:IDREF"/>
+							<xs:element name="location" type="locationType" minOccurs="0" maxOccurs="1"></xs:element>
+						</xs:sequence>
 					</xs:choice>
-					<xs:element name="location" type="locationType" minOccurs="0" maxOccurs="1"></xs:element>
 				</xs:sequence>
 				<xs:attribute name="groupId" type="xs:integer" use="optional"/>			
@@ -61,14 +86,16 @@
 	<xs:complexType name="computingResourceTemplateType">
 		<xs:annotation>
-			<xs:documentation>Computing resource instance</xs:documentation>
+			<xs:documentation>ComputingResourceTemplate derived from Resource.
+			It allows to define model of computing resource component that may constitute other computing resources
+			Computing resource templates can be then referred in computing resource definition</xs:documentation>
 		</xs:annotation>
 		<xs:complexContent>
 			<xs:extension base="resourceType">
 				<xs:sequence>
-					<xs:element name="computingResource" type="computingResourceType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 					<xs:element name="resourceUnit" type="resourceUnitType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 					<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 					<xs:element name="energyEstimationPlugin" type="energyEstimationPluginType" minOccurs="0" maxOccurs="1"></xs:element>
 					<xs:element name="profile" type="profileType" minOccurs="0" maxOccurs="1"></xs:element>
+					<xs:element name="computingResource" type="computingResourceType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 				</xs:sequence>
 			</xs:extension>
@@ -78,5 +105,6 @@
 	<xs:complexType name="schedulerType">
 		<xs:annotation>
-			<xs:documentation>Scheduler</xs:documentation>
+			<xs:documentation>Scheduler derived from Resource.
+			It allows to model scheduling entity responsible for managing resources.</xs:documentation>
 		</xs:annotation>
 		<xs:complexContent>
@@ -86,5 +114,5 @@
 					<xs:choice minOccurs="1" maxOccurs="unbounded">
 						<xs:element name="scheduler" type="schedulerType"></xs:element>
-						<xs:element name="managedComputingResource" type="managedComputingResourceType"></xs:element>
+						<xs:element name="managedComputingResources" type="managedComputingResourcesType"></xs:element>
 					</xs:choice>
 					<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
@@ -96,10 +124,12 @@
 	<xs:complexType name="schedulingPluginType">
 		<xs:annotation>
-			<xs:documentation>Scheduling plugin</xs:documentation>
+			<xs:documentation>SchedulingPlugin derived from Plugin. Scheduling plugins allow plugging scheduling algorithms into the simulated environment.
+			Elements: frequency - is used to enable scheduling periodically; it specifies the time interval (in seconds by default) between subsequent scheduling invocations
+			</xs:documentation>
 		</xs:annotation>
 		<xs:complexContent>
 			<xs:extension base="pluginType">
 				<xs:sequence>
-					<xs:element name="frequency" type="xs:integer" minOccurs="0" maxOccurs="1"></xs:element>
+					<xs:element name="frequency" type="valueWithUnitType" minOccurs="0" maxOccurs="1"></xs:element>
 				</xs:sequence>
 			</xs:extension>
@@ -109,10 +139,11 @@
 	<xs:complexType name="resourceUnitType">
 		<xs:annotation>
-			<xs:documentation>Description of resource unit</xs:documentation>
+			<xs:documentation>Resource unit is used to define non-computing resource like memory, storage etc
+			Elements: amount - represents concrete amount (values) of specific resource unit</xs:documentation>
 		</xs:annotation>
 		<xs:complexContent>
 			<xs:extension base="resourceType">
 				<xs:sequence>
-					<xs:element name="amount" type="xs:double"/>
+					<xs:element name="amount" type="valueWithUnitType"/>
 					<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 				</xs:sequence>
@@ -120,12 +151,33 @@
 		</xs:complexContent>
 	</xs:complexType>
-	
-	<xs:complexType name="managedComputingResourceType">
-		<xs:annotation>
-			<xs:documentation>Definition of controlled (by scheduler) computing resources</xs:documentation>
-		</xs:annotation>
-		<xs:sequence minOccurs="1" maxOccurs="unbounded">
-			<xs:element name="resourceId" type="xs:string"></xs:element>
-		</xs:sequence>
+
+	<xs:complexType name="valueWithUnitType">
+		<xs:annotation>
+			<xs:documentation>ValueWitUnit derived from double. Allows to provide units in which a given value is expressed
+			Attributes: unit - indicate appropriate units, for instance: seconds, watts, bytes etc. </xs:documentation>
+		</xs:annotation>
+		<xs:simpleContent>
+			<xs:extension base="xs:double">
+				<xs:attribute name="unit" type="xs:string" use="optional"/>
+			</xs:extension>	
+		</xs:simpleContent>	
+	</xs:complexType>
+	
+	<xs:complexType name="managedComputingResourcesType">
+		<xs:annotation>
+			<xs:documentation>ManagedComputingResource type specifies controlled (by scheduler) computing resources.
+			They can be provided either by listing their names or listing the group ids for which they belong
+			Attributes: include - specifies whether scheduler shoud be built on top of given resources or shoud also incude them. 
+			In other words, false (default) value indicates that scheduler maaner only subcomponents of the listed resources;
+			true value determines that also listed resources will be under the control of the defined scheduler</xs:documentation>
+		</xs:annotation>
+		<xs:choice>
+			<xs:sequence>
+				<xs:element name="resourceName" type="xs:string" minOccurs="1" maxOccurs="unbounded"></xs:element>
+			</xs:sequence>
+			<xs:sequence>
+				<xs:element name="resourceGroupId" type="xs:string" minOccurs="1" maxOccurs="unbounded"></xs:element>
+			</xs:sequence>
+		</xs:choice>
 		<xs:attribute name="include" type="xs:boolean" default="false"/>
 	</xs:complexType>
@@ -133,5 +185,7 @@
 	<xs:complexType name="energyEstimationPluginType">
 		<xs:annotation>
-			<xs:documentation>Energy consumption estimation plugin</xs:documentation>
+			<xs:documentation>EnergyEstimationPlugin derived from Plugin. 
+			Energy estimation plugin is used to customize estimation of energy consumptions of the given computing resource 
+			to specific applications and hardware.</xs:documentation>
 		</xs:annotation>
 		<xs:complexContent>
@@ -142,5 +196,5 @@
 	<xs:complexType name="profileType">
 		<xs:annotation>
-			<xs:documentation>Resource profiles</xs:documentation>
+			<xs:documentation>Profile acts as a container for resource profiles: power and air throughput</xs:documentation>
 		</xs:annotation>
 		<xs:sequence>
@@ -152,5 +206,5 @@
 	<xs:complexType name="powerProfileType">
 		<xs:annotation>
-			<xs:documentation>Power profile</xs:documentation>
+			<xs:documentation>Power profile allows powerState and other power-related paremters definition</xs:documentation>
 		</xs:annotation>
 		<xs:sequence>
@@ -162,8 +216,8 @@
 	<xs:complexType name="powerStatesType">
 		<xs:annotation>
-			<xs:documentation>Definition of supported power states</xs:documentation>
-		</xs:annotation>
-		<xs:sequence minOccurs="1" maxOccurs="unbounded">
-			<xs:element name="powerState" type="powerStateType"></xs:element>
+			<xs:documentation>PowerState type act as a container for power states</xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element name="powerState" type="powerStateType" minOccurs="1" maxOccurs="unbounded"></xs:element>
 		</xs:sequence>
 	</xs:complexType>
@@ -171,22 +225,28 @@
 	<xs:complexType name="powerStateType">
 		<xs:annotation>
-			<xs:documentation>Definition of the power state</xs:documentation>
+			<xs:documentation>Power state defines availabe (for computing resource) power states.
+			Elements: name - denotes name of the given power state
+			powerUsage - defines power consumption in the given state
+			transition - specifies possible power states transitions form the given power state</xs:documentation>
 		</xs:annotation>
 		<xs:sequence>
 			<xs:element name="name" type="xs:string"></xs:element>
-			<xs:element name="powerUsage" type="xs:double" minOccurs="0" maxOccurs="1"></xs:element>
-			<xs:element name="transition" type="energyStatesTransitionType" minOccurs="0" maxOccurs="unbounded"></xs:element>
-			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
-		</xs:sequence>
-	</xs:complexType>
-	
-	<xs:complexType name="energyStatesTransitionType">
-		<xs:annotation>
-			<xs:documentation>Description of power states transtition</xs:documentation>
+			<xs:element name="powerUsage" type="valueWithUnitType" minOccurs="0" maxOccurs="1"></xs:element>
+			<xs:element name="transition" type="powerStatesTransitionType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+		</xs:sequence>
+	</xs:complexType>
+	
+	<xs:complexType name="powerStatesTransitionType">
+		<xs:annotation>
+			<xs:documentation>Description of power states transtition
+			Elements: to - denotes name of target power state
+			powerUsage - defines transition cost in the form of power consumption
+			time - specifies transition time</xs:documentation>
 		</xs:annotation>
 		<xs:sequence>
 			<xs:element name="to" type="xs:string"></xs:element>
-			<xs:element name="powerUsage" type="xs:double"></xs:element>
-			<xs:element name="time" type="xs:double"></xs:element>
+			<xs:element name="powerUsage" type="valueWithUnitType"></xs:element>
+			<xs:element name="time" type="valueWithUnitType"></xs:element>
 			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 		</xs:sequence>
@@ -195,8 +255,8 @@
 	<xs:complexType name="airThroughputProfileType">
 		<xs:annotation>
-			<xs:documentation>Description of the computing resource fan</xs:documentation>
-		</xs:annotation>
-		<xs:sequence minOccurs="1" maxOccurs="unbounded">
-			<xs:element name="airThroughputState" type="airThroughputStateType"></xs:element>
+			<xs:documentation>AirThrouhputProfile type acts as a container for air throughput states</xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element name="airThroughputState" type="airThroughputStateType" minOccurs="1" maxOccurs="unbounded"></xs:element>
 		</xs:sequence>
 	</xs:complexType>
@@ -204,10 +264,11 @@
 	<xs:complexType name="airThroughputStateType">
 		<xs:annotation>
-			<xs:documentation>Definition of the power state</xs:documentation>
+			<xs:documentation>Air througput state provides means to define air flow level. 
+			It can represent, for instance, a fan working state</xs:documentation>
 		</xs:annotation>
 		<xs:sequence>
 			<xs:element name="name" type="xs:string"></xs:element>
 			<xs:element name="value" type="xs:double"></xs:element>
-			<xs:element name="powerUsage" type="xs:double" minOccurs="0"></xs:element>
+			<xs:element name="powerUsage" type="valueWithUnitType" minOccurs="0"></xs:element>
 			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 		</xs:sequence>
@@ -216,5 +277,5 @@
 	<xs:complexType name="locationType">
 		<xs:annotation>
-			<xs:documentation>Location parameters of resource</xs:documentation>
+			<xs:documentation>The location type describes placement of the computing resource in the 3D coordinate system</xs:documentation>
 		</xs:annotation>
 		<xs:sequence>
@@ -228,17 +289,23 @@
 	<xs:complexType name="parameterType">
 		<xs:annotation>
-			<xs:documentation>Description of parameter of resource</xs:documentation>
+			<xs:documentation>Parameter of resource. Allows to define additional resource paramters.
+			Contains a list of parameter values or a list of key-value pairs.
+			Attribute : name - denotes paramter name</xs:documentation>
 		</xs:annotation>
 		<xs:choice>
 			<xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
-			<xs:sequence minOccurs="0" maxOccurs="unbounded">
-				<xs:element name="property">
-				<xs:complexType>
-					<xs:sequence minOccurs="0" maxOccurs="unbounded">
-						<xs:element name="value" type="xs:string"/>
-					</xs:sequence>
-					<xs:attribute name="name" type="xs:string" use="required"/>
-				</xs:complexType>
-			</xs:element>
+			<xs:sequence>
+				<xs:element name="property" minOccurs="0" maxOccurs="unbounded">
+					<xs:complexType>
+						<xs:annotation>
+							<xs:documentation>Property of paramter. Allows to define additional properties of parameter as a list of values.
+							Attribute : name - denotes property name</xs:documentation>
+						</xs:annotation>
+						<xs:sequence>
+							<xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+						</xs:sequence>
+						<xs:attribute name="name" type="xs:string" use="required"/>
+					</xs:complexType>
+				</xs:element>
 			</xs:sequence>
 		</xs:choice>
@@ -253,9 +320,5 @@
 			<xs:sequence>
 				<xs:element name="description" type="xs:string" minOccurs="0" ></xs:element>
-				<xs:element name="timeEstimationPlugin" type="timeEstimationPluginType" minOccurs="0" maxOccurs="1">
-					<xs:annotation>
-						<xs:documentation>Specifies which plugin is used to estimate task execution time</xs:documentation>
-					</xs:annotation>
-				</xs:element>
+				<xs:element name="timeEstimationPlugin" type="timeEstimationPluginType" minOccurs="0" maxOccurs="1"></xs:element>
 				<xs:element name="resources">
 					<xs:annotation>
@@ -271,9 +334,9 @@
 				<xs:element name="templates" minOccurs="0">
 					<xs:annotation>
-						<xs:documentation>Definition of computing resource templates that can/will be used in resoce description section </xs:documentation>
+						<xs:documentation>Definition of computing resource templates that can/will be used in resource description section </xs:documentation>
 					</xs:annotation>
 					<xs:complexType>
-						<xs:sequence maxOccurs="unbounded">
-							<xs:element name="computingResourceTemplate" type="computingResourceTemplateType"/>
+						<xs:sequence>
+							<xs:element name="computingResourceTemplate" type="computingResourceTemplateType" maxOccurs="unbounded"/>
 						</xs:sequence>
 					</xs:complexType>
