de43ff4bf077ceeacb8971f17a7a86bae381103d
[jalview.git] / src / jalview / schemabinding / version2 / DBRef.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 DBRef.
38  * 
39  * @version $Revision$ $Date$
40  */
41 public class DBRef implements java.io.Serializable
42 {
43
44   // --------------------------/
45   // - Class/Member Variables -/
46   // --------------------------/
47
48   /**
49    * Field _source.
50    */
51   private java.lang.String _source;
52
53   /**
54    * Field _version.
55    */
56   private java.lang.String _version;
57
58   /**
59    * Field _accessionId.
60    */
61   private java.lang.String _accessionId;
62
63   /**
64    * Field _mapping.
65    */
66   private jalview.schemabinding.version2.Mapping _mapping;
67
68   // ----------------/
69   // - Constructors -/
70   // ----------------/
71
72   public DBRef()
73   {
74     super();
75   }
76
77   // -----------/
78   // - Methods -/
79   // -----------/
80
81   /**
82    * Returns the value of field 'accessionId'.
83    * 
84    * @return the value of field 'AccessionId'.
85    */
86   public java.lang.String getAccessionId()
87   {
88     return this._accessionId;
89   }
90
91   /**
92    * Returns the value of field 'mapping'.
93    * 
94    * @return the value of field 'Mapping'.
95    */
96   public jalview.schemabinding.version2.Mapping getMapping()
97   {
98     return this._mapping;
99   }
100
101   /**
102    * Returns the value of field 'source'.
103    * 
104    * @return the value of field 'Source'.
105    */
106   public java.lang.String getSource()
107   {
108     return this._source;
109   }
110
111   /**
112    * Returns the value of field 'version'.
113    * 
114    * @return the value of field 'Version'.
115    */
116   public java.lang.String getVersion()
117   {
118     return this._version;
119   }
120
121   /**
122    * Method isValid.
123    * 
124    * @return true if this object is valid according to the schema
125    */
126   public boolean isValid()
127   {
128     try
129     {
130       validate();
131     } catch (org.exolab.castor.xml.ValidationException vex)
132     {
133       return false;
134     }
135     return true;
136   }
137
138   /**
139    * 
140    * 
141    * @param out
142    * @throws org.exolab.castor.xml.MarshalException
143    *           if object is null or if any SAXException is thrown during
144    *           marshaling
145    * @throws org.exolab.castor.xml.ValidationException
146    *           if this object is an invalid instance according to the schema
147    */
148   public void marshal(final java.io.Writer out)
149           throws org.exolab.castor.xml.MarshalException,
150           org.exolab.castor.xml.ValidationException
151   {
152     Marshaller.marshal(this, out);
153   }
154
155   /**
156    * 
157    * 
158    * @param handler
159    * @throws java.io.IOException
160    *           if an IOException occurs during marshaling
161    * @throws org.exolab.castor.xml.ValidationException
162    *           if this object is an invalid instance according to the schema
163    * @throws org.exolab.castor.xml.MarshalException
164    *           if object is null or if any SAXException is thrown during
165    *           marshaling
166    */
167   public void marshal(final org.xml.sax.ContentHandler handler)
168           throws java.io.IOException,
169           org.exolab.castor.xml.MarshalException,
170           org.exolab.castor.xml.ValidationException
171   {
172     Marshaller.marshal(this, handler);
173   }
174
175   /**
176    * Sets the value of field 'accessionId'.
177    * 
178    * @param accessionId
179    *          the value of field 'accessionId'.
180    */
181   public void setAccessionId(final java.lang.String accessionId)
182   {
183     this._accessionId = accessionId;
184   }
185
186   /**
187    * Sets the value of field 'mapping'.
188    * 
189    * @param mapping
190    *          the value of field 'mapping'.
191    */
192   public void setMapping(
193           final jalview.schemabinding.version2.Mapping mapping)
194   {
195     this._mapping = mapping;
196   }
197
198   /**
199    * Sets the value of field 'source'.
200    * 
201    * @param source
202    *          the value of field 'source'.
203    */
204   public void setSource(final java.lang.String source)
205   {
206     this._source = source;
207   }
208
209   /**
210    * Sets the value of field 'version'.
211    * 
212    * @param version
213    *          the value of field 'version'.
214    */
215   public void setVersion(final java.lang.String version)
216   {
217     this._version = version;
218   }
219
220   /**
221    * Method unmarshal.
222    * 
223    * @param reader
224    * @throws org.exolab.castor.xml.MarshalException
225    *           if object is null or if any SAXException is thrown during
226    *           marshaling
227    * @throws org.exolab.castor.xml.ValidationException
228    *           if this object is an invalid instance according to the schema
229    * @return the unmarshaled jalview.schemabinding.version2.DBRef
230    */
231   public static jalview.schemabinding.version2.DBRef unmarshal(
232           final java.io.Reader reader)
233           throws org.exolab.castor.xml.MarshalException,
234           org.exolab.castor.xml.ValidationException
235   {
236     return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(
237             jalview.schemabinding.version2.DBRef.class, reader);
238   }
239
240   /**
241    * 
242    * 
243    * @throws org.exolab.castor.xml.ValidationException
244    *           if this object is an invalid instance according to the schema
245    */
246   public void validate() throws org.exolab.castor.xml.ValidationException
247   {
248     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
249     validator.validate(this);
250   }
251
252 }