<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://phospho.elm.eu.org/Instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://phospho.elm.eu.org/Instance" elementFormDefault="qualified">
	<xs:annotation>
		<xs:documentation>Instance type schema for the phospho.ELM resource.</xs:documentation>
	</xs:annotation>
	<xs:element name="Instance" type="InstanceType"/>
	<xs:complexType name="InstanceType">
		<xs:annotation>
			<xs:documentation>Instance is the modified amino acid(S,T,Y) at a specified position in a given protein sequence that is annotated to be phosphorylated in Phospho.ELM</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Position" type="xs:integer">
				<xs:annotation>
					<xs:documentation>The position of phosphorylation in this Instance.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Residue" type="xs:string">
				<xs:annotation>
					<xs:documentation>Indicates the residue at the position of phosphorylation.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Sequence" type="xs:string">
				<xs:annotation>
					<xs:documentation>The sequence in which the instance is annotated.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Species" type="xs:string">
				<xs:annotation>
					<xs:documentation>The organism to which the protein sequence belongs.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="SequenceReference" type="DBReferenceType" nillable="false" minOccurs="1" maxOccurs="2">
				<xs:annotation>
					<xs:documentation>A reference to a item in a external sequence/protein database that annotates this sequence.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="UniPROTIsPrimaryAcc" type="xs:boolean">
				<xs:annotation>
					<xs:documentation>Boolean indicating whether the UniPROT accession is the primary accession value or not.
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Substrate" type="xs:string" nillable="false">
				<xs:annotation>
					<xs:documentation>The Substrate that is a generic representation of the protein sequence where the instance has been annotated.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Note" type="xs:string" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Additional information on this instance.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="DomainReference" type="DomainReferenceType" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Link to a domain in which the instance has been detected.</xs:documentation>
				</xs:annotation>
			</xs:element>		
			<xs:element name="ReliabilityId" type="ReliabilityIdType" nillable="true" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>A reliability value between 1 and 3 specifiying the trustworthiness attached to the instance.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Kinase" type="KinaseType" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Kinase that phosphorylate this instance.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="BindingDomain" type="BindingDomainType" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Binding domain which the phospho. ligand binds to.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ELMAccession" type="xs:string" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>primary key which enables one to link to the external ELM database which provides additional information.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="OtherAccession" type="DBReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>A secondary accession number.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="PdbId" type="xs:string" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Link to a structure in which the instance has been detected.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="EvidenceReference" type="EvidenceReferenceType" nillable="true" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The evidence that supports this phospho.ELM instance.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="Accession" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Instance primary key.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="EntryDate" type="xs:date" use="required">
			<xs:annotation>
				<xs:documentation>Date when this instance was entered into the phospho.ELM database.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:element name="SubstrateAccession" type="xs:string">
		<xs:annotation>
			<xs:documentation>Primary key for retrieval of a Substrate from the phospho.ELM database.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="InstanceAccession" type="xs:string">
		<xs:annotation>
			<xs:documentation>Primary key for retrieval of an Instance from the phospho.ELM database.</xs:documentation>
		</xs:annotation>
	</xs:element>
	
	<xs:element name="EvidenceReference" type="EvidenceReferenceType"/>
	<xs:complexType name="EvidenceReferenceType">
		<xs:annotation>
			<xs:documentation>The evidence that supports this phospho.ELM instance.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="LiteratureReference" type="DBReferenceType">
				<xs:annotation>
					<xs:documentation>PubMed ID to article where this phospho.ELM Instance is described.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Method" type="xs:string">
				<xs:annotation>
					<xs:documentation>The type of experimental method used to detect this evidence of the instance.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Source" type="xs:string">
				<xs:annotation>
					<xs:documentation>Additional indication of the reliability of the evidence for the instance.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CellLine" type="xs:string" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Indicates where the experiment has been carried out.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="MIId" type="xs:string" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Provides reference to methods ontology database(HUPO).</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	
   <xs:element name="Kinase" type="KinaseType"/>
   <xs:simpleType name="KinaseType" >
        <xs:restriction  base="xs:string"/>   
    </xs:simpleType>
    
    <xs:element name="BindingDomain" type="BindingDomainType"/>
	<xs:simpleType name="BindingDomainType" >
        <xs:restriction  base="xs:string"/>
    </xs:simpleType>
    
	<xs:element name="ReliabilityId" type="ReliabilityIdType"/>
	<xs:simpleType name="ReliabilityIdType">
	   <xs:annotation>
	      <xs:documentation>A list of predefined values for the ReliabilityIdType.</xs:documentation>
	   </xs:annotation>
	   <xs:restriction base="xs:string">
	      <xs:enumeration value="1"/>
	      <xs:enumeration value="2"/>
	      <xs:enumeration value="3"/>
	   </xs:restriction>
	</xs:simpleType>
	
	<xs:element name="Database" type="DatabaseType"/>
	<xs:simpleType name="DatabaseType">
	   <xs:annotation>
	      <xs:documentation>A list of predefined values for the DatabaseType.</xs:documentation>
	   </xs:annotation>
	   <xs:restriction base="xs:string">
	      <xs:enumeration value="PubMed"/>
	      <xs:enumeration value="UniPROT"/>
	      <xs:enumeration value="Ensembl"/>
	      <xs:enumeration value="Smart"/>
	      <xs:enumeration value="Pfam"/>
	      <xs:enumeration value="MINT"/>
	   </xs:restriction>
	</xs:simpleType>
	
	<xs:element name="DBReference" type="DBReferenceType"/>
	<xs:complexType name="DBReferenceType">
		<xs:annotation>
			<xs:documentation>A reference to a item in a external database.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Database" type="DatabaseType">
				<xs:annotation>
					<xs:documentation>The name of the external database.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Accession" type="xs:string">
				<xs:annotation>
					<xs:documentation>The accession key of the item.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	
	<xs:element name="DomainReference" type="DomainReferenceType"/>
	<xs:complexType name="DomainReferenceType">
		<xs:annotation>
			<xs:documentation>A reference to a domain in an external database.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Database" type="DatabaseType">
				<xs:annotation>
					<xs:documentation>The name of the external database.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Domain" type="xs:string">
				<xs:annotation>
					<xs:documentation>The domain name in the external database.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	
</xs:schema>

