extended Colour element with additional optional attributes for graduated colour
[jalview.git] / src / jalview / schemabinding / version2 / AlcodMap.java
1 /*\r
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1)\r
3  * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
4  * \r
5  * This program is free software; you can redistribute it and/or\r
6  * modify it under the terms of the GNU General Public License\r
7  * as published by the Free Software Foundation; either version 2\r
8  * of the License, or (at your option) any later version.\r
9  * \r
10  * This program is distributed in the hope that it will be useful,\r
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13  * GNU General Public License for more details.\r
14  * \r
15  * You should have received a copy of the GNU General Public License\r
16  * along with this program; if not, write to the Free Software\r
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
18  */\r
19 package jalview.schemabinding.version2;\r
20 \r
21   //---------------------------------/\r
22  //- Imported classes and packages -/\r
23 //---------------------------------/\r
24 \r
25 import org.exolab.castor.xml.Marshaller;\r
26 import org.exolab.castor.xml.Unmarshaller;\r
27 \r
28 /**\r
29  * Class AlcodMap.\r
30  * \r
31  * @version $Revision$ $Date$\r
32  */\r
33 public class AlcodMap implements java.io.Serializable {\r
34 \r
35 \r
36       //--------------------------/\r
37      //- Class/Member Variables -/\r
38     //--------------------------/\r
39 \r
40     /**\r
41      * internal jalview id for the dnasq for this mapping.\r
42      *  \r
43      */\r
44     private java.lang.String _dnasq;\r
45 \r
46     /**\r
47      * a Mapping entry and an associated protein sequence\r
48      *  \r
49      */\r
50     private jalview.schemabinding.version2.Mapping _mapping;\r
51 \r
52 \r
53       //----------------/\r
54      //- Constructors -/\r
55     //----------------/\r
56 \r
57     public AlcodMap() {\r
58         super();\r
59     }\r
60 \r
61 \r
62       //-----------/\r
63      //- Methods -/\r
64     //-----------/\r
65 \r
66     /**\r
67      * Returns the value of field 'dnasq'. The field 'dnasq' has\r
68      * the following description: internal jalview id for the dnasq\r
69      * for this mapping.\r
70      *  \r
71      * \r
72      * @return the value of field 'Dnasq'.\r
73      */\r
74     public java.lang.String getDnasq(\r
75     ) {\r
76         return this._dnasq;\r
77     }\r
78 \r
79     /**\r
80      * Returns the value of field 'mapping'. The field 'mapping'\r
81      * has the following description: a Mapping entry and an\r
82      * associated protein sequence\r
83      *  \r
84      * \r
85      * @return the value of field 'Mapping'.\r
86      */\r
87     public jalview.schemabinding.version2.Mapping getMapping(\r
88     ) {\r
89         return this._mapping;\r
90     }\r
91 \r
92     /**\r
93      * Method isValid.\r
94      * \r
95      * @return true if this object is valid according to the schema\r
96      */\r
97     public boolean isValid(\r
98     ) {\r
99         try {\r
100             validate();\r
101         } catch (org.exolab.castor.xml.ValidationException vex) {\r
102             return false;\r
103         }\r
104         return true;\r
105     }\r
106 \r
107     /**\r
108      * \r
109      * \r
110      * @param out\r
111      * @throws org.exolab.castor.xml.MarshalException if object is\r
112      * null or if any SAXException is thrown during marshaling\r
113      * @throws org.exolab.castor.xml.ValidationException if this\r
114      * object is an invalid instance according to the schema\r
115      */\r
116     public void marshal(\r
117             final java.io.Writer out)\r
118     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
119         Marshaller.marshal(this, out);\r
120     }\r
121 \r
122     /**\r
123      * \r
124      * \r
125      * @param handler\r
126      * @throws java.io.IOException if an IOException occurs during\r
127      * marshaling\r
128      * @throws org.exolab.castor.xml.ValidationException if this\r
129      * object is an invalid instance according to the schema\r
130      * @throws org.exolab.castor.xml.MarshalException if object is\r
131      * null or if any SAXException is thrown during marshaling\r
132      */\r
133     public void marshal(\r
134             final org.xml.sax.ContentHandler handler)\r
135     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
136         Marshaller.marshal(this, handler);\r
137     }\r
138 \r
139     /**\r
140      * Sets the value of field 'dnasq'. The field 'dnasq' has the\r
141      * following description: internal jalview id for the dnasq for\r
142      * this mapping.\r
143      *  \r
144      * \r
145      * @param dnasq the value of field 'dnasq'.\r
146      */\r
147     public void setDnasq(\r
148             final java.lang.String dnasq) {\r
149         this._dnasq = dnasq;\r
150     }\r
151 \r
152     /**\r
153      * Sets the value of field 'mapping'. The field 'mapping' has\r
154      * the following description: a Mapping entry and an associated\r
155      * protein sequence\r
156      *  \r
157      * \r
158      * @param mapping the value of field 'mapping'.\r
159      */\r
160     public void setMapping(\r
161             final jalview.schemabinding.version2.Mapping mapping) {\r
162         this._mapping = mapping;\r
163     }\r
164 \r
165     /**\r
166      * Method unmarshal.\r
167      * \r
168      * @param reader\r
169      * @throws org.exolab.castor.xml.MarshalException if object is\r
170      * null or if any SAXException is thrown during marshaling\r
171      * @throws org.exolab.castor.xml.ValidationException if this\r
172      * object is an invalid instance according to the schema\r
173      * @return the unmarshaled\r
174      * jalview.schemabinding.version2.AlcodMap\r
175      */\r
176     public static jalview.schemabinding.version2.AlcodMap unmarshal(\r
177             final java.io.Reader reader)\r
178     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
179         return (jalview.schemabinding.version2.AlcodMap) Unmarshaller.unmarshal(jalview.schemabinding.version2.AlcodMap.class, reader);\r
180     }\r
181 \r
182     /**\r
183      * \r
184      * \r
185      * @throws org.exolab.castor.xml.ValidationException if this\r
186      * object is an invalid instance according to the schema\r
187      */\r
188     public void validate(\r
189     )\r
190     throws org.exolab.castor.xml.ValidationException {\r
191         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
192         validator.validate(this);\r
193     }\r
194 \r
195 }\r