<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://www.ivoa.net/xml/SNAP/v0.1/simdb"
            xmlns:base="http://www.ivoa.net/xml/dm/base/v0.1"
            xmlns:p1="http://www.ivoa.net/xml/SNAP/v0.1/IVOAValueTypes"
            targetNamespace="http://www.ivoa.net/xml/SNAP/v0.1/simdb">
   <xsd:annotation>
      <xsd:documentation>Generated from UML-&gt;XMI-&gt;intermediate-&gt;XSD.</xsd:documentation>
   </xsd:annotation>
   <xsd:import namespace="http://www.ivoa.net/xml/SNAP/v0.1/IVOAValueTypes"
               schemaLocation="http://volute.googlecode.com/svn/trunk/projects/theory/snapdm/xsd/IVOAValueTypes.xsd"/>
   <xsd:import namespace="http://www.ivoa.net/xml/dm/base/v0.1"
               schemaLocation="http://volute.googlecode.com/svn/trunk/projects/theory/snapdm/xsd/base.xsd"/>
   <xsd:complexType name="Resource" abstract="true">
      <xsd:annotation>
         <xsd:documentation>This is a thin copy of the Registry Resource model's Resource that borrowes some of its elements. 
It *is not* a Registry Resource though.
In particular we want to refine the content model here.
Using a restriction of the res:Resource leads to problems, as we'd like to extend the Resource at the same time.
Hence we create a new type.</xsd:documentation>
         <xsd:appinfo>xmiid=_12_1_1_8e0028f_1178789094562_459260_296</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexContent>
         <xsd:extension base="base:MetadataObject">
            <xsd:sequence>
               <xsd:element name="name" type="xsd:string"/>
               <xsd:element name="description" type="xsd:string"/>
               <xsd:element name="referenceURL" type="xsd:string" minOccurs="0"/>
               <xsd:element name="created" type="xsd:dateTime"/>
               <xsd:element name="updated" type="xsd:dateTime" minOccurs="0"/>
               <xsd:element name="status" type="xsd:string"/>
               <xsd:element name="contact" type="Contact" maxOccurs="unbounded"/>
            </xsd:sequence>
         </xsd:extension>
      </xsd:complexContent>
   </xsd:complexType>

   <xsd:complexType name="Contact">
      <xsd:annotation>
         <xsd:documentation>Information that can be used for contacting someone
</xsd:documentation>
         <xsd:appinfo>xmiid=_12_1_bd102fc_1206601369187_165113_153</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexContent>
         <xsd:extension base="base:MetadataObject">
            <xsd:sequence>
               <xsd:element name="name" type="xsd:string"/>
               <xsd:element name="address" type="xsd:string" minOccurs="0"/>
               <xsd:element name="email" type="xsd:string" minOccurs="0"/>
               <xsd:element name="telephone" type="xsd:string" minOccurs="0"/>
               <xsd:element name="role" type="ContactRole"/>
            </xsd:sequence>
         </xsd:extension>
      </xsd:complexContent>
   </xsd:complexType>

   <xsd:complexType name="Project">
      <xsd:annotation>
         <xsd:documentation>A collection of SimDB experiments that have been executed together and are registered in an IVOA registry as a single Resource.</xsd:documentation>
         <xsd:appinfo>xmiid=_12_1_2_8e0028f_1191338785390_934381_291</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexContent>
         <xsd:extension base="Resource">
            <xsd:sequence>
               <xsd:element name="experiment" type="ProjectResource" maxOccurs="unbounded"/>
            </xsd:sequence>
         </xsd:extension>
      </xsd:complexContent>
   </xsd:complexType>

   <xsd:complexType name="ProjectResource">
      <xsd:annotation>
         <xsd:documentation>Associative class between a Project and its constitutent SimDB/Resource-s.</xsd:documentation>
         <xsd:appinfo>xmiid=_14_0_8e0028f_1202820710484_502833_2761</xsd:appinfo>
      </xsd:annotation>
      <xsd:complexContent>
         <xsd:extension base="base:MetadataObject">
            <xsd:sequence>
               <xsd:element name="resource" type="base:Reference">
                  <xsd:annotation>
                     <xsd:appinfo>xmiidref=_12_1_1_8e0028f_1178789094562_459260_296</xsd:appinfo>
                  </xsd:annotation>
               </xsd:element>
            </xsd:sequence>
         </xsd:extension>
      </xsd:complexContent>
   </xsd:complexType>

   <xsd:complexType name="Quantity">
      <xsd:annotation>
         <xsd:documentation>A structured data type, indicating a numerical value and corresponding unit. The latter will require some standard dictionary for a uniform usage. This is here not modelled</xsd:documentation>
         <xsd:appinfo>xmiid=_12_1_8e0028f_1173262283140_574350_1278</xsd:appinfo>
      </xsd:annotation>
      <xsd:sequence>
         <xsd:element name="value" type="xsd:double"/>
         <xsd:element name="unit" type="xsd:string" minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="Pos3D">
      <xsd:annotation>
         <xsd:documentation>Represents a Cartesian position in 3 dimensional space.
This is a type to test generation more than anything, as it is currently not used in the model. </xsd:documentation>
         <xsd:appinfo>xmiid=_12_1_8e0028f_1208350068937_666331_227</xsd:appinfo>
      </xsd:annotation>
      <xsd:sequence>
         <xsd:element name="x" type="Quantity"/>
         <xsd:element name="y" type="Quantity"/>
         <xsd:element name="z" type="Quantity"/>
      </xsd:sequence>
   </xsd:complexType>

   <xsd:simpleType name="DataType">
      <xsd:annotation>
         <xsd:documentation>The values of this type are to be used in the definition of metadata fields such as Property and InputParameter. These data types correspond to actual types used in computation and data representation and are slightly different from the more abstract types in the domain model in [2].
They are clearly related to similar concepts as in the DataType defined in the XML schema for VOTable.

</xsd:documentation>
         <xsd:appinfo>xmiid=_12_1_8e0028f_1173260658937_376469_768</xsd:appinfo>
      </xsd:annotation>
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="boolean">
            <xsd:annotation>
               <xsd:documentation>A standard boolean type, with values 'true' and 'false', possibly represented differently in physical representations of the model.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="complex">
            <xsd:annotation>
               <xsd:documentation>A standard complex type. Here no limits on accuracy of constituent Re and Im parts.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="datetime">
            <xsd:annotation>
               <xsd:documentation>Represents an exact time on an exact, given date.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="double">
            <xsd:annotation>
               <xsd:documentation>A real*8 floating point datatype.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="float">
            <xsd:annotation>
               <xsd:documentation>A real*4 floating point datatype.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="int">
            <xsd:annotation>
               <xsd:documentation>An integer*4 integer datatype.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="long">
            <xsd:annotation>
               <xsd:documentation>An integer*8 integer datatype.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="rational">
            <xsd:annotation>
               <xsd:documentation>A rational datatype, consisting of two integers representing the numerator and denominator.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="short">
            <xsd:annotation>
               <xsd:documentation>an integer*2 integer datatype.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="string">
            <xsd:annotation>
               <xsd:documentation>A standard string dattaype consisting of any type of character.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
      </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="Cardinality">
      <xsd:annotation>
         <xsd:documentation>Possible values for cardinality attribute of a Property or a Parameter</xsd:documentation>
         <xsd:appinfo>xmiid=_12_1_2_8e0028f_1189430872609_809189_324</xsd:appinfo>
      </xsd:annotation>
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="0..1">
            <xsd:annotation>
               <xsd:documentation>Corresponds to 'Optional element'</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="1">
            <xsd:annotation>
               <xsd:documentation>Corresponds to 'Mandatory element'</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="0..*">
            <xsd:annotation>
               <xsd:documentation>Corresponds to 'Multiple but maybe Optional element'</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="1..*">
            <xsd:annotation>
               <xsd:documentation>Corresponds to 'Multiple with at least one element'</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
      </xsd:restriction>
   </xsd:simpleType>

   <xsd:simpleType name="ContactRole">
      <xsd:annotation>
         <xsd:documentation>Contains different roles a party can play in a resource.</xsd:documentation>
         <xsd:appinfo>xmiid=_12_1_8e0028f_1210681081343_459631_731</xsd:appinfo>
      </xsd:annotation>
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="owner">
            <xsd:annotation>
               <xsd:documentation>Represents an owner of a resource.</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="creator">
            <xsd:annotation>
               <xsd:documentation>Created the resource</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="publisher">
            <xsd:annotation>
               <xsd:documentation>Represents a publisher of a resource</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
         <xsd:enumeration value="contributor">
            <xsd:annotation>
               <xsd:documentation>A general contributor to the creation of the resource</xsd:documentation>
            </xsd:annotation>
         </xsd:enumeration>
      </xsd:restriction>
   </xsd:simpleType>

</xsd:schema>