Merge branch 'feature/JAL-3063JAXB' into feature/JAL-3063jaxbNoCastor
[jalview.git] / src / jalview / schemabinding / version2 / DBRef.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class DBRef.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class DBRef implements java.io.Serializable
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _source.
31    */
32   private java.lang.String _source;
33
34   /**
35    * Field _version.
36    */
37   private java.lang.String _version;
38
39   /**
40    * Field _accessionId.
41    */
42   private java.lang.String _accessionId;
43
44   /**
45    * Field _mapping.
46    */
47   private jalview.schemabinding.version2.Mapping _mapping;
48
49   // ----------------/
50   // - Constructors -/
51   // ----------------/
52
53   public DBRef()
54   {
55     super();
56   }
57
58   // -----------/
59   // - Methods -/
60   // -----------/
61
62   /**
63    * Returns the value of field 'accessionId'.
64    * 
65    * @return the value of field 'AccessionId'.
66    */
67   public java.lang.String getAccessionId()
68   {
69     return this._accessionId;
70   }
71
72   /**
73    * Returns the value of field 'mapping'.
74    * 
75    * @return the value of field 'Mapping'.
76    */
77   public jalview.schemabinding.version2.Mapping getMapping()
78   {
79     return this._mapping;
80   }
81
82   /**
83    * Returns the value of field 'source'.
84    * 
85    * @return the value of field 'Source'.
86    */
87   public java.lang.String getSource()
88   {
89     return this._source;
90   }
91
92   /**
93    * Returns the value of field 'version'.
94    * 
95    * @return the value of field 'Version'.
96    */
97   public java.lang.String getVersion()
98   {
99     return this._version;
100   }
101
102   /**
103    * Method isValid.
104    * 
105    * @return true if this object is valid according to the schema
106    */
107   public boolean isValid()
108   {
109     try
110     {
111       validate();
112     } catch (org.exolab.castor.xml.ValidationException vex)
113     {
114       return false;
115     }
116     return true;
117   }
118
119   /**
120    * 
121    * 
122    * @param out
123    * @throws org.exolab.castor.xml.MarshalException
124    *           if object is null or if any SAXException is thrown during
125    *           marshaling
126    * @throws org.exolab.castor.xml.ValidationException
127    *           if this object is an invalid instance according to the schema
128    */
129   public void marshal(final java.io.Writer out)
130           throws org.exolab.castor.xml.MarshalException,
131           org.exolab.castor.xml.ValidationException
132   {
133     Marshaller.marshal(this, out);
134   }
135
136   /**
137    * 
138    * 
139    * @param handler
140    * @throws java.io.IOException
141    *           if an IOException occurs during marshaling
142    * @throws org.exolab.castor.xml.ValidationException
143    *           if this object is an invalid instance according to the schema
144    * @throws org.exolab.castor.xml.MarshalException
145    *           if object is null or if any SAXException is thrown during
146    *           marshaling
147    */
148   public void marshal(final org.xml.sax.ContentHandler handler)
149           throws java.io.IOException,
150           org.exolab.castor.xml.MarshalException,
151           org.exolab.castor.xml.ValidationException
152   {
153     Marshaller.marshal(this, handler);
154   }
155
156   /**
157    * Sets the value of field 'accessionId'.
158    * 
159    * @param accessionId
160    *          the value of field 'accessionId'.
161    */
162   public void setAccessionId(final java.lang.String accessionId)
163   {
164     this._accessionId = accessionId;
165   }
166
167   /**
168    * Sets the value of field 'mapping'.
169    * 
170    * @param mapping
171    *          the value of field 'mapping'.
172    */
173   public void setMapping(
174           final jalview.schemabinding.version2.Mapping mapping)
175   {
176     this._mapping = mapping;
177   }
178
179   /**
180    * Sets the value of field 'source'.
181    * 
182    * @param source
183    *          the value of field 'source'.
184    */
185   public void setSource(final java.lang.String source)
186   {
187     this._source = source;
188   }
189
190   /**
191    * Sets the value of field 'version'.
192    * 
193    * @param version
194    *          the value of field 'version'.
195    */
196   public void setVersion(final java.lang.String version)
197   {
198     this._version = version;
199   }
200
201   /**
202    * Method unmarshal.
203    * 
204    * @param reader
205    * @throws org.exolab.castor.xml.MarshalException
206    *           if object is null or if any SAXException is thrown during
207    *           marshaling
208    * @throws org.exolab.castor.xml.ValidationException
209    *           if this object is an invalid instance according to the schema
210    * @return the unmarshaled jalview.schemabinding.version2.DBRef
211    */
212   public static jalview.schemabinding.version2.DBRef unmarshal(
213           final java.io.Reader reader)
214           throws org.exolab.castor.xml.MarshalException,
215           org.exolab.castor.xml.ValidationException
216   {
217     return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(
218             jalview.schemabinding.version2.DBRef.class, reader);
219   }
220
221   /**
222    * 
223    * 
224    * @throws org.exolab.castor.xml.ValidationException
225    *           if this object is an invalid instance according to the schema
226    */
227   public void validate() throws org.exolab.castor.xml.ValidationException
228   {
229     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
230     validator.validate(this);
231   }
232
233 }