refactored schema (SequenceSet to DataSet and SequenceSetAnnotation to DataSetAnnotat...
[vamsas.git] / schemas / vamsas.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by MSD (EMBL OUTSTATION THE EBI WELLCOME TRUST GENOME CAMPUS) -->
3 <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by lj (jl) -->
4 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="http://www.vamsas.org" targetNamespace="http://www.vamsas.org" elementFormDefault="qualified" attributeFormDefault="unqualified">
5         <xs:element name="VAMSAS">
6                 <xs:complexType>
7                         <xs:sequence>
8                                 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
9                                 <xs:element ref="vamsas:DataSet" minOccurs="0" maxOccurs="unbounded"/>
10                         </xs:sequence>
11                         <xs:attribute name="id" type="xs:ID" use="optional"/>
12                 </xs:complexType>
13         </xs:element>
14         <xs:element name="Tree">
15                 <xs:complexType>
16                         <xs:sequence>
17                                 <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
18                                 <xs:element name="newick" minOccurs="1" maxOccurs="unbounded">
19                                         <xs:complexType>
20                                                 <xs:simpleContent>
21                                                         <xs:extension base="xs:string">
22                                                                 <xs:attribute name="title" type="xs:string" use="optional"/>
23                                                                 <xs:attribute name="id" type="xs:ID" use="optional"/>
24                                                         </xs:extension>
25                                                 </xs:simpleContent>
26                                         </xs:complexType>
27                                 </xs:element>
28                                 <xs:element ref="vamsas:Provenance" minOccurs="1" maxOccurs="1"/>
29                         </xs:sequence>
30                         <xs:attribute name="id" type="xs:ID" use="optional"/>
31                 </xs:complexType>
32         </xs:element>
33         <xs:element name="Provenance">
34                 <xs:complexType>
35                         <xs:sequence>
36                                 <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
37                                         <xs:complexType>
38                                                 <xs:sequence>
39                                                         <xs:element name="User" type="xs:string"/>
40                                                         <xs:element name="Action" type="xs:string"/>
41                                                         <xs:element name="Date" type="xs:date"/>
42                                                 </xs:sequence>
43                                                 <xs:attribute name="id" type="xs:ID" use="optional"/>
44                                         </xs:complexType>
45                                 </xs:element>
46                         </xs:sequence>
47                 </xs:complexType>
48         </xs:element>
49         <xs:element name="DataSet">
50                 <xs:complexType>
51                         <xs:sequence>
52                                 <xs:element name="Sequence" maxOccurs="unbounded">
53                                         <xs:complexType>
54                                                 <xs:complexContent>
55                                                         <xs:extension base="vamsas:SequenceType">
56                                                                 <xs:sequence>
57                                                                         <xs:element name="dbRef" minOccurs="0" maxOccurs="unbounded">
58                                                                                 <xs:complexType>
59                                                                                         <xs:attribute name="source"/>
60                                                                                         <xs:attribute name="version"/>
61                                                                                         <xs:attribute name="accessionId"/>
62                                                                                         <xs:attribute name="id" type="xs:ID" use="optional"/>
63                                                                                 </xs:complexType>
64                                                                         </xs:element>
65                                                                 </xs:sequence>
66                                                                 <xs:attribute name="id" type="xs:ID" use="required"/>
67                                                                 <xs:attribute name="dictionary" type="xs:string"/>
68                                                         </xs:extension>
69                                                 </xs:complexContent>
70                                         </xs:complexType>
71                                 </xs:element>
72                                 <xs:element name="DataSetAnnotations" minOccurs="0" maxOccurs="unbounded">
73                                         <xs:complexType>
74                                                 <xs:sequence>
75                                                         <xs:element name="description" type="xs:string" minOccurs="0"/>
76                                                         <xs:element name="status" type="xs:string" minOccurs="0"/>
77                                                         <xs:element ref="vamsas:annotationElement" minOccurs="0" maxOccurs="unbounded"/>
78                                                         <xs:element ref="vamsas:Provenance" minOccurs="0" maxOccurs="unbounded"/>
79                                                 </xs:sequence>
80                                                 <xs:attribute name="type" type="xs:string" use="required"/>
81                                                 <xs:attribute name="end" type="xs:string" use="required"/>
82                                                 <xs:attribute name="begin" type="xs:string" use="required"/>
83                                                 <xs:attribute name="seqRef" type="xs:IDREF" use="required"/>
84                                                 <xs:attribute name="id" type="xs:ID" use="optional"/>
85                                         </xs:complexType>
86                                 </xs:element>
87                                 <xs:element name="Alignment" minOccurs="0" maxOccurs="unbounded">
88                                         <xs:complexType>
89                                                 <xs:sequence>
90                                                         <xs:element name="AlignmentAnnotations" minOccurs="0">
91                                                                 <xs:complexType>
92                                                                         <xs:sequence>
93                                                                                 <xs:element ref="vamsas:annotationElement" maxOccurs="unbounded"/>
94                                                                                 <xs:element name="label" type="xs:string"/>
95                                                                                 <xs:element name="description" type="xs:string"/>
96                                                                                 <xs:element ref="vamsas:Provenance"/>
97                                                                         </xs:sequence>
98                                                                         <xs:attribute name="graph" type="xs:boolean" use="required"/>
99                                                                         <xs:attribute name="id" type="xs:ID" use="optional"/>
100                                                                 </xs:complexType>
101                                                         </xs:element>
102                                                         <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
103                                                         <xs:element name="alignmentSequence" minOccurs="2" maxOccurs="unbounded">
104                                                                 <xs:complexType>
105                                                                         <xs:complexContent>
106                                                                                 <xs:extension base="vamsas:SequenceType">
107                                                                                         <xs:attribute name="id" type="xs:ID" use="optional"/>
108                                                                                         <xs:attribute name="refid" type="xs:IDREF" use="required"/>
109                                                                                 </xs:extension>
110                                                                         </xs:complexContent>
111                                                                 </xs:complexType>
112                                                         </xs:element>
113                                                         <xs:element ref="vamsas:Provenance"/>
114                                                 </xs:sequence>
115                                                 <xs:attribute name="gapChar" type="xs:string" use="required"/>
116                                                 <xs:attribute name="aligned" type="xs:boolean" use="optional"/>
117                                                 <xs:attribute name="id" type="xs:ID" use="optional"/>
118                                         </xs:complexType>
119                                 </xs:element>
120                                 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
121                                 <xs:element ref="vamsas:Provenance" minOccurs="1" maxOccurs="unbounded"/>
122                         </xs:sequence>
123                         <xs:attribute name="id" type="xs:ID" use="optional"/>
124                 </xs:complexType>
125         </xs:element>
126         <xs:element name="annotationElement">
127                 <xs:complexType>
128                         <xs:sequence>
129                                 <xs:element name="displayCharacter" type="xs:string" maxOccurs="1" minOccurs="0"/>
130                                 <xs:element name="description" type="xs:string" maxOccurs="1" minOccurs="0"/>
131                                 <xs:element name="secondaryStructure" maxOccurs="1" minOccurs="0">
132                                         <xs:simpleType>
133                                                 <xs:restriction base="xs:string">
134                                                         <xs:length value="1"/>
135                                                 </xs:restriction>
136                                         </xs:simpleType>
137                                 </xs:element>
138                                 <xs:element name="value" type="xs:float" maxOccurs="1" minOccurs="0"/>
139                         </xs:sequence>
140                         <xs:attribute name="position" type="xs:int" use="required"/>
141                         <xs:attribute name="id" type="xs:ID" use="optional"/>
142                 </xs:complexType>
143         </xs:element>
144         <xs:complexType name="SequenceType">
145                 <xs:sequence>
146                         <xs:element name="sequence" type="xs:string" maxOccurs="1" minOccurs="1"/>
147                         <xs:element name="name" type="xs:string" maxOccurs="1" minOccurs="1"/>
148                 </xs:sequence>
149                 <xs:attribute name="start" type="xs:int" use="required"/>
150                 <xs:attribute name="end" type="xs:int" use="required"/>
151         </xs:complexType>
152         <xs:element name="ApplicationData">
153                 <xs:complexType>
154                         <xs:sequence>
155                                 <xs:element name="Application" minOccurs="0" maxOccurs="unbounded">
156                                         <xs:complexType>
157                                                 <xs:sequence>
158                                                         <xs:element name="User" minOccurs="1" maxOccurs="unbounded">
159                                                                 <xs:complexType>
160                                                                         <xs:attribute name="fullname" type="xs:string"/>
161                                                                         <xs:attribute name="organization" type="xs:string"/>
162                                                                         <xs:attribute name="data" type="xs:string"/>
163                                                                 </xs:complexType>
164                                                         </xs:element>
165                                                 </xs:sequence>
166                                                 <xs:attribute name="version" type="xs:string" use="required"/>
167                                                 <xs:attribute name="name" type="xs:string" use="required"/>
168                                                 <xs:attribute name="urn" type="xs:string" use="required"/>
169                                                 <xs:attribute name="data" type="xs:string" use="required"/>
170                                         </xs:complexType>
171                                 </xs:element>
172                         </xs:sequence>
173                 </xs:complexType>
174         </xs:element>
175 </xs:schema>