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