<?xml version="1.0" encoding="UTF-8"?>
<!--/////////////////////////////////////////////////////////////////////////
//
// Â© University of Southampton IT Innovation Centre, 2006
//
// Copyright in this library belongs to the IT Innovation Centre of
// 2 Venture Road, Chilworth Science Park, Southampton SO16 7NP, UK.
//
// This software may not be used, sold, licensed, transferred, copied
// or reproduced in whole or in part in any manner or form or in or
// on any media by any person other than in accordance with the terms
// of the Licence Agreement supplied with the software, or otherwise
// without the prior written consent of the copyright owners.
//
// This software is distributed WITHOUT ANY WARRANTY, without even the
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE, except where stated in the Licence Agreement supplied with
// the software.
//
//      Created By :            Panos Melas
//      Created Date :          2007/03/10
//      Created for Project:    xxx
//
/////////////////////////////////////////////////////////////////////////
//
//      Dependencies : none
//
/////////////////////////////////////////////////////////////////////////
//
//      Last commit info:       $Author: ds $
//                              $Date: 2007-09-12 13:26:29 +0100 (Wed, 12 Sep 2007) $
//                              $Revision: 8372 $
//
/////////////////////////////////////////////////////////////////////////-->

<xsd:schema
	targetNamespace="http://www.it-innovation.soton.ac.uk/2007/grid/application"
	xmlns="http://www.it-innovation.soton.ac.uk/2007/grid/application"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="qualified">
	
	<xsd:annotation>
		<xsd:documentation xml:lang="en">
			GRIA application metadata schema
		</xsd:documentation>
	</xsd:annotation>
	
	<xsd:complexType name="ParameterType">
		<xsd:sequence>
			<xsd:element name="Default" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="Allowed" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
			<xsd:element name="Description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
		</xsd:sequence>
		<xsd:attribute name="name" type="xsd:string"/>
		<xsd:attribute name="qualifier" type="xsd:string"/>
		<xsd:attribute name="type" type="xsd:string" use="optional"/>
		<xsd:attribute name="minOccurs" type="xsd:string" use="optional"/>
		<xsd:attribute name="maxOccurs" type="xsd:string" use="optional"/>
	</xsd:complexType>
	
	<xsd:complexType name="ParametersType">
		<xsd:sequence>
			<xsd:element name="Parameter" type="ParameterType" minOccurs="1" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="DataStagersType">
		<xsd:sequence>
			<xsd:element name="DataStager" type="DataStagerType" minOccurs="1" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="DataStagerType">
		<xsd:sequence>
			<xsd:element name="Description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="MimeType" type="xsd:string" minOccurs="0" maxOccurs="1"/>
		</xsd:sequence>
		<xsd:attribute name="type" type="xsd:string" use="required"/>
		<xsd:attribute name="name" type="xsd:string" use="required"/>
		<xsd:attribute name="minOccurs" type="xsd:string" use="optional"/>
		<xsd:attribute name="maxOccurs" type="xsd:string" use="optional"/>
		<xsd:attribute name="defaultSize" type="xsd:string" use="optional"/>
	</xsd:complexType>
	
	<xsd:complexType name="ApplicationIdentificationType">
		<xsd:sequence>
			<xsd:element name="Description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="ApplicationName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="ApplicationVersion" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="Group" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="Keywords" type="xsd:string" minOccurs="0" maxOccurs="1"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="MetricsType">
		<xsd:sequence>
			<xsd:element name="Metric" type="MetricType" minOccurs="1" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="MetricType">
		<xsd:sequence>
			<xsd:element name="Description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
		</xsd:sequence>
		<xsd:attribute name="uri" type="xsd:string" use="required"/>
	</xsd:complexType>
	
	<xsd:complexType name="GriaApplicationDescriptionType">
		<xsd:sequence>
			<xsd:element name="JobServiceMinVersion" type="xsd:string" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="Application" type="ApplicationIdentificationType" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="Metrics" type="MetricsType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="Parameters" type="ParametersType" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="DataStagers" type="DataStagersType" minOccurs="1" maxOccurs="1"/>
			<xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax"/>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:element name="GriaApplicationDescription" type="GriaApplicationDescriptionType"/>
	
</xsd:schema>


