JAL-2920 JAL-3017 uniprot XML schema included in mappings doc
[jalview.git] / resources / uniprot_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>
21   <!-- see https://www.uniprot.org/docs/uniprot.xsd for latest Uniprot XML schema -->
22         <class name="jalview.datamodel.xdb.uniprot.UniprotFile">
23                  <map-to xml="uniprot"/>               
24                  <field name="UniprotEntries" type="jalview.datamodel.xdb.uniprot.UniprotEntry" collection="vector">
25                       <bind-xml name="entry"/>
26                  </field>               
27         </class>
28                  
29          <class name="jalview.datamodel.xdb.uniprot.UniprotEntry">
30                 <field name="name" type="string" collection="vector"/>
31                 <field name="accession" type="string" collection="vector"/>
32                 <field name="protein" type="jalview.datamodel.xdb.uniprot.UniprotProteinName"/>
33             <field name="UniprotSequence" type="jalview.datamodel.xdb.uniprot.UniprotSequence">
34                 <bind-xml name="sequence"/> 
35             </field>
36             <field name="feature" type="jalview.datamodel.xdb.uniprot.UniprotFeature" collection="vector"/>
37             <field name="dbReference" type="jalview.datamodel.PDBEntry" collection="vector"/>
38                        
39          </class>
40         <class name="jalview.datamodel.xdb.uniprot.UniprotProteinName">
41                 <field name="name" collection="vector" type="string">
42                         <bind-xml name="fullName" location="recommendedName" node="element"/>
43                 </field>
44         </class>
45          <!-- uniprot protein name is now a collection of collections - the INCLUDES and CONTAINS entries of the uniprot
46                 record. This means this doesn't exist anymore...
47          <class name="jalview.datamodel.xdb.uniprot.UniprotProteinName">
48                 <field name="name" type="string" collection="vector">
49                         <bind-xml name="name"/>
50                 </field>                
51          </class>
52          -->
53          
54          <class name="jalview.datamodel.xdb.uniprot.UniprotFeature">
55                 <field name="type">
56                         <bind-xml node="attribute"/>
57                 </field>
58                 <field name="description">
59                          <bind-xml node="attribute"/>
60                 </field>
61                 <field name="status">
62                         <bind-xml node="attribute"/>
63                 </field>
64                 <field name="position">
65                  <bind-xml name="position" node="attribute" location="location/position"/>
66                 </field>
67                 <field name="begin">
68                  <bind-xml name="position" node="attribute" location="location/begin"/>
69                 </field>
70     <field name="end">
71       <bind-xml name="position" node="attribute" location="location/end"/>
72     </field>
73     <field name="variation" collection="vector" type="string">
74      <bind-xml name="variation"/>
75     </field>
76     <field name="original">
77      <bind-xml name="original"/>
78     </field>
79          </class>
80         
81           <class name="jalview.datamodel.xdb.uniprot.UniprotSequence">
82                      <field name="content" type="string">
83                         <bind-xml name="sequence" node="text"/>
84                      </field>
85          </class>
86          
87          <class name="jalview.datamodel.PDBEntry">
88                 <field name="type"><bind-xml node="attribute"/></field>
89                 <field name="id"><bind-xml node="attribute"/></field>
90                 <field name="props" collection="hashtable">
91                         <bind-xml name="property">
92                            <class name="org.exolab.castor.mapping.MapItem">
93                               <field name="key">
94                                 <bind-xml name="type" node="attribute"/>
95                               </field>
96                               <field name="value">
97                                 <bind-xml node="attribute"/>
98                                 </field>
99                            </class>
100                         </bind-xml>
101                 </field>
102          </class>
103
104 </mapping>