<?xml version="1.0" encoding="UTF-8"?>
<!-- INSDC Sequence Read Archive resource Sample (SRS/ERS/DRS) object XML specification -->
<!-- version:1.5.9 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <!--  <xs:include schemaLocation="http://www.ncbi.nlm.nih.gov/viewvc/v1/trunk/sra/doc/SRA_1-5/SRA.common.xsd?view=co"/>  -->

  <xs:include schemaLocation="SRA.common.xsd"/>

  <xs:complexType name="SampleType">
    <xs:annotation>
      <xs:documentation> A Sample defines an isolate of sequenceable material upon which sequencing experiments can be based. The Sample
        object may be a surrogate for taxonomy accession or an anonymized individual identifier. Or, it may fully specify provenance and
        isolation method of the starting material. </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="IDENTIFIERS" type="IdentifierType" maxOccurs="1" minOccurs="0">
        <xs:annotation>
          <xs:documentation>List of primary and alternate identifiers including those records replacing or replaced by this record.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TITLE" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation> Short text that can be used to call out sample records in search results or in displays. </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SAMPLE_NAME">
        <xs:complexType>
          <xs:all minOccurs="1">
            <xs:element name="TAXON_ID" minOccurs="1" maxOccurs="1" type="xs:int">
              <xs:annotation>
                <xs:documentation> NCBI Taxonomy Identifier. This is appropriate for individual organisms and some environmental samples.
                </xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="SCIENTIFIC_NAME" minOccurs="0" maxOccurs="1" type="xs:string">
              <xs:annotation>
                <xs:documentation> Scientific name of sample that distinguishes its taxonomy. Please use a name or synonym that is tracked
                  in the INSDC Taxonomy database. Also, this field can be used to confirm the TAXON_ID setting. </xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="COMMON_NAME" minOccurs="0" maxOccurs="1" type="xs:string">
              <xs:annotation>
                <xs:documentation> GenBank common name of the organism. Examples: human, mouse. </xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="ANONYMIZED_NAME" minOccurs="0" maxOccurs="1" type="xs:string">
              <xs:annotation>
                <xs:documentation> Anonymous public name of the sample. For example, HapMap human isolate NA12878. </xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="INDIVIDUAL_NAME" minOccurs="0" maxOccurs="1" type="xs:string">
              <xs:annotation>
                <xs:documentation> Individual name of the sample. This field can be used to identify the individual identity of a sample
                  where appropriate (this is usually NOT appropriate for human subjects). Example: "Glennie" the platypus.
                </xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:all>
        </xs:complexType>
      </xs:element>
      <xs:element name="DESCRIPTION" type="xs:string" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation> Free-form text describing the sample, its origin, and its method of isolation. </xs:documentation>
        </xs:annotation>
      </xs:element>


      <xs:element name="SAMPLE_LINKS" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation> Links to resources related to this sample or sample set (publication, datasets, online databases).
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence minOccurs="1" maxOccurs="unbounded">
            <xs:element name="SAMPLE_LINK" type="LinkType"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>

      <xs:element name="SAMPLE_ATTRIBUTES" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation> Properties and attributes of a sample. These can be entered as free-form tag-value pairs. For certain studies,
            submitters may be asked to follow a community established ontology when describing the work. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence maxOccurs="unbounded" minOccurs="1">
            <xs:element name="SAMPLE_ATTRIBUTE" type="AttributeType"/>

          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attributeGroup ref="NameGroup"/>
  </xs:complexType>

  <xs:complexType name="SampleSetType">
    <xs:sequence minOccurs="1" maxOccurs="unbounded">
      <xs:element name="SAMPLE" type="SampleType"/>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="SAMPLE_SET" type="SampleSetType">
    <xs:annotation>
      <xs:documentation> SAMPLE_SET serves as a container for a set of samples and a name space for establishing referential integrity
        between them. </xs:documentation>
    </xs:annotation>

  </xs:element>

  <xs:element name="SAMPLE" type="SampleType"/>

</xs:schema>
