JAL-2113 embl_mapping.xml and code updated for EMBL XML v1.2
[jalview.git] / resources / embl_mapping.xml
1 <?xml version="1.0"?>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4  * Copyright (C) $$Year-Rel$$ The Jalview Authors
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
18  * The Jalview Authors are detailed in the 'AUTHORS' file.
19 -->
20 <mapping xmlns="http://castor.exolab.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21         xsi:schemaLocation="http://castor.exolab.org/ ../schemas/castor-mapping.xsd">
22 <!--
23         History: Originally created from EMBL_common_V1.0
24         Updated on 24th April 2007 for WsDBFetch Service move to EMBL_Services_V1.1.xsd
25         Updated May 2016 for EMBL XML 1.2 JAL-2113 JAL-2114
26           see ftp://ftp.sra.ebi.ac.uk/meta/xsd/sra_1_5/ENA.embl.xsd
27           see http://www.ebi.ac.uk/ena/submit/data-formats
28         -->
29         <class name="jalview.datamodel.xdb.embl.EmblFile">
30                 <map-to xml="ROOT"/>
31                 <field name="entries" type="jalview.datamodel.xdb.embl.EmblEntry" collection="vector">
32                         <bind-xml name="entry"/>
33                 </field>
34                 <field name="errors" type="jalview.datamodel.xdb.embl.EmblError" collection="vector">
35                         <bind-xml name="Error"/>
36                 </field>
37         </class>
38         <class name="jalview.datamodel.xdb.embl.EmblEntry">
39                 <field name="accession" type="string">
40                         <bind-xml name="accession" node="attribute"/>
41                 </field>
42                 <field name="lastUpdated" type="string">
43                         <bind-xml name="lastUpdated" node="attribute"/>
44                 </field>
45                 <!-- 
46                     in EMBL XML 1.2 sequence/@version becomes entry/version 
47                     entry/@version becomes entry/@entryVersion
48                 -->
49                 <field name="sequenceVersion" type="string">
50                         <bind-xml name="version" node="attribute"/>
51                 </field>
52                 <field name="entryVersion" type="string">
53                         <bind-xml name="entryVersion" node="attribute"/>
54                 </field>
55                 <field name="moleculeType" type="string">
56                         <bind-xml name="moleculeType" node="attribute"/>
57                 </field>
58                 <field name="sequenceLength" type="string">
59                         <bind-xml name="sequenceLength" node="attribute"/>
60                 </field>
61                 <field name="topology" type="string">
62                         <bind-xml name="topology" node="attribute" location="type"/>
63                 </field>
64                 <field name="rCreated" type="string">
65                         <bind-xml name="releaseCreated" node="attribute"/>
66                 </field>
67                 <field name="rLastUpdated" type="string">
68                         <bind-xml name="releaseLastUpdated" node="attribute"/>
69                 </field>
70                 <field name="desc" type="string">
71                         <bind-xml name="description" node="element"/>
72                 </field>
73                 <field name="keywords" type="string" collection="vector">
74                         <bind-xml name="keyword" node="element"/>
75                 </field>
76                 <field name="features" type="jalview.datamodel.xdb.embl.EmblFeature" collection="vector">
77                         <bind-xml name="feature"/>
78                 </field>
79                 <field name="dbRefs" type="jalview.datamodel.DBRefEntry" collection="vector">
80                         <bind-xml name="xref" />
81                 </field>
82                 <field name="sequence" type="jalview.datamodel.xdb.embl.EmblSequence">
83                         <bind-xml name="sequence"/>
84                 </field>
85         </class>
86         <class name="jalview.datamodel.xdb.embl.EmblSequence">
87                 <field name="sequence" type="string">
88                         <bind-xml node="text"/>
89                 </field>
90         </class>
91         <class name="jalview.datamodel.xdb.embl.EmblFeature" verify-constructable="false">
92                 <field name="name" type="string">
93                         <bind-xml name="name" node="attribute"/>
94                 </field>
95                 <field name="location" type="string">
96                         <bind-xml name="location" node="attribute"/>
97                 </field>
98                 <field name="dbRefs" type="jalview.datamodel.DBRefEntry" collection="vector">
99                         <bind-xml name="xref" node="element"/>
100                 </field>
101                 <field name="qualifiers" type="jalview.datamodel.xdb.embl.Qualifier" collection="vector">
102                         <bind-xml name="qualifier"/>
103                 </field>                                        
104         </class>
105         <class name="jalview.datamodel.DBRefEntry" verify-constructable="false">
106                 <field name="accessionId" type="java.lang.String">
107                         <bind-xml name="id" node="attribute"/>
108                 </field>
109                 <field name="source" type="java.lang.String"> 
110                         <bind-xml name="db" node="attribute"/>
111                 </field>
112                 <field name="version" type="string">
113                         <bind-xml name="secondaryId" node="attribute"/>
114                 </field>
115         </class>
116         <class  name="jalview.datamodel.xdb.embl.Qualifier" verify-constructable="false">
117                 <field name="name">
118                         <bind-xml name="name" node="attribute"/>
119                 </field>
120                 <field name="evidence" type="string" collection="array">
121                         <bind-xml name="evidence" node="element"/>
122                 </field>
123                 <field name="values" type="string" collection="array">
124                         <bind-xml name="value" node="element"/>
125                 </field>
126         </class>
127         <class name="jalview.datamodel.xdb.embl.EmblFeatureLocations">
128                 <field name="locationType" type="string">
129                         <bind-xml name="type" node="attribute"/>
130                 </field>
131                 <field name="locationComplement" type="boolean">
132                         <bind-xml name="complement" node="attribute"/>
133                 </field>
134                 <field name="locElements" type="jalview.datamodel.xdb.embl.EmblFeatureLocElement" collection="vector">
135                         <bind-xml name="locationElement"/>
136                 </field>
137         </class>
138         <class name="jalview.datamodel.xdb.embl.EmblFeatureLocElement">
139                 <field name="type" type="string">
140                         <bind-xml name="type" node="attribute"/>
141                 </field>
142                 <field name="accession" type="string">
143                         <bind-xml name="accession" node="attribute"/>                   
144                 </field>
145                 <field name="version" type="string">
146                         <bind-xml name="version" node="attribute"/>
147                 </field>
148                 <field name="complement" type="boolean">
149                         <bind-xml name="complement"/>
150                 </field>
151                 <field name="basePositions" type="jalview.datamodel.xdb.embl.BasePosition" collection="array">
152                         <bind-xml name="basePosition" node="element"/>
153                 </field>
154         </class>
155         <class name="jalview.datamodel.xdb.embl.BasePosition">
156                 <field name="type">
157                         <bind-xml name="type" node="attribute"/>
158                 </field>
159                 <field name="pos">
160                         <bind-xml node="text"/>
161                 </field>
162         </class>
163 </mapping>