<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $Id: AGParameterDefinition.xsd,v 1.14.48.5 2005/05/12 12:41:51 pah Exp $ -->
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Paul Harrison (Jodrell Bank Observatory) -->
<xs:schema targetNamespace="http://www.ivoa.net/xml/CEA/parameters/v0.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ceapd="http://www.ivoa.net/xml/CEA/parameters/v0.2" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:annotation>
		<xs:documentation>this file captures some of the ideas used in the WSDL-like parameter definition files, but as yet is not used for validation</xs:documentation>
	</xs:annotation>
	<xs:annotation>
		<xs:documentation>the baseparameter definition is mimiced by the contents of a part element in the wsdl</xs:documentation>
	</xs:annotation>
	<xs:annotation>
		<xs:documentation>important types are defined here that would have special significance....</xs:documentation>
	</xs:annotation>
	<!-- This is the standard type -->
	<xs:simpleType name="parameterTypes">
		<xs:annotation>
			<xs:documentation>The list of possible parameter types that are passed in CEA messages. Note that the formal schema type of the message is always a string - The types below are to indicate how that string should be interpreted.</xs:documentation>
			<xs:documentation>Note that some of the "bulkier" types - e.g. VOTable would normally be passed "by reference"</xs:documentation>
			<xs:documentation>The enumeration values should have the namespace appended? I have removed them to make castor generate nicer objects</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="integer">
				<xs:annotation>
					<xs:documentation>Integer</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="float">
				<xs:annotation>
					<xs:documentation>Real</xs:documentation>
					<xs:documentation>The string formats that can be recognised should be as defined by FORTRAN? Java? C? (all?)</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="complex">
				<xs:annotation>
					<xs:documentation>A complex number</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="text">
				<xs:annotation>
					<xs:documentation>Any string of characters</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="boolean">
				<xs:annotation>
					<xs:documentation>A representation of a boolean - e.g. true/false on/off</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="anyURI">
				<xs:annotation>
					<xs:documentation>Any Uniform Resource Indicator</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="VOTable"/>
			<xs:enumeration value="RA">
				<xs:annotation>
					<xs:documentation>A value that is to be interpreted as a Right Ascension</xs:documentation>
					<xs:documentation>This should probably be deprecated in favour of the STC-S</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Dec">
				<xs:annotation>
					<xs:documentation>A value that is to be interpreted as a Declination</xs:documentation>
					<xs:documentation>This should probably be deprecated in favour of the STC-S</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="ADQL">
				<xs:annotation>
					<xs:documentation>the full XML version of the Astronomical Data Query Language</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="ADQL-S">
				<xs:annotation>
					<xs:documentation>The string representation of Astronomical Data Query Language</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="STC-S">
				<xs:annotation>
					<xs:documentation>A value that is specified using the Space Time Coordinate string definition</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="binary">
				<xs:annotation>
					<xs:documentation>A general piece of binary data with no special interpretation</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="FITS">
				<xs:annotation>
					<xs:documentation>Data encoded in the Flexible Image Transport System http://fits.gsfc.nasa.gov/iaufwg/iaufwg.html</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="xhtmlDocumentation" mixed="false">
		<xs:annotation>
			<xs:documentation>should really reference the XHTML shema, but just did this for convienience</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="xs:string"/>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="tDocumentation" mixed="true">
		<xs:annotation>
			<xs:documentation>what documentation can be</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="java-param">
		<xs:restriction base="xs:token">
			<xs:pattern value="[a-zA-Z][a-zA-Z0-9]*"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="java-class">
		<xs:restriction base="xs:token">
			<xs:pattern value="([a-zA-Z0-9]+\.)*[a-zA-Z][a-zA-Z0-9]*"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="java-package">
		<xs:restriction base="xs:token">
			<xs:pattern value="([a-zA-Z0-9]+\.)*[a-zA-Z0-9]*"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="BaseParameterDefinition">
		<xs:annotation>
			<xs:documentation> The basic definition of what a parameter is - this is common to all of the CEA implementations.</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="UI_Name" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>The name that is to be used to display this parameter in te UI</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="UI_Description" type="ceapd:xhtmlDocumentation" minOccurs="0">
				<xs:annotation>
					<xs:documentation>A long description of the parameter that might be displayed in the UI to help the user</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="UCD" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>If the parameter has a UCD then use the reference here - it could help in workflow typing...</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="DefaultValue" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>a possible default for this type of parameter - should probably be xs:any, but castor/axis do not deal with this well</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Units" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>This would ideally be an enumeration of all the possible types of units?</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="OptionList" minOccurs="0">
				<xs:annotation>
					<xs:documentation>For parameters that can only have one of a list of values</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="OptionVal" type="xs:string" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>A particulat value in an option liest</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:all>
		<xs:attribute name="name" type="xs:string" use="required"/>
		<xs:attribute name="type" type="ceapd:parameterTypes" use="required"/>
		<xs:attribute name="accept-encodings" type="xs:string" use="optional" default="standard"/>
		<xs:attribute name="sub-type" type="xs:string" use="optional" default="none"/>
		<!-- these are not really used at the moment -->
		<!-- changed from xs:NMTOKENS for castor generation bug -->
	</xs:complexType>
	<!--The parameter value possibly needs to be more strongly typed than it is at the moment...or use the Quantity from the DM working group when available..-->
	<xs:complexType name="parameterValue" mixed="false">
		<xs:annotation>
			<xs:documentation>Defines what a parameter can contain when it is passed to be exevuted - this is in fact just a single value element at the moment, which is of string type</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="value" type="xs:string"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="required"/>
		<xs:attribute name="encoding" type="xs:NMTOKEN" use="optional">
			<xs:annotation>
				<xs:documentation>This is unused in implementations at the moment - give the opportunity to specify some form of encoding for parameter values .</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="indirect" type="xs:boolean" use="optional" default="false">
			<xs:annotation>
				<xs:documentation>This specifies whether the parameter value is indirect - i.e. if value of the parameter is some form of URI to the actual parameter value. If the value is indirect then the CEA implementation is expected to fetch the parameter before passing it on to the application.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:element name="tool">
		<xs:annotation>
			<xs:documentation>represents a call to a CEA application </xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="input" minOccurs="0">
					<xs:annotation>
						<xs:documentation>the list of parameters supplied as input</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="parameter" type="ceapd:parameterValue" minOccurs="0" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="output" minOccurs="0">
					<xs:annotation>
						<xs:documentation>the list of parameters expected as output</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="parameter" type="ceapd:parameterValue" minOccurs="0" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation>ivoa resource identifier of the application to call</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="interface" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation>which interface of the application to call</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
</xs:schema>
