<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://www.ivoa.net/xml/theory/SNAPSimulation_types/v0.1"
	xmlns="http://www.ivoa.net/xml/theory/SNAPSimulation_types/v0.1"
	xmlns:ont="http://www.ivoa.net/xml/theory/SNAPOntology/v0.1"
	xmlns:ivo="http://www.ivoa.net/xml/VOIdentifier/v1.1"
	xmlns:res="http://www.ivoa.net/xml/VOResource/v1.0">
	<xsd:annotation>
		<xsd:documentation>
			This document presents a mapping of the SNAP data model
			developed by the theory interest group. That model is a
			proposal to the DM working group for modelling a subset of
			astrophysical simulations. Those simulation


			This mapping is performed as much as possible (i.e. modulo
			mistakes, typos, out-of-synchs) according to the
			prescription for mapping UML data model to XML Schema
			presented in
			http://www.ivoa.net/internal/IVOA/VOResource010RevNotes/ModelBasedSchema.ppt
			and described in the SNAP Data model document in [LINK].

		</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>
			History of this document: 2007-09-09: First semi complete
			mapping of the data model. 2007-09-12: After upload as
			attachements to SNAP simulation data model page, updated the
			schemaImports. Note that it would be good to have a proper
			location for the IVOA Identifier schema.

		</xsd:documentation>
	</xsd:annotation>

<!--  
	<xsd:import
		namespace="http://www.ivoa.net/xml/theory/SNAPOntology/v0.1"
		schemaLocation="http://www.ivoa.net/internal/IVOA/IVOATheorySimulationDatamodel/SNAP_ontology.xsd" />
	<xsd:import namespace="http://www.ivoa.net/xml/VOIdentifier/v1.1"
		schemaLocation="http://www.ivoa.net/internal/IVOA/IVOATheorySimulationDatamodel/IVOAIdentifiers.xsd" />
	<xsd:import namespace="http://www.ivoa.net/xml/VOResource/v1.0"
		schemaLocation="http://www.ivoa.net/xml/VOResource/v1.0" />
-->

	<xsd:complexType name="SNAPProtocol" abstract="true">
		<xsd:annotation>
			<xsd:documentation>
				A protocol for running SNAP experiments.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="res:Resource">
				<xsd:annotation>
					<xsd:documentation>
						A SNAPProtocol is a Resource in the sence of the
						Resource model.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="SNAPExperiment" abstract="true">
		<xsd:annotation>
			<xsd:documentation>
				The fundamental root entity of the SNAP model. The SNAP
				model represents experiments that produce snapshots of
				the universe. This is the base type of a set of more
				specialised types such as Simulation, GroupFinder etc.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="res:Resource">
				<xsd:annotation>
					<xsd:documentation>
						A SNAPProtocol is a Resource in the sence of the
						Resource model.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:sequence>
				<xsd:element name="protocol" type="res:IdentifierURI">
  				<xsd:annotation>
						<xsd:documentation>
							The protocol according to which this
							experiment was executed.
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
					<xsd:element name="publisherDID"
						type="ivo:IVOAidentifier">
						<xsd:annotation>
							<xsd:documentation>
								Publisher-designated ID. The ID by which
								this SNAP experiment is known to its
								archive and the services applicable to
								it. Will be used to add to the baseurl
								of anyservice that is applicable to it.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="publicationURI" type="xsd:anyURI"
						minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								A URI to a publication describing this
								experiment. TBD higher maxOccurs
								necessary?
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="snapshot" type="Snapshot"
						minOccurs="0" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>
								The collection of snapshots representing
								the result of this experiment.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
<!--
					<xsd:element name="ownedBy" type="Party"
						minOccurs="1" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>
								Curation metadata indicating who owns
								this SNAP experiment.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
-->
					<xsd:element name="targetObject"
						type="TargetObjectType" minOccurs="0" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>
								Indication of the type of object that is
								being simulated in this experiment.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="representationObjectType"
						type="RepresentationObjectType" minOccurs="1"
						maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>
								The type of object that is being used as
								fundamental building block in the
								experiment for representing the
								simulated world. Examples are particles
								for N-body simulations, mesh cells for
								mesh simulations etc.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="parameter" type="InputParameter"
						minOccurs="0" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>
								Parameter definitions and values used in
								the running of this experiment.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>


	<xsd:complexType name="Snapshot">
		<xsd:annotation>
			<xsd:documentation>
				A representation of a subset of space-time. Currently
				modelled to support constant-time, space-like slices
				only.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="publisherDID"
				type="ivo:IVOAidentifier">
				<xsd:annotation>
					<xsd:documentation>
						An identifier specified by the publisher of this
						experiment. This is the identifier by which IVOA
						registered (SNAP)services will recognize this
						particular snapshot. TBD We could have this as a
						suffix to the SNAPExperiment's publisherDID.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="spatialSizePhysical" type="Quantity">
				<xsd:annotation>
					<xsd:documentation>
						The physical (i.e. not comoving for example)
						size of the snapshot. TBD Need to come up with a
						way to specify this for multi-dimensional
						volumes. Use Quantity as a place holder datatype
						for such instances.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="simulationTimestamp" type="Quantity">
				<xsd:annotation>
					<xsd:documentation>
						The simulation timestamp for this snapshot. Its
						datatype (Quantity) is a place-holder for a
						proper way of representing simulation
						timestamps.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>


	<xsd:complexType name="ObjectType" abstract="true">
		<xsd:annotation>
			<xsd:documentation>
				The base class representing objects with properties. For
				a subject such as simulations where we can not
				pre-define the objects that play a role we need a method
				for publishers to define custom objects.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						The name by which this object type is referred
						to in the containing experiment.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="description" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A plain text short description of this object
						type.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="property" type="Property" minOccurs="0"
				maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>
						Collection of properties. There must be at least
						1, other wise the objects is irrelevant.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="ID" type="xsd:ID">
			<xsd:annotation>
				<xsd:documentation>
					Identifier to be used for references to this objects
					within the document itself.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>


	<xsd:complexType name="TargetObjectType">
		<xsd:complexContent>
			<xsd:extension base="ObjectType">
				<xsd:sequence>
					<xsd:element name="label" type="ont:AstroObject" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								The label in the ontology of
								AstroObjects [TBD add link]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="astroJournalSubject"
						type="ont:AstroJournalKeyword" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								The label in the "ontology" of subject
								keywords in the major astronomical
								journals.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="multiplicity" type="xsd:integer"
						minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								Indication, not necessarily exact, how
								many objects of this object type are
								around in the simulation.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="identifiedObject"
						type="ont:IdentifiedObject" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								This element allows one to indicate that
								a specific, identified, real-world
								object is being represented by this
								SNAPExperiment. For example, if an exact
								simulation of a particular object, say
								the Magellanic-Stream was performed,
								this element allows one to say so.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="RepresentationObjectType">
		<xsd:complexContent>
			<xsd:extension base="ObjectType">
				<xsd:sequence>
					<xsd:element name="label"
						type="ont:SNAPRepresentationObject">
						<xsd:annotation>
							<xsd:documentation>
								Label indicating what kind of
								representation object this is by
								referring to a standard list
								("ontology") of possible object types.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="astroObject"
						type="ont:AstroObject" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								Some representation objects may have
								astronomical meaning (as opposed to say
								"mesh cell"). Examples are for example
								if a globular cluster is modeled with an
								n-body point particle representing a
								complete star. In this case an extra
								label can be provided indicating what
								kind of physical object is represented.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="Property">
		<xsd:annotation>
			<xsd:documentation>
				A property that an object can have.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						The name by which this property is known in the
						experiment.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="datatype" type="Datatype">
				<xsd:annotation>
					<xsd:documentation>
						The datatype of this property in the experiment.
						As the latter is software based, the datatype is
						a software datatype. Distinctions are therefore
						drawn between (real*4/4byte) floats and
						(real*8/8 byte) doubles etc.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="cardinality" type="Cardinality">
				<xsd:annotation>
					<xsd:documentation>
						The cardinality of this property in the
						experiment.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="ucd" type="ont:UCD" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						A labvel assigned to this property to provide
						its meaning in the IVOA standard UCD system.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="description" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A short description of this property.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="ID" type="xsd:ID"></xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="InputParameter">
		<xsd:annotation>
			<xsd:documentation>A parameter</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="name" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						The name by which this parameter is used in the
						experiment.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="datatype" type="Datatype">
				<xsd:annotation>
					<xsd:documentation>
						The datatype of this parameter. As this is a
						software experiment, the datatypes are software
						datatypes.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="cardinality" type="Cardinality"
				default="1">
				<xsd:annotation>
					<xsd:documentation>
						The cardinality of this parameter.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="label" type="ont:OntologyObject">
				<xsd:annotation>
					<xsd:documentation></xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="value" type="Value">
				<xsd:annotation>
					<xsd:documentation>
						The value given to this parameter. TBD Could
						specify its datatype as anyType, but prefer we
						handle it ourself.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="description" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A short description of this parameter.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="ID" type="xsd:ID"></xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="ObjectCollection">
		<xsd:annotation>
			<xsd:documentation>
				Represents a collection of fundamental data objects
				representing the world. Though the data themselves are
				not represented in the meta-data model, this type holds
				on to metadata about the collections.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="numberOfObjects" type="xsd:int">
				<xsd:annotation>
					<xsd:documentation>
						The number of objects in this collection.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="characterisation" type="Characterisation"
				minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>
						Collection of objects characterising the objects
						in this collection by giving summaries of the
						various properties of the objects in the
						collection.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
			<xsd:attribute name="objectType" type="xsd:IDREF">
				<xsd:annotation>
					<xsd:documentation>
						The reference to the object type of the objects
						stored in this collection. As this object type
						will be defined in the same document an IDREF to
						its ID can be used.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="Characterisation">
		<xsd:annotation>
			<xsd:documentation>
				Represents means of characterising collections of
				objects, more in particular a particular property of the
				objects in the collection. This can be done both by
				specifying possible values this property can take (a
				priori characterisation) and by characterising the
				values actually taken up by the properties in the
				collection (a posteriori characterisation). [TBD This is
				applicable to numerical properties (having Quantity-s as
				value) only.]
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="lowerBound" type="Quantity"
				minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						The lowest value the characterised property can
						possibly take in the containing collection. This
						is an "a priori" characterisation.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="upperBound" type="Quantity"
				minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						The highest value the characterised property can
						possibly take in the containing collection. This
						is an "a priori" characterisation.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="nominalValue" type="Quantity"
				minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						The typical value the characterised property
						takes in the containing collection. Can be
						thought of as the location element in the
						Characterisaiton data model. This is an "a
						priori" characterisation.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="min" type="Quantity" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						The lowest value of the characterised property
						actually taken by an object in the containing
						collection. This is an "a posteriori"
						characterisation.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="max" type="Quantity" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						The largest value of the characterised property
						actually taken by an object in the containing
						collection. This is an "a posteriori"
						characterisation.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="mean" type="Quantity" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						The mean value of the characterised property
						over the containing collection. This is an "a
						posteriori" characterisation.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="standardDeviation" type="Quantity"
				minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						The standard deviation of the characterised
						property over the containing collection. This is
						an "a posteriori" characterisation.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
			<xsd:attribute name="property" type="xsd:IDREF">
				<xsd:annotation>
					<xsd:documentation>
						Reference to the actual property that is being
						characterised by this object. Reference is to
						the ID attribute of the Propertry type. We can
						use an ID/IDREF implementation as the referenced
						element will have to be in the same document as
						the referring element, for they both belong to
						the same root element, which is a
						SNAPExperiment. 
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
	</xsd:complexType>


	<xsd:complexType name="SNAPWebservice">
		<xsd:annotation>
			<xsd:documentation>
				A webservice that can be used to do something with the
				results of this SNAP experiment. Examples of this are
				some standard services like cut-out, projection etc. An
				API can be defined for all of these that can be derived
				from the base service which accepts the publisherDID-s
				for the SNAPExperiment and a Snapshot.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="baseURL" type="xsd:anyURI">
				<xsd:annotation>
					<xsd:documentation>
						The base URL from which the complete HTTP GET
						can be built for standard SNAP services, or
						which leads to a web page from which the web
						application can be started for custom services.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="documentationURL" type="xsd:anyURI">
				<xsd:annotation>
					<xsd:documentation>
						The base URL where one can reach information
						about the web service.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="description" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A short description of the service.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="type" type="SNAPServiceType">
				<xsd:annotation>
					<xsd:documentation>
						Label indicating whether this is a standard type
						SNAP service, or a custom one.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
	<!--                      SNAP experiments                           -->
	<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
	<xsd:complexType name="SNAPSimulator">
		<xsd:annotation>
			<xsd:documentation>
				A simulator protocol producing snapshots of the
				universe.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="SNAPProtocol">
				<xsd:sequence>
					<xsd:element name="code" type="xsd:anyURI"
						minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								URL where the source code can be
								retrieved.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="version" type="xsd:string">
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="SNAPSimulation">
		<xsd:annotation>
			<xsd:documentation>
				Represents an original SNAP simulation. Corresponds to
				the "Level-0" data products. Important for its
				description are the physcial processes that are being
				modeled and the numerical algorithms
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="SNAPExperiment">
				<xsd:sequence>
					<xsd:element name="physics" type="Physics"
						minOccurs="0" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>
								The physical processes used in this
								simulation.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="numericalAlgorithm"
						type="NumericalAlgorithm" minOccurs="0" maxOccurs="unbounded">
						<xsd:annotation>
							<xsd:documentation>
								The numerical algorithms(s) used to
								represent the physical processes in the
								simulation.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="Physics">
		<xsd:annotation>
			<xsd:documentation>
				Represents meta-data regarding physical processes used
				in simulators.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="label" type="ont:PhysicalProcess">
				<xsd:annotation>
					<xsd:documentation>
						The label identifying this process in terms of
						the IVOA ontology of physical processes
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="astroJournalKeyword"
				type="ont:AstroJournalKeyword">
				<xsd:annotation>
					<xsd:documentation>
						The label identifying this process by the entry
						in the list of the subject keywords of the major
						astronomicl journals.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="algorithm" type="NumericalAlgorithm"
				minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>
						The algorithm(s possibly more than 1) used to
						model this physical process. TBD DM question:
						should this be here, or directly hanging off the
						Simulation object itself ?
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="NumericalAlgorithm">
		<xsd:annotation>
			<xsd:documentation>
				Represents a numerical algorithm for modelling physical
				processes in a simulation.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="label" type="ont:OntologyObject">
				<xsd:annotation>
					<xsd:documentation>

					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>


	<xsd:complexType name="Party">
		<xsd:annotation>
			<xsd:documentation>
				Represents a party that can play a role in the context
				of this model. A party can be a person or an
				organisation.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>

		</xsd:sequence>
	</xsd:complexType>

	<!--  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
	<!--                            value types                               -->
	<!--  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

	<xsd:complexType name="Value" abstract="true">
		<xsd:annotation>
			<xsd:documentation>
				Represents a value-type. properties and parameters have
				such values.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:complexType>

	<xsd:complexType name="Quantity">
		<xsd:annotation>
			<xsd:documentation>
				Represents a numerical value type.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="Value">
				<xsd:sequence>
					<xsd:element name="value" type="xsd:double">
						<xsd:annotation>
							<xsd:documentation>
								The value of the quantity.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="unit" type="xsd:string"
						minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>
								The unit (if applicable) of this
								quantity.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:simpleType name="Datatype">
		<xsd:annotation>
			<xsd:documentation>
				List of primitive datatypes that a parameter can have.
				These are software datatypes (i.e. float and double iso
				only real).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="boolean" />
			<xsd:enumeration value="complex" />
			<xsd:enumeration value="datetime" />
			<xsd:enumeration value="double" />
			<xsd:enumeration value="float" />
			<xsd:enumeration value="int" />
			<xsd:enumeration value="long" />
			<xsd:enumeration value="rational" />
			<xsd:enumeration value="short" />
			<xsd:enumeration value="string" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="Cardinality">
		<xsd:annotation>
			<xsd:documentation>
				List of valid values for indicating the cardinality of a
				property. Values have usual meaning.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="0..1" />
			<xsd:enumeration value="1" />
			<xsd:enumeration value="0..*" />
			<xsd:enumeration value="1..*" />
		</xsd:restriction>
	</xsd:simpleType>


	<xsd:simpleType name="SNAPServiceType">
		<xsd:annotation>
			<xsd:documentation>
				Defines a number of standard services that can deal with
				SNAP results.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="download">
				<xsd:annotation>
					<xsd:documentation>
						A simple download service. To be defined what
						parameters belong to this.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="cutout">
				<xsd:annotation>
					<xsd:documentation>
						A service thta produces a spatial cut-out of a
						snapshot. This can be of a nbumber of shapes:
						sphere, box, maybe more general. To be defined
						what parameters belong to this.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="gridding">
				<xsd:annotation>
					<xsd:documentation>
						Create a mesh-like representation of an existing
						snapshot. The latter may consist of particles,
						but the service can also do a regridding of an
						existing mesh. To be defined what parameters
						belong to this.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="clusterfinder">
				<xsd:annotation>
					<xsd:documentation>
						Identify clusters in a snapshot. Can be done
						both for mesh-like and for n-body simulations.
						To be defined what parameters belong to this.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="visualisation">
				<xsd:annotation>
					<xsd:documentation>
						A service to create a visualisation, i.e. 2D
						image of a snapshot. To be defined what
						parameters belong to this.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="custom">
				<xsd:annotation>
					<xsd:documentation>
						A custom service.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>


</xsd:schema>
