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